Interface Canvas

  • public interface Canvas
    Defines a common abstraction for implementations that manage the display. Canvas can be extended for cartesian display or any kind. A Canvas with an XY (Cartesian) display field should support the following properties:

    • pixelWidth
    • pixelHeight
    • center
    • width
    • scale
    • envelope
    GeoAPI 2.2
    • Method Detail

      • getState

        CanvasState getState()
        Returns a copy of the current state of this Canvas. The object returned will implement CanvasState or one of its subinterfaces, depending on the type of canvas.
        a snapshot of current canvas state.
      • isVisible

        boolean isVisible​(DirectPosition coordinate)
        Returns true if the given coordinate is visible on this Canvas.
        coordinate - The coordinate to test for visibility.
        true if the given coordinate is visible on this canvas.
      • getController

        CanvasController getController()
        Returns the controller that allows the programmer to modify the Canvas's properties.
        the controller for this canvas.
      • setRenderingHint

        void setRenderingHint​(RenderingHints.Key hintKey,
                              Object hint)
        Sets a rendering hint for implementation or platform specific rendering information.
        hintKey - The key of the hint.
        hint - The rendering hint.
      • getRenderingHint

        Object getRenderingHint​(RenderingHints.Key hintKey)
        Returns the rendering hint associated with the hint name.
        hintKey - The key of the hint.
        the rendering hint.
      • addCanvasListener

        void addCanvasListener​(CanvasListener listener)
        Adds the given listener that will be notified when the state of this Canvas has changed.
        listener - The listener to add.
      • removeCanvasListener

        void removeCanvasListener​(CanvasListener listener)
        Removes the given listener.
        listener - The listener to remove.