PDFsharp-net6

XSize

Namespace: PdfSharp.Drawing

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

public struct XSize

Inheritance ObjectValueTypeXSize
Implements IFormattable

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

IsEmpty

Gets a value indicating whether this instance is empty.

public bool IsEmpty { get; }

Property Value

Boolean

Width

Gets or sets the width.

public double Width { get; set; }

Property Value

Double

Height

Gets or sets the height.

public double Height { get; set; }

Property Value

Double

Constructors

XSize(Double, Double)

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

XSize(double width, double height)

Parameters

width Double

height Double

Methods

Equals(XSize, XSize)

Indicates whether these two instances are equal.

bool Equals(XSize size1, XSize size2)

Parameters

size1 XSize

size2 XSize

Returns

Boolean

Equals(Object)

Indicates whether this instance and a specified object are equal.

bool Equals(object o)

Parameters

o Object

Returns

Boolean

Equals(XSize)

Indicates whether this instance and a specified size are equal.

bool Equals(XSize value)

Parameters

value XSize

Returns

Boolean

GetHashCode()

Returns the hash code for this instance.

int GetHashCode()

Returns

Int32

Parse(String)

Parses the size from a string.

XSize Parse(string source)

Parameters

source String

Returns

XSize

ToXPoint()

Converts this XSize to an XPoint.

XPoint ToXPoint()

Returns

XPoint

ToXVector()

Converts this XSize to an XVector.

XVector ToXVector()

Returns

XVector

ToString()

Converts this XSize to a human readable string.

string ToString()

Returns

String

ToString(IFormatProvider)

Converts this XSize to a human readable string.

string ToString(IFormatProvider provider)

Parameters

provider IFormatProvider

Returns

String

ConvertToString(String, IFormatProvider)

string ConvertToString(string format, IFormatProvider provider)

Parameters

format String

provider IFormatProvider

Returns

String