|
Drag[en]gine Script Module DragonScript 1.35
|
Immutable image resources. More...
Constructors | |
| Image | new (String filename) |
| Load image from file. | |
| static void | loadAsynchron (String filename, ResourceListener listener) |
| Load image from file asynchronously. | |
Management | |
| String | getFilename () |
| Normalized filename the image has been loaded from. | |
| int | getWidth () |
| Width in pixels. | |
| int | getHeight () |
| Height in pixels. | |
| Point | getSize () |
| Width and height in pixels. | |
| int | getDepth () |
| Depth in layers. | |
| int | getComponentCount () |
| Component count in the range from 1 to 4. | |
| int | getBitCount () |
| Bit count which is 8, 16 or 32. | |
| void | saveToFile (String filename) |
| Save image to file. | |
| Image | dropAlpha () |
| Drop alpha component. | |
| bool | equals (Object other) |
| Image is equal to another object. | |
| int | hashCode () |
| Hash code for use as dictionary keys. | |
| static bool | equals (Image image1, Image image2) |
| Images are equal. | |
Immutable image resources.
Images can be loaded from file or produced by the game engine or modules. Once created the image content is immutable.
This is a native class. It can not be subclassed.
| Image Dragengine.Gui.Image.dropAlpha | ( | ) |
Images are equal.
In contrary to equals(Object) this is safe to be called with null values.
References dropAlpha().
| bool Dragengine.Gui.Image.equals | ( | Object | other | ) |
Image is equal to another object.
Implements Object.equals(Object).
References saveToFile().
Referenced by hashCode().
| int Dragengine.Gui.Image.getBitCount | ( | ) |
Bit count which is 8, 16 or 32.
Referenced by dropAlpha().
| int Dragengine.Gui.Image.getComponentCount | ( | ) |
| int Dragengine.Gui.Image.getDepth | ( | ) |
| String Dragengine.Gui.Image.getFilename | ( | ) |
Normalized filename the image has been loaded from.
References getFilename().
Referenced by getFilename().
| int Dragengine.Gui.Image.getHeight | ( | ) |
| Point Dragengine.Gui.Image.getSize | ( | ) |
Width and height in pixels.
Referenced by getComponentCount().
| int Dragengine.Gui.Image.getWidth | ( | ) |
Width in pixels.
Referenced by getHeight().
| int Dragengine.Gui.Image.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
References equals(), and hashCode().
Referenced by hashCode().
|
static |
Load image from file asynchronously.
Registers a request in the game engine to load an image. Once finished or if the file is already loaded the listener is used to deliver the loaded image or null if the loading failed.
References loadAsynchron().
Referenced by loadAsynchron().
| Image Dragengine.Gui.Image.new | ( | String | filename | ) |
Load image from file.
If the image file has been already loaded it is assigned to this object. If the image is not loaded yet the engine loads the image. This call blocks until the image is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded image resource. Once no object instance uses an image file anymore it is released from memory.
References new().
Referenced by new().
| void Dragengine.Gui.Image.saveToFile | ( | String | filename | ) |