Package 

Class GraphicMultiOverlay.Graphic


  • 
    public abstract class GraphicMultiOverlay.Graphic
    
                        

    Base 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 .

    • Method Summary

      Modifier and Type Method Description
      abstract void draw(Canvas canvas) Draw the graphic on the supplied canvas.
      float scale(float imagePixel) Adjusts the supplied value from the image scale to the view scale.
      Context getApplicationContext() Returns the application context of the app.
      boolean isImageFlipped()
      float translateX(float x) Adjusts the x coordinate from the image's coordinate system to the view coordinate system.
      float translateY(float y) Adjusts the y coordinate from the image's coordinate system to the view coordinate system.
      Matrix getTransformationMatrix() Returns a Matrix for transforming from image coordinates to overlay view coordinates.
      void postInvalidate()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.

      • 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.