public abstract static class GraphicOverlay.Graphic
extends java.lang.Object
draw(Canvas) method to define the
graphics element. Add instances to the overlay using GraphicOverlay.add(Graphic).| Modifier and Type | Field and Description |
|---|---|
protected GraphicOverlay |
mOverlay |
| Constructor and Description |
|---|
Graphic(GraphicOverlay overlay) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
draw(android.graphics.Canvas canvas)
Draw the graphic on the supplied canvas.
|
void |
postInvalidate() |
float |
scaleX(float horizontal)
Adjusts a horizontal value of the supplied value from the preview scale to the view
scale.
|
float |
scaleY(float vertical)
Adjusts a vertical value of the supplied value from the preview scale to the view scale.
|
float |
translateX(float x)
Adjusts the x coordinate from the preview's coordinate system to the view coordinate
system.
|
float |
translateY(float y)
Adjusts the y coordinate from the preview's coordinate system to the view coordinate
system.
|
protected GraphicOverlay mOverlay
public Graphic(GraphicOverlay overlay)
public abstract void draw(android.graphics.Canvas canvas)
scaleX(float) and scaleY(float) adjust the size of
the supplied value from the preview scale to the view scale.translateX(float) and translateY(float) adjust the
coordinate from the preview's coordinate system to the view coordinate system.canvas - drawing canvaspublic float scaleX(float horizontal)
public float scaleY(float vertical)
public float translateX(float x)
public float translateY(float y)
public void postInvalidate()