Class Anchor2D

java.lang.Object
com.here.sdk.core.Anchor2D

public final class Anchor2D extends Object

Represents a point in a rectangle as a ratio of this rectangle's width and height.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    Defines the x axis where the left is 0, the right is 1 and the middle is 0.5.
    double
    Defines the y axis where the top is 0, the bottom is 1 and the middle is 0.5.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of an Anchor2D with the default parameters
    Anchor2D(double horizontal, double vertical)
    Creates a new instance of an Anchor2D.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • horizontal

      public double horizontal

      Defines the x axis where the left is 0, the right is 1 and the middle is 0.5. The default value is 0.5.

    • vertical

      public double vertical

      Defines the y axis where the top is 0, the bottom is 1 and the middle is 0.5. The default value is 0.5.

  • Constructor Details

    • Anchor2D

      public Anchor2D()

      Creates a new instance of an Anchor2D with the default parameters

    • Anchor2D

      public Anchor2D(double horizontal, double vertical)

      Creates a new instance of an Anchor2D.

      Parameters:
      horizontal -

      Defines the x axis where the left is 0, the right is 1 and the middle is 0.5.

      vertical -

      Defines the y axis where the top is 0, the bottom is 1 and the middle is 0.5.

  • Method Details