Table of Contents

Struct XFontStretch

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Describes the degree to which a font has been stretched compared to the normal aspect ratio of that font.

public readonly struct XFontStretch : IFormattable
Implements
Inherited Members

Methods

Compare(XFontStretch, XFontStretch)

Compares two instances of System.Windows.XFontStretch objects.

public static int Compare(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

The first System.Windows.XFontStretch object to compare.

right XFontStretch

The second System.Windows.XFontStretch object to compare.

Returns

int

An int value that represents the relationship between the two instances of System.Windows.XFontStretch.

Equals(XFontStretch)

Compares a System.Windows.XFontStretch object with the current System.Windows.XFontStretch object.

public bool Equals(XFontStretch obj)

Parameters

obj XFontStretch

The instance of the System.Windows.XFontStretch object to compare for equality.

Returns

bool

true if two instances are equal; otherwise, false.

Equals(object?)

Compares a object with the current System.Windows.XFontStretch object.

public override bool Equals(object? obj)

Parameters

obj object

The instance of the object to compare for equality.

Returns

bool

true if two instances are equal; otherwise, false.

FromOpenTypeStretch(int)

Creates a new instance of System.Windows.XFontStretch that corresponds to the OpenType usStretchClass value.

public static XFontStretch FromOpenTypeStretch(int stretchValue)

Parameters

stretchValue int

An integer value between one and nine that corresponds to the usStretchValue definition in the OpenType specification.

Returns

XFontStretch

A new instance of System.Windows.XFontStretch.

GetHashCode()

Retrieves the hash code for this object.

public override int GetHashCode()

Returns

int

An int value representing the hash code for the object.

ToOpenTypeStretch()

Returns a value that represents the OpenType usStretchClass for this System.Windows.XFontStretch object.

public int ToOpenTypeStretch()

Returns

int

An integer value between 1 and 999 that corresponds to the usStretchClass definition in the OpenType specification.

ToString()

Creates a string representation of the current System.Windows.XFontStretch object based on the current culture.

public override string ToString()

Returns

string

A string value representation of the object.

Operators

operator ==(XFontStretch, XFontStretch)

Compares two instances of System.Windows.XFontStretch for equality.

public static bool operator ==(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

First instance of System.Windows.XFontStretch to compare.

right XFontStretch

Second instance of System.Windows.XFontStretch to compare.

Returns

bool

true when the specified System.Windows.XFontStretch objects are equal; otherwise, false.

operator >(XFontStretch, XFontStretch)

Evaluates two instances of System.Windows.XFontStretch to determine if one instance is greater than the other.

public static bool operator >(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

First instance of System.Windows.XFontStretch to compare.

right XFontStretch

Second instance of System.Windows.XFontStretch to compare.

Returns

bool

true if left is greater than right; otherwise, false.

operator >=(XFontStretch, XFontStretch)

Evaluates two instances of System.Windows.XFontStretch to determine whether one instance is greater than or equal to the other.

public static bool operator >=(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

The first instance of System.Windows.XFontStretch to compare.

right XFontStretch

The second instance of System.Windows.XFontStretch to compare.

Returns

bool

true if left is greater than or equal to right; otherwise, false.

operator !=(XFontStretch, XFontStretch)

Evaluates two instances of System.Windows.XFontStretch to determine inequality.

public static bool operator !=(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

The first instance of System.Windows.XFontStretch to compare.

right XFontStretch

The second instance of System.Windows.XFontStretch to compare.

Returns

bool

false if left is equal to right; otherwise, true.

operator <(XFontStretch, XFontStretch)

Evaluates two instances of System.Windows.XFontStretch to determine whether one instance is less than the other.

public static bool operator <(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

The first instance of System.Windows.XFontStretch to compare.

right XFontStretch

The second instance of System.Windows.XFontStretch to compare.

Returns

bool

true if left is less than right; otherwise, false.

operator <=(XFontStretch, XFontStretch)

Evaluates two instances of System.Windows.XFontStretch to determine whether one instance is less than or equal to the other.

public static bool operator <=(XFontStretch left, XFontStretch right)

Parameters

left XFontStretch

The first instance of System.Windows.XFontStretch to compare.

right XFontStretch

The second instance of System.Windows.XFontStretch to compare.

Returns

bool

true if left is less than or equal to right; otherwise, false.