com.aspose.imaging
Class Point

java.lang.Object
  extended by 
      extended by com.aspose.imaging.Point

public class Point
extends

Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.


Constructor Summary
Point()
           
Point(int dw)
           Initializes a new instance of the Point structure using coordinates specified by an integer value.
Point(int x, int y)
           Initializes a new instance of the Point structure with the specified coordinates.
Point(Size size)
           Initializes a new instance of the Point structure from the Size structure.
 
Method Summary
static Point add(Point point, Size size)
           Adds the specified Size to the specified Point.
static Point ceiling(PointF point)
           Converts the specified PointF to a Point by rounding the values of the PointF to the next higher integer values.
 java.lang.Object clone()
           
 Point Clone()
           
 void CloneTo(Point that)
           
 boolean equals(java.lang.Object obj)
           
static boolean equals(Point obj1, Point obj2)
           
static Point getEmpty()
           Gets a new instance of the Point structure that has Point.X and Point.Y values set to zero.
 int getX()
           Gets or sets the x-coordinate of this Point.
 int getY()
           Gets or sets the y-coordinate of this Point.
 int hashCode()
           Returns a hash code for this Point.
 boolean isEmpty()
           Gets a value indicating whether this Point is empty.
 void offset(int dx, int dy)
           Translates this Point by the specified amount.
 void offset(Point point)
           Translates this Point by the specified Point.
static Point op_Addition(Point point, Size size)
           Translates a Point by a given Size.
static boolean op_Equality(Point point1, Point point2)
           Compares two Point objects.
static boolean op_Inequality(Point point1, Point point2)
           Compares two Point objects.
static Point op_Subtraction(Point point, Size size)
           Translates a Point by the negative of a given Size.
static Point round(PointF point)
           Converts the specified PointF to a Point object by rounding the Point values to the nearest integer.
 void setX(int value)
           Sets the x-coordinate of this Point.
 void setY(int value)
           Sets the y-coordinate of this Point.
static Point subtract(Point point, Size size)
           Returns the result of subtracting specified Size from the specified Point.
static PointF toPointF(Point point)
           Converts the specified Point structure to the PointF structure.
static Size toSize(Point point)
           Converts the specified Point structure to a Size structure.
 java.lang.String toString()
           Converts this Point to a human-readable string.
static Point truncate(PointF point)
           Converts the specified PointF to a Point by truncating the values of the Point.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Point

public Point()

Point

public Point(int dw)

Initializes a new instance of the Point structure using coordinates specified by an integer value.

Parameters:
dw - A 32-bit integer that specifies the coordinates for the new point.

Point

public Point(int x,
             int y)

Initializes a new instance of the Point structure with the specified coordinates.

Parameters:
x - The horizontal position of the point.
y - The vertical position of the point.

Point

public Point(Size size)

Initializes a new instance of the Point structure from the Size structure.

Parameters:
size - Contains the new point coordinates.
Method Detail

add

public static Point add(Point point,
                        Size size)

Adds the specified Size to the specified Point.

Parameters:
point - The Point to add to.
size - The Size to add to the point.
Returns:
The Point that is the result of the addition operation.

ceiling

public static Point ceiling(PointF point)

Converts the specified PointF to a Point by rounding the values of the PointF to the next higher integer values.

Parameters:
point - The PointF to convert.
Returns:
The Point this method converts to.

clone

public java.lang.Object clone()

Clone

public Point Clone()

CloneTo

public void CloneTo(Point that)

equals

public boolean equals(java.lang.Object obj)

equals

public static boolean equals(Point obj1,
                             Point obj2)

getEmpty

public static Point getEmpty()

Gets a new instance of the Point structure that has Point.X and Point.Y values set to zero.


getX

public int getX()

Gets or sets the x-coordinate of this Point.


getY

public int getY()

Gets or sets the y-coordinate of this Point.


hashCode

public int hashCode()

Returns a hash code for this Point.

Returns:
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

isEmpty

public boolean isEmpty()

Gets a value indicating whether this Point is empty.

Returns:
True if both Point.X and Point.Y are 0; otherwise, false.

offset

public void offset(int dx,
                   int dy)

Translates this Point by the specified amount.

Parameters:
dx - The amount to offset the x-coordinate.
dy - The amount to offset the y-coordinate.

offset

public void offset(Point point)

Translates this Point by the specified Point.

Parameters:
point - The Point used to offset this Point.

op_Addition

public static Point op_Addition(Point point,
                                Size size)

Translates a Point by a given Size.

Parameters:
point - The Point to translate.
size - A Size that specifies the pair of numbers to add to the coordinates of point.
Returns:
The translated Point.

op_Equality

public static boolean op_Equality(Point point1,
                                  Point point2)

Compares two Point objects. The result specifies whether the values of the Point.X and Point.Y properties of the two Point objects are equal.

Parameters:
point1 - A first Point to compare.
point2 - A second Point to compare.
Returns:
True if the Point.X and Point.Y values of point1 and point2 are equal; otherwise, false.

op_Inequality

public static boolean op_Inequality(Point point1,
                                    Point point2)

Compares two Point objects. The result specifies whether the values of the Point.X or Point.Y properties of the two Point objects are unequal.

Parameters:
point1 - A first Point to compare.
point2 - A second Point to compare.
Returns:
True if the values of either the Point.X properties or the Point.Y properties of point1 and point2 differ; otherwise, false.

op_Subtraction

public static Point op_Subtraction(Point point,
                                   Size size)

Translates a Point by the negative of a given Size.

Parameters:
point - The Point to translate.
size - A Size that specifies the pair of numbers to subtract from the coordinates of point.
Returns:
A Point structure that is translated by the negative of a given Size structure.

round

public static Point round(PointF point)

Converts the specified PointF to a Point object by rounding the Point values to the nearest integer.

Parameters:
point - The PointF to convert.
Returns:
The Point this method converts to.

setX

public void setX(int value)

Sets the x-coordinate of this Point.


setY

public void setY(int value)

Sets the y-coordinate of this Point.


subtract

public static Point subtract(Point point,
                             Size size)

Returns the result of subtracting specified Size from the specified Point.

Parameters:
point - The Point to be subtracted from.
size - The Size to subtract from the point.
Returns:
The Point that is the result of the subtraction operation.

toPointF

public static PointF toPointF(Point point)

Converts the specified Point structure to the PointF structure.

Parameters:
point - The Point to be converted.
Returns:
The PointF that results from the conversion.

toSize

public static Size toSize(Point point)

Converts the specified Point structure to a Size structure.

Parameters:
point - The Point to be converted.
Returns:
The Size that results from the conversion.

toString

public java.lang.String toString()

Converts this Point to a human-readable string.

Returns:
A System.String that represents this instance.

truncate

public static Point truncate(PointF point)

Converts the specified PointF to a Point by truncating the values of the Point.

Parameters:
point - The PointF to convert.
Returns:
The Point this method converts to.