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
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. | 
| 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:
| 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 point. | 
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: 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:
| Parameter | Type | Description | 
|---|---|---|
| dw | int | A 32-bit integer that specifies the coordinates for the new point. | 
Returns
| Type | Description | 
|---|---|
| Point | 
Method: create_from_size(size) [static]
 create_from_size(size) 
Initializes a new instance of the Point structure from the Size structure.
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| size | Size | Contains the new point coordinates. | 
Returns
| Type | Description | 
|---|---|
| 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:
| Parameter | Type | Description | 
|---|---|---|
| packed_point | int | The Point object packed into one long value. | 
| x | int[] | The extracted from the packed Point X value. | 
| y | int[] | The extracted from the packed Point Y value. | 
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 point. | 
Returns
| Type | Description | 
|---|---|
| Point | The 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
| Type | Description | 
|---|---|
| int | The 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:
| Parameter | Type | Description | 
|---|---|---|
| point | PointF | The PointF to convert. | 
Returns
| Type | Description | 
|---|---|
| Point | The Point this method converts to. |