Difference between revisions of "Image"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) (→Properties) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages. | Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages. | ||
+ | |||
+ | ====Description==== | ||
+ | Shown below in a standalone [[Form]]. Click the image to see in a [[Custom_Sections_and_Gadgets|Custom Section]] in a Lianja [[Page Attributes|Page]]. | ||
+ | |||
+ | [[{{ns:file}}:image.png|link={{filepath:image_strip_image_cs.png}}|Image]] | ||
+ | |||
+ | Image is a control for displaying images. | ||
====Properties==== | ====Properties==== | ||
Line 24: | Line 31: | ||
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
− | |valign="top"|Mouse X position | + | |valign="top"|Mouse X position. |
|- | |- | ||
|valign="top"|MouseY | |valign="top"|MouseY | ||
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
− | |valign="top"|Mouse Y position | + | |valign="top"|Mouse Y position. |
|- | |- | ||
|Picture | |Picture | ||
Line 40: | Line 47: | ||
|valign="top"|Boolean | |valign="top"|Boolean | ||
|Whether image will scale its contents to fill all available space.<br>0 = do not scale/stretch, <>0 = scale/stretch. | |Whether image will scale its contents to fill all available space.<br>0 = do not scale/stretch, <>0 = scale/stretch. | ||
+ | |- | ||
+ | |valign="top"|Maintainaspectratio | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |Whether image will be scaled maintaining its aspect ratio. From v5.4.<br>Note: if setting to .T., this should be set before setting the Picture property. | ||
|- | |- | ||
|} | |} | ||
Line 51: | Line 63: | ||
!Args | !Args | ||
!width="50%"|Description | !width="50%"|Description | ||
+ | |- | ||
+ | |valign="top"|Draw | ||
+ | |valign="top"|name as Character | operation as Character<br>[, operation as Character [, arguments as Character]] | ||
+ | |valign="top"|Draw operations include the following: brush, clear, ellipse, fill, font, image, lineto, moveto, pen, point, rectangle, redraw, restore, save.<br>See [[Understanding Drawables]] and the ''Drawable Image App'' (example_drawable) included in the Lianja App Builder distribution for an example. | ||
|- | |- | ||
|valign="top"|Zoom | |valign="top"|Zoom |
Latest revision as of 07:09, 29 September 2020
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Contents
Description
Shown below in a standalone Form. Click the image to see in a Custom Section in a Lianja Page.
Image is a control for displaying images.
Properties
This class supports the Common Properties plus the following:
Property | Access (R/RW) | Value | Description |
---|---|---|---|
Closable | RW | Boolean | Whether image should be closable |
HeightForWidth | RW | Boolean | Whether height of image should be based on width |
MouseX | RW | Numeric | Mouse X position. |
MouseY | RW | Numeric | Mouse Y position. |
Picture | RW | Character | Filename of image displayed |
Stretch | RW | Boolean | Whether image will scale its contents to fill all available space. 0 = do not scale/stretch, <>0 = scale/stretch. |
Maintainaspectratio | RW | Boolean | Whether image will be scaled maintaining its aspect ratio. From v5.4. Note: if setting to .T., this should be set before setting the Picture property. |
Methods
This class supports the Common Methods plus the following:
Method | Args | Description |
---|---|---|
Draw | name as Character | operation as Character [, operation as Character [, arguments as Character]] |
Draw operations include the following: brush, clear, ellipse, fill, font, image, lineto, moveto, pen, point, rectangle, redraw, restore, save. See Understanding Drawables and the Drawable Image App (example_drawable) included in the Lianja App Builder distribution for an example. |
Zoom | width as Numeric, height as Numeric, closable as Boolean | Zoom the image to the specified size and with specified Closable setting |
Events
This class supports the Common Events plus the following:
Event | Args | Description |
---|