Class Anchor2D

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

  • public final class Anchor2D
    extends java.lang.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 horizontal
      Defines the x axis where the left is 0, the right is 1 and the middle is 0.5.
      double vertical
      Defines the y axis where the top is 0, the bottom is 1 and the middle is 0.5.
    • Constructor Summary

      Constructors 
      Constructor Description
      Anchor2D()
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

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

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

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

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object