Interface Graph.UserDrawable

Enclosing class:
Graph

public static interface Graph.UserDrawable
Interface for user-space objects that have a corresponding shape. Objects implementing this interface are assumed to be represented graphically by shapes, but are more conveniently described in some other way.

The value provided by toShape(boolean,boolean) may depend on the direction the positive X and/or Y axes in graph coordinate space point in user space. Some objects drawn may need to be drawn to match the direction of the coordinate axes (for example, an arrow that should point in the direction of the positive X axis in graph coordinate space, regardless of whether the positive X axis in graph coordinate space points left or right in user space).

  • Method Summary

    Modifier and Type
    Method
    Description
    toShape(boolean xAxisPointsRight, boolean yAxisPointsDown)
    Get the shape of the object.
  • Method Details

    • toShape

      Shape toShape(boolean xAxisPointsRight, boolean yAxisPointsDown)
      Get the shape of the object. The shape is specified relative to the origin of user space [(0.0, 0.0) in user space].
      Parameters:
      xAxisPointsRight - the direction for increasing X coordinates in graph coordinate space points right in user space
      yAxisPointsDown - the direction for increasing Y coordinates in graph coordinate space points down in user space
      Returns:
      the shape of the object specifying user-space control points or dimensions