-
public abstract class GraphicMultiOverlay.GraphicBase class for a custom graphics object to be rendered within the graphic overlay. Subclassthis and implement the draw method to define the graphics element. Addinstances to the overlay using .
-
-
Constructor Summary
Constructors Constructor Description GraphicMultiOverlay.Graphic(GraphicMultiOverlay overlay)
-
Method Summary
Modifier and Type Method Description abstract voiddraw(Canvas canvas)Draw the graphic on the supplied canvas. floatscale(float imagePixel)Adjusts the supplied value from the image scale to the view scale. ContextgetApplicationContext()Returns the application context of the app. booleanisImageFlipped()floattranslateX(float x)Adjusts the x coordinate from the image's coordinate system to the view coordinate system. floattranslateY(float y)Adjusts the y coordinate from the image's coordinate system to the view coordinate system. MatrixgetTransformationMatrix()Returns a Matrix for transforming from image coordinates to overlay view coordinates. voidpostInvalidate()-
-
Constructor Detail
-
GraphicMultiOverlay.Graphic
GraphicMultiOverlay.Graphic(GraphicMultiOverlay overlay)
-
-
Method Detail
-
draw
abstract void draw(Canvas canvas)
Draw the graphic on the supplied canvas. Drawing should use the following methods to convertto view coordinates for the graphics that are drawn:
- scale adjusts the size of the supplied value from the imagescale to the view scale.
- translateX and translateY adjust thecoordinate from the image's coordinate system to the view coordinate system.
- Parameters:
canvas- drawing canvas
-
scale
float scale(float imagePixel)
Adjusts the supplied value from the image scale to the view scale.
-
getApplicationContext
Context getApplicationContext()
Returns the application context of the app.
-
isImageFlipped
boolean isImageFlipped()
-
translateX
float translateX(float x)
Adjusts the x coordinate from the image's coordinate system to the view coordinate system.
-
translateY
float translateY(float y)
Adjusts the y coordinate from the image's coordinate system to the view coordinate system.
-
getTransformationMatrix
Matrix getTransformationMatrix()
Returns a Matrix for transforming from image coordinates to overlay view coordinates.
-
postInvalidate
void postInvalidate()
-
-
-
-