java.lang.Object | |
↳ | net.pierrox.lightning_launcher.script.api.ImageScript.DrawingContext |
The DrawingContext is the link between the drawing script and the drawing target. The same script can be used to draw several images. For instance an ImageScript instance can be set for icon A, B and C, the drawing context then gives infos on the currently drawn icon.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DrawingContext(SharedAsyncGraphicsDrawable drawable, Item item) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Canvas |
getCanvas()
Return a canvas on which to draw
| ||||||||||
int |
getHeight()
Return the drawing height
| ||||||||||
int |
getId()
Return an unique identifier for this context
| ||||||||||
Item |
getItem()
Return the item for which the drawing occurs.
| ||||||||||
int |
getWidth()
Return the drawing width
| ||||||||||
void | invalidate() | ||||||||||
void | setDrawingInfo(Canvas canvas, int width, int height) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Return a canvas on which to draw
Return the drawing height
Return an unique identifier for this context
Return the item for which the drawing occurs.
Currently this method will only return a value when drawing shortcut icons (set through setImage(Image)
), otherwise it will return null.
Return the drawing width