Class PointM

All Implemented Interfaces:
Geometry, PointTypeGeometry, Rotated, Serializable, Cloneable

public class PointM extends Point implements Rotated
See Also:
  • Constructor Details

    • PointM

      public PointM(Point point)
    • PointM

      public PointM(double x, double y)
  • Method Details

    • getBounds

      public Rectangle getBounds()
      Description copied from interface: Geometry
      Returns the minimum bounding rectangle of this geometry.
      Specified by:
      getBounds in interface Geometry
      Returns:
      the bounding box of this geometry.
    • serialize

      public Point[] serialize()
      Description copied from interface: Geometry
      Returns this geometry as an array of Point.
      Specified by:
      serialize in interface Geometry
      Returns:
      this geometry as an array of Point.
    • sizeOf

      public int sizeOf()
      Description copied from interface: Geometry
      Returns an approximation in bytes of the memory used by this geometry.
      Specified by:
      sizeOf in interface Geometry
      Returns:
      the memory used by this geometry.
    • getX

      public double getX()
      Description copied from class: Point
      Returns the X coordinate of this Point in double precision.
      Specified by:
      getX in class Point
      Returns:
      the X coordinate of this Point.
    • getY

      public double getY()
      Description copied from class: Point
      Returns the Y coordinate of this Point in double precision.
      Specified by:
      getY in class Point
      Returns:
      the Y coordinate of this Point.
    • setX

      public void setX(double x)
      Description copied from class: Point
      Returns the X coordinate of this Point in double precision.
      Specified by:
      setX in class Point
      Parameters:
      x - the X coordinate of this Point.
    • setY

      public void setY(double y)
      Description copied from class: Point
      Sets the Y coordinate of this Point in double precision.
      Specified by:
      setY in class Point
      Parameters:
      y - the Y coordinate of this Point.
    • setLocation

      public void setLocation(double x, double y)
      Description copied from class: Point
      Sets the location of this Point to the specified double coordinates.
      Specified by:
      setLocation in class Point
      Parameters:
      x - x the X coordinate of this Point.
      y - y the Y coordinate of this Point.
    • translate

      public void translate(double dx, double dy)
      Description copied from class: Point
      Translates the point by the specified offset
      Specified by:
      translate in interface Geometry
      Specified by:
      translate in class Point
      Parameters:
      dx - x value of the translation
      dy - y value of the translation
    • getAngle

      public float getAngle()
      Specified by:
      getAngle in interface Rotated
    • setAngle

      public void setAngle(float angle)
      Specified by:
      setAngle in interface Rotated
    • equals

      public boolean equals(Object o)
      Description copied from class: Point
      Determines whether two points are equal. Two instances of Point are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.
      Overrides:
      equals in class Point
      Parameters:
      o - an object to be compared with this Point
      Returns:
      true if the object to be compared is an instance of Point and has the same values; false otherwise.
    • clone

      public PointM clone()
      Description copied from class: Point
      Clones this geometry.
      Specified by:
      clone in interface Geometry
      Specified by:
      clone in class Point
      Returns:
      a deep copy of the current geometry.