Phone API Reference - UI Classes (Widgets) - Image
Widget that displays an image file on the screen using a location and filename.
Class Constructor
new Image()
For images stored in the app's directory, location should be set to app, and filename should be set to the name of the image file.Construct a new Image Object.
var imgObj = new Image("location", "filename", x, y, w, h); |
Initialization Parameters
None |
This Class inherits methods and properties from the Widget Base Class. See Widget Base Class for more information about setting your Object's x, y, w, and h properties or adding children to it.
Methods
Name | Description |
---|---|
Reloads the image from disk. This is needed to clear the UI drawing cache. Should only be used if a new image is written over an existing one of the same name that has been used in the current run of the app. | |
Changes the size of the image. If either width or height is set to 0, the image will be scaled to the other width/height, maintaining the aspect ratio. |