VegaRise.NET
HomeAPI Reference
Back to DOM

UnitsEnum

Definition

Namespace
DOM.Enums
Assembly
DOM.dll

Specifies a unit of measurement used throughout the DOM.

Remarks

Used wherever a is constructed from a numeric value or when a unit name needs to be specified explicitly. The values cover the standard typographic (points, twips) and physical (inches, centimeters, millimeters) units, plus the Office-specific EMU and a special Percentage marker. DocumentUnit

Examples

csharp
1// 1. Inches
2var u = new DocumentUnit(1.0, Units.Inch);
3
csharp
1// 2. Centimeters
2var u = new DocumentUnit(2.54, Units.Cm);
3
csharp
1// 3. Points
2var u = new DocumentUnit(12, Units.Pt);
3
csharp
1// 4. EMU
2var u = new DocumentUnit(127000, Units.Emu);
3

Fields

Cm

Centimeters.

Emu

English Metric Units (EMU).

Inch

Inches.

Mm

Millimeters.

Percentage

Percentage (relative sizing).

Pt

Points (1/72 inch).

Twips

Twips (twentieths of a point).