Search Results for

    Show / Hide Table of Contents

    Class ElementPosition

    Represents the position of an element with horizontal and vertical coordinates.

    Inheritance
    System.Object
    ElementPosition
    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.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronWord to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWord free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.