Class PointI

java.lang.Object
com.compdfkit.core.android.graphics.PointI

public class PointI extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    PointI(int x, int y)
     
    Create a new PointI initialized with the values in the specified PointI (which is left unmodified).
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(int x, int y)
    Returns true if the point's coordinates equal (x,y)
    boolean
     
    int
     
    final float
    Return the euclidian distance from (0,0) to the point
    static float
    length(int x, int y)
    Returns the euclidian distance from (0,0) to (x,y)
    final void
     
    final void
    offset(float dx, float dy)
     
    final void
    set(int x, int y)
    Set the point's x and y coordinates
    final void
    Set the point's x and y coordinates to the coordinates of p
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      public int x
    • y

      public int y
  • Constructor Details

    • PointI

      public PointI()
    • PointI

      public PointI(int x, int y)
    • PointI

      public PointI(PointI p)
      Create a new PointI initialized with the values in the specified PointI (which is left unmodified).
      Parameters:
      p - The point whose values are copied into the new point.
  • Method Details

    • set

      public final void set(int x, int y)
      Set the point's x and y coordinates
    • set

      public final void set(PointI p)
      Set the point's x and y coordinates to the coordinates of p
    • negate

      public final void negate()
    • offset

      public final void offset(float dx, float dy)
    • equals

      public final boolean equals(int x, int y)
      Returns true if the point's coordinates equal (x,y)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • length

      public final float length()
      Return the euclidian distance from (0,0) to the point
    • length

      public static float length(int x, int y)
      Returns the euclidian distance from (0,0) to (x,y)