Point Class

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

Module: aspose.imaging

Full Name: aspose.imaging.Point

Aspose.Imaging Version: 24.5.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.
create_from_d_word(dw)Initializes a new instance of the Point structure using coordinates specified by an integer value.
create_from_size(size)Initializes a new instance of the Point structure from the Size structure.
from_long(packed_point, x, y)Deconstruct a Point object packed into a long object to separate X and Y int 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.
to_long()Convert this Point to a single long value, containing X and Y coordinates in high and low bits.
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 point.

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: create_from_d_word(dw) [static]

 create_from_d_word(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.

Returns

TypeDescription
Point

Method: create_from_size(size) [static]

 create_from_size(size) 

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

Parameters:

ParameterTypeDescription
sizeSizeContains the new point coordinates.

Returns

TypeDescription
Point

Method: from_long(packed_point, x, y) [static]

 from_long(packed_point, x, y) 

Deconstruct a Point object packed into a long object to separate X and Y int values.

Parameters:

ParameterTypeDescription
packed_pointlongThe Point object packed into one long value.
xint[]The extracted from the packed Point X value.
yint[]The extracted from the packed Point Y value.

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 point.

Returns

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

Method: to_long()

 to_long() 

Convert this Point to a single long value, containing X and Y coordinates in high and low bits.

Returns

TypeDescription
longThe Point object packed into one long value.

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.