XUnit StructureTerminal Works - PDF Printing.Net Library
Represents a value and its unit of measure. The structure converts implicitly from and to double with a value measured in point.

Namespace: PdfEdit.Drawing
Assembly: PdfPrintingNet (in PdfPrintingNet.dll) Version: 5.1.1.0 (5.1.1.0)
Syntax

public struct XUnit : IFormattable

The XUnit type exposes the following members.

Constructors

  NameDescription
Public methodXUnit(Double)
Initializes a new instance of the XUnit class with type set to point.
Public methodXUnit(Double, XGraphicsUnit)
Initializes a new instance of the XUnit class.
Top
Methods

  NameDescription
Public methodConvertType
Converts an existing object from one unit into another unit type.
Public methodEquals
Calls base class Equals.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberFromCentimeter
Returns an XUnit object. Sets type to centimeters.
Public methodStatic memberFromInch
Returns an XUnit object. Sets type to inch.
Public methodStatic memberFromMillimeter
Returns an XUnit object. Sets type to millimeters.
Public methodStatic memberFromPoint
Returns an XUnit object. Sets type to point.
Public methodStatic memberFromPresentation
Returns an XUnit object. Sets type to Presentation.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberParse
This member is intended to be used by XmlDomainObjectReader only.
Public methodToString
Returns the object as string. The unit of measure is appended to the end of the string.
(Overrides ValueTypeToString.)
Public methodToString(IFormatProvider)
Returns the object as string using the format information. The unit of measure is appended to the end of the string.
Top
Operators

  NameDescription
Public operatorStatic memberEquality
Memberwise comparison. To compare by value, use code like Math.Abs(a.Pt - b.Pt) < 1e-5.
Public operatorStatic member(Double to XUnit)
Converts a double to an XUnit object with type set to point.
Public operatorStatic member(Int32 to XUnit)
Converts an int to an XUnit object with type set to point.
Public operatorStatic member(String to XUnit)
Converts a string to an XUnit object. If the string contains a suffix like 'cm' or 'in' the object will be converted to the appropriate type, otherwise point is assumed.
Public operatorStatic member(XUnit to Double)
Returns a double value as point.
Public operatorStatic memberInequality
Memberwise comparison. To compare by value, use code like Math.Abs(a.Pt - b.Pt) < 1e-5.
Top
Fields

  NameDescription
Public fieldStatic memberZero
Represents a unit with all values zero.
Top
Properties

  NameDescription
Public propertyCentimeter
Gets or sets the value in centimeter.
Public propertyInch
Gets or sets the value in inch.
Public propertyMillimeter
Gets or sets the value in millimeter.
Public propertyPoint
Gets or sets the value in point.
Public propertyPresentation
Gets or sets the value in presentation units (1/96 inch).
Public propertyType
Gets the unit of measure.
Public propertyValue
Gets the raw value of the object without any conversion. To determine the XGraphicsUnit use property
Type
. To get the value in point use the implicit conversion to double.
Top
See Also

Reference