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.2.1.0 (5.2.1.0)
Syntax
The XUnit type exposes the following members.
Constructors
Name | Description | |
---|---|---|
XUnit(Double) |
Initializes a new instance of the XUnit class with type set to point.
| |
XUnit(Double, XGraphicsUnit) |
Initializes a new instance of the XUnit class.
|
Methods
Name | Description | |
---|---|---|
ConvertType |
Converts an existing object from one unit into another unit type.
| |
Equals |
Calls base class Equals.
(Overrides ValueTypeEquals(Object).) | |
FromCentimeter |
Returns an XUnit object. Sets type to centimeters.
| |
FromInch |
Returns an XUnit object. Sets type to inch.
| |
FromMillimeter |
Returns an XUnit object. Sets type to millimeters.
| |
FromPoint |
Returns an XUnit object. Sets type to point.
| |
FromPresentation |
Returns an XUnit object. Sets type to Presentation.
| |
GetHashCode |
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Parse |
This member is intended to be used by XmlDomainObjectReader only.
| |
ToString |
Returns the object as string. The unit of measure is appended to the end of the string.
(Overrides ValueTypeToString.) | |
ToString(IFormatProvider) |
Returns the object as string using the format information.
The unit of measure is appended to the end of the string.
|
Operators
Name | Description | |
---|---|---|
Equality |
Memberwise comparison. To compare by value,
use code like Math.Abs(a.Pt - b.Pt) < 1e-5.
| |
(Double to XUnit) |
Converts a double to an XUnit object with type set to point.
| |
(Int32 to XUnit) |
Converts an int to an XUnit object with type set to point.
| |
(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.
| |
(XUnit to Double) |
Returns a double value as point.
| |
Inequality |
Memberwise comparison. To compare by value,
use code like Math.Abs(a.Pt - b.Pt) < 1e-5.
|
Fields
Name | Description | |
---|---|---|
Zero |
Represents a unit with all values zero.
|
Properties
Name | Description | |
---|---|---|
Centimeter |
Gets or sets the value in centimeter.
| |
Inch |
Gets or sets the value in inch.
| |
Millimeter |
Gets or sets the value in millimeter.
| |
Point |
Gets or sets the value in point.
| |
Presentation |
Gets or sets the value in presentation units (1/96 inch).
| |
Type |
Gets the unit of measure.
| |
Value |
Gets the raw value of the object without any conversion.
To determine the XGraphicsUnit use property Type |
See Also