java.lang.Object | ||
↳ | net.pierrox.lightning_launcher.script.api.Image | |
↳ | net.pierrox.lightning_launcher.script.api.ImageBitmap |
Wraps a static bitmap.
Such an image can be loaded from file, created using createImage(int, int)
, or obtained from items icons.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Canvas |
draw()
Draw free content on this icon.
| ||||||||||
Bitmap |
getBitmap()
Retrieves the Android Bitmap associated with this image.
| ||||||||||
int |
getHeight()
Return the image height
| ||||||||||
int |
getWidth()
Return the image width
| ||||||||||
void |
save()
Save the modified image (with #draw) to file, and update the associated item if any.
| ||||||||||
boolean |
saveToFile(String path, Bitmap.CompressFormat format, int quality)
Save the underlying bitmap to file
| ||||||||||
void |
update()
Update the item using this image.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
net.pierrox.lightning_launcher.script.api.Image
| |||||||||||
From class
java.lang.Object
|
Draw free content on this icon. The image must be a bitmap, it cannot work with nine patch. In addition to the Canvas class, the following Android classes are currently available
Retrieves the Android Bitmap associated with this image.
Return the image height
Return the image width
Save the modified image (with #draw) to file, and update the associated item if any. Such an image is typically retrieved through
getDefaultIcon()
getCustomIcon()
createImage(String)
Save the underlying bitmap to file
path | where to store the file |
---|---|
quality | only useful for JPEG (0-100) |
Update the item using this image. This method only applies to images loaded in RAM, not file backed images. This method need to be called in order to refresh the object on the screen after the image has been modified through #draw.