Websites Navigation:
Airbit
|
Shop
|
m-shell.net
Languages:
EN
|
DE
Home
Download
Products
Make SIS
Documentation
Forum
Blog
Contact
Index
Module abgui
Class abgui.Image
is
abguibase.Widget
Known direct subclasses:
abgui.ImageButton
An image widget displaying an image (icon).
Constructor
function init(pathOrIcon=null, align=HCENTER|VCENTER)
Overrides
abguibase.Widget.init()
Initialize a new image.
Parameters:
pathOrIcon
– either a path to an icon file, or an icon loaded via graph.icon. null if the icon cannot be set yet.
align
– the horizontal and vertical alignment flags.
Fields
flags
The flags, defining horizontal and vertical alignment of the icon within the image's rectangle.
icon
The icon to display.
Functions
desiredSize
()
Get or compute the desired size.
draw
()
Draw the image on its background.
drawIcon
(x, y)
Draw the icon at a specific position.
setIcon
(pathOrIcon)
Set the icon to show.
function setIcon(pathOrIcon)
Set the icon to show.
Parameters:
pathOrIcon
– either a path to an icon file, or an icon loaded via graph.icon.
function drawIcon(x, y)
Draw the icon at a specific position.
Parameters:
x
– the x coordinate of the top left corner.
y
– the y coordinate of the top left corner.
function draw()
Overrides
abguibase.Widget.draw()
Draw the image on its background.
function desiredSize()
Overrides
abguibase.Widget.desiredSize()
Get or compute the desired size. The default size depends on the icon size.
Returns:
the size, as [width, height].
mShell Home
>
Documentation
> mdoc