Point Class

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

Module: aspose.psd

Full Name: aspose.psd.Point

Aspose.PSD Version: 24.4.0

Constructors

NameDescription
Point()Initializes a new instance of the Point class
Point(dw)Initializes a new instance of the Point structure using coordinates specified by an integer value.
Point(size)Initializes a new instance of the Point structure from the Size structure.
Point(x, y)Initializes a new instance of the Point structure with the specified coordinates.

Properties

NameTypeAccessDescription
empty [static]PointrGets a new instance of the Point structure that has Point.x and Point.y values set to zero.
is_emptyboolrGets a value indicating whether this Point is empty.
xintr/wGets or sets the x-coordinate of this Point.
yintr/wGets or sets the y-coordinate of this Point.

Methods

NameDescription
add(point, size)Adds the specified Size to the specified Point.
ceiling(point)Converts the specified PointF to a Point by rounding the values of the PointF to the next higher integer values.
offset(dx, dy)Translates this Point by the specified amount.
offset(point)Translates this Point by the specified Point.
round(point)Converts the specified PointF to a Point object by rounding the Point values to the nearest integer.
subtract(point, size)Returns the result of subtracting specified Size from the specified Point.
truncate(point)Converts the specified PointF to a Point by truncating the values of the Point.

Constructor: Point()

 Point() 

Initializes a new instance of the Point class

Constructor: Point(dw)

 Point(dw) 

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

Parameters:

ParameterTypeDescription
dwintA 32-bit integer that specifies the coordinates for the new point.

Constructor: Point(size)

 Point(size) 

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

Parameters:

ParameterTypeDescription
sizeSizeContains the new point coordinates.

Constructor: Point(x, y)

 Point(x, y) 

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

Parameters:

ParameterTypeDescription
xintThe horizontal position of the point.
yintThe vertical position of the point.

Method: add(point, size) [static]

 add(point, size) 

Adds the specified Size to the specified Point.

Parameters:

ParameterTypeDescription
pointPointThe Point to add to.
sizeSizeThe Size to add to the .

Returns

TypeDescription
PointThe Point that is the result of the addition operation.

Method: ceiling(point) [static]

 ceiling(point) 

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

Parameters:

ParameterTypeDescription
pointPointFThe PointF to convert.

Returns

TypeDescription
PointThe Point this method converts to.

Method: offset(dx, dy)

 offset(dx, dy) 

Translates this Point by the specified amount.

Parameters:

ParameterTypeDescription
dxintThe amount to offset the x-coordinate.
dyintThe amount to offset the y-coordinate.

Method: offset(point)

 offset(point) 

Translates this Point by the specified Point.

Parameters:

ParameterTypeDescription
pointPointThe Point used to offset this Point.

Method: round(point) [static]

 round(point) 

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

Parameters:

ParameterTypeDescription
pointPointFThe PointF to convert.

Returns

TypeDescription
PointThe Point this method converts to.

Method: subtract(point, size) [static]

 subtract(point, size) 

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

Parameters:

ParameterTypeDescription
pointPointThe Point to be subtracted from.
sizeSizeThe Size to subtract from the .

Returns

TypeDescription
PointThe Point that is the result of the subtraction operation.

Method: truncate(point) [static]

 truncate(point) 

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

Parameters:

ParameterTypeDescription
pointPointFThe PointF to convert.

Returns

TypeDescription
PointThe Point this method converts to.