Table of Contents

Struct XSize

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Represents a pair of floating-point numbers, typically the width and height of a graphical object.

public struct XSize : IFormattable
Implements
Inherited Members

Constructors

XSize(double, double)

Initializes a new instance of the XSize class with the specified values.

public XSize(double width, double height)

Parameters

width double
height double

Properties

Empty

Returns an empty size, i.e. a size with a width or height less than 0.

public static XSize Empty { get; }

Property Value

XSize

Height

Gets or sets the height.

public double Height { get; set; }

Property Value

double

IsEmpty

Gets a value indicating whether this instance is empty.

public bool IsEmpty { get; }

Property Value

bool

Width

Gets or sets the width.

public double Width { get; set; }

Property Value

double

Methods

Equals(XSize)

Indicates whether this instance and a specified size are equal.

public bool Equals(XSize value)

Parameters

value XSize

Returns

bool

Equals(XSize, XSize)

Indicates whether these two instances are equal.

public static bool Equals(XSize size1, XSize size2)

Parameters

size1 XSize
size2 XSize

Returns

bool

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? o)

Parameters

o object

Returns

bool

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

Parse(string)

Parses the size from a string.

public static XSize Parse(string source)

Parameters

source string

Returns

XSize

ToString()

Converts this XSize to a human readable string.

public override string ToString()

Returns

string

ToString(IFormatProvider)

Converts this XSize to a human readable string.

public string ToString(IFormatProvider provider)

Parameters

provider IFormatProvider

Returns

string

ToXPoint()

Converts this XSize to an XPoint.

public XPoint ToXPoint()

Returns

XPoint

ToXVector()

Converts this XSize to an XVector.

public XVector ToXVector()

Returns

XVector

Operators

operator ==(XSize, XSize)

Determines whether two size objects are equal.

public static bool operator ==(XSize size1, XSize size2)

Parameters

size1 XSize
size2 XSize

Returns

bool

explicit operator XPoint(XSize)

Performs an explicit conversion from XSize to XPoint.

public static explicit operator XPoint(XSize size)

Parameters

size XSize

Returns

XPoint

explicit operator XVector(XSize)

Performs an explicit conversion from XSize to XVector.

public static explicit operator XVector(XSize size)

Parameters

size XSize

Returns

XVector

operator !=(XSize, XSize)

Determines whether two size objects are not equal.

public static bool operator !=(XSize size1, XSize size2)

Parameters

size1 XSize
size2 XSize

Returns

bool