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.9.0
Constructors
Name | Description |
---|---|
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
Name | Type | Access | Description |
---|---|---|---|
empty [static] | Point | r | Gets a new instance of the Point structure that has Point.x and Point.y values set to zero. |
is_empty | bool | r | Gets a value indicating whether this Point is empty. |
x | int | r/w | Gets or sets the x-coordinate of this Point. |
y | int | r/w | Gets or sets the y-coordinate of this Point. |
Methods
Name | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
dw | int | A 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:
Parameter | Type | Description |
---|---|---|
size | Size | Contains the new point coordinates. |
Constructor: Point(x, y)
Point(x, y)
Initializes a new instance of the Point structure with the specified coordinates.
Parameters:
Parameter | Type | Description |
---|---|---|
x | int | The horizontal position of the point. |
y | int | The vertical position of the point. |
Method: add(point, size) [static]
add(point, size)
Adds the specified Size to the specified Point.
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Point to add to. |
size | Size | The Size to add to the |
Returns
Type | Description |
---|---|
Point | The 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:
Parameter | Type | Description |
---|---|---|
point | PointF | The PointF to convert. |
Returns
Type | Description |
---|---|
Point | The Point this method converts to. |
Method: offset(dx, dy)
offset(dx, dy)
Translates this Point by the specified amount.
Parameters:
Parameter | Type | Description |
---|---|---|
dx | int | The amount to offset the x-coordinate. |
dy | int | The amount to offset the y-coordinate. |
Method: offset(point)
offset(point)
Translates this Point by the specified Point.
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The 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:
Parameter | Type | Description |
---|---|---|
point | PointF | The PointF to convert. |
Returns
Type | Description |
---|---|
Point | The 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:
Parameter | Type | Description |
---|---|---|
point | Point | The Point to be subtracted from. |
size | Size | The Size to subtract from the |
Returns
Type | Description |
---|---|
Point | The 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:
Parameter | Type | Description |
---|---|---|
point | PointF | The PointF to convert. |
Returns
Type | Description |
---|---|
Point | The Point this method converts to. |