Class RelativePosition

java.lang.Object
com.luciad.drawing.RelativePosition

public final class RelativePosition extends Object
Describes a position relative to an anchor, with a rotation, alignment and offset.
  • Constructor Details Link icon

    • RelativePosition Link icon

      public RelativePosition(@NotNull Angle rotation, @NotNull HorizontalAlignment horizontalAlignment, @NotNull VerticalAlignment verticalAlignment, double offsetX, double offsetY)
      Creates a new RelativePosition with the given values.
      Parameters:
      rotation - the rotation around the anchor point.
      horizontalAlignment - the horizontal alignment of this RelativePosition.
      verticalAlignment - the vertical alignment of this RelativePosition.
      offsetX - the horizontal offset, expressed in pixels and relative to the anchor point.
      offsetY - the vertical offset, expressed in pixels and relative to the anchor point.
    • RelativePosition Link icon

      public RelativePosition(@NotNull RelativePosition other)
  • Method Details Link icon

    • north Link icon

      @NotNull public static RelativePosition north(double offset)
      Returns a RelativePosition located to the north of the anchor point with the given offset.
      Parameters:
      offset - : the vertical offset, expressed in pixels and relative to the anchor point.
    • east Link icon

      @NotNull public static RelativePosition east(double offset)
      Returns a RelativePosition located to the east of the anchor point with the given offset.
      Parameters:
      offset - : the horizontal offset, expressed in pixels and relative to the anchor point.
    • south Link icon

      @NotNull public static RelativePosition south(double offset)
      Returns a RelativePosition located to the south of the anchor point with the given offset.
      Parameters:
      offset - : the vertical offset, expressed in pixels and relative to the anchor point.
    • west Link icon

      @NotNull public static RelativePosition west(double offset)
      Returns a RelativePosition located to the west of the anchor point with the given offset.
      Parameters:
      offset - : the horizontal offset, expressed in pixels and relative to the anchor point.
    • northEast Link icon

      @NotNull public static RelativePosition northEast(double offsetNorth, double offsetEast)
      Returns a RelativePosition located to the north-east of the anchor point with the given offsets.
      Parameters:
      offsetNorth - : the vertical offset, expressed in pixels and relative to the anchor point.
      offsetEast - : the horizontal offset, expressed in pixels and relative to the anchor point.
    • northWest Link icon

      @NotNull public static RelativePosition northWest(double offsetNorth, double offsetWest)
      Returns a RelativePosition located to the north-west of the anchor point with the given offsets.
      Parameters:
      offsetNorth - : the vertical offset, expressed in pixels and relative to the anchor point.
      offsetWest - : the horizontal offset, expressed in pixels and relative to the anchor point.
    • southEast Link icon

      @NotNull public static RelativePosition southEast(double offsetSouth, double offsetEast)
      Returns a RelativePosition located to the south-east of the anchor point with the given offsets.
      Parameters:
      offsetSouth - : the vertical offset, expressed in pixels and relative to the anchor point.
      offsetEast - : the horizontal offset, expressed in pixels and relative to the anchor point.
    • southWest Link icon

      @NotNull public static RelativePosition southWest(double offsetSouth, double offsetWest)
      Returns a RelativePosition located to the south-west of the anchor point with the given offsets.
      Parameters:
      offsetSouth - : the vertical offset, expressed in pixels and relative to the anchor point.
      offsetWest - : the horizontal offset, expressed in pixels and relative to the anchor point.
    • center Link icon

      @NotNull public static RelativePosition center()
      Returns a RelativePosition located on the anchor point with no offset.
    • getRotation Link icon

      @NotNull public Angle getRotation()
      the rotation around the anchor point.
    • getHorizontalAlignment Link icon

      @NotNull public HorizontalAlignment getHorizontalAlignment()
      the horizontal alignment of this RelativePosition.
    • getVerticalAlignment Link icon

      @NotNull public VerticalAlignment getVerticalAlignment()
      the vertical alignment of this RelativePosition.
    • getOffsetX Link icon

      public double getOffsetX()
      the horizontal offset, expressed in pixels and relative to the anchor point.
    • getOffsetY Link icon

      public double getOffsetY()
      the vertical offset, expressed in pixels and relative to the anchor point.
    • equals Link icon

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object