Difference between revisions of "Image"
From Lianjapedia
Helen.george (Talk | contribs) |
Yvonne.milne (Talk | contribs) (→Properties) |
||
(22 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | 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==== | ||
− | This class supports the | + | This class supports the [[:Category:Common_Properties|Common Properties]] plus the following: |
− | {| class="wikitable" | + | {| class="wikitable" width="100%" |
!width="20%"|Property | !width="20%"|Property | ||
!Access (R/RW) | !Access (R/RW) | ||
!Value | !Value | ||
!width="50%"|Description | !width="50%"|Description | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|Closable | |Closable | ||
Line 24: | Line 23: | ||
|Whether image should be closable | |Whether image should be closable | ||
|- | |- | ||
− | | | + | |valign="top"|HeightForWidth |
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |valign="top"|Whether height of image should be based on width | ||
+ | |- | ||
+ | |valign="top"|MouseX | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Numeric | ||
+ | |valign="top"|Mouse X position. | ||
+ | |- | ||
+ | |valign="top"|MouseY | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Numeric | ||
+ | |valign="top"|Mouse Y position. | ||
+ | |- | ||
+ | |Picture | ||
|RW | |RW | ||
− | |Boolean | + | |Character |
− | |Whether | + | |Filename of image displayed |
+ | |- | ||
+ | |valign="top"|Stretch | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |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 33: | Line 57: | ||
====Methods==== | ====Methods==== | ||
− | This class supports the | + | This class supports the [[:Category:Common_Methods|Common Methods]] plus the following: |
− | {| class="wikitable" | + | {| class="wikitable" width="100%" |
!width="20%"|Method | !width="20%"|Method | ||
!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 | ||
− | |width as Numeric, height as Numeric, closable as Boolean | + | |valign="top"|width as Numeric, height as Numeric, closable as Boolean |
− | |Zoom the image to the specified size and with specified Closable setting | + | |valign="top"|Zoom the image to the specified size and with specified Closable setting |
|- | |- | ||
|} | |} | ||
Line 48: | Line 76: | ||
====Events==== | ====Events==== | ||
− | This class supports the | + | This class supports the [[:Category:Common_Events|Common Events]] plus the following: |
− | {| class="wikitable" | + | {| class="wikitable" width="100%" |
!width="20%"|Event | !width="20%"|Event | ||
!Args | !Args |
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 |
---|