Class ElementPosition
Represents the position of an element with horizontal and vertical coordinates.
Inheritance
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class ElementPosition : Object
Constructors
ElementPosition()
Declaration
public ElementPosition()
Properties
X
Gets or sets the horizontal coordinate (X) of the element measured in points (1 inch = 72 points).
Declaration
public int X { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
The X coordinate is automatically converted to points (1 inch = 72 points) when getting or setting the value.
Y
Gets or sets the vertical coordinate (Y) of the element measured in points (1 inch = 72 points).
Declaration
public int Y { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
The Y coordinate is automatically converted to points (1 inch = 72 points) when getting or setting the value.
Methods
GetXPosition(MeasurementUnit)
Gets the horizontal coordinate (X) of the element in the specified measurement unit.
Declaration
public double GetXPosition(MeasurementUnit measurementUnit)
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | measurementUnit | The desired unit of measurement. |
Returns
| Type | Description |
|---|---|
| System.Double | The horizontal coordinate in the specified measurement unit. |
GetYPosition(MeasurementUnit)
Gets the vertical coordinate (Y) of the element in the specified measurement unit.
Declaration
public double GetYPosition(MeasurementUnit measurementUnit)
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | measurementUnit | The desired unit of measurement. |
Returns
| Type | Description |
|---|---|
| System.Double | The vertical coordinate in the specified measurement unit. |
SetXPosition(Double, MeasurementUnit)
Sets the horizontal coordinate (X) of the element using the specified value and measurement unit.
Declaration
public void SetXPosition(double x, MeasurementUnit measurementUnit)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | x | The horizontal coordinate value. |
| MeasurementUnit | measurementUnit | The unit of measurement for the provided value. |
SetYPosition(Double, MeasurementUnit)
Sets the vertical coordinate (Y) of the element using the specified value and measurement unit.
Declaration
public void SetYPosition(double y, MeasurementUnit measurementUnit)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | y | The vertical coordinate value. |
| MeasurementUnit | measurementUnit | The unit of measurement for the provided value. |