Enum UnitMode
- Namespace
- LMKit.Graphics.Primitives
- Assembly
- LM-Kit.NET.dll
Selects the measurement unit used by geometry, drawing, layout, and rendering APIs.
public enum UnitMode
Fields
Pixels = 0Device pixels of the current raster target (image, surface, or display).
One pixel corresponds to one sample in the bitmap. Conversions from absolute units depend on the effective DPI of the raster target. Use this for direct bitmap operations and final render outputs.
DeviceIndependentPixels = 1Device-independent pixel (DIP), defined as 1/96 of an inch.
In LM-Kit’s normalized view space (96 DPI), 1 DIP == 1 pixel. Prefer this for DPI-stable layout and geometry when you want sizes to be independent of the output device’s resolution.
Points = 2Typographic point, defined as 1/72 of an inch.
Common in page composition and document formats. Use for PDF/OpenXML page metrics and font-related sizes. At 96 DPI, 1 pt equals 96/72 ≈ 1.3333 pixels.
Inches = 3Inch (in), absolute physical length.
1 in = 25.4 mm = 2.54 cm = 72 pt = 96 DIP (in LM-Kit’s 96 DPI view space).
Millimeters = 4Millimeter (mm), absolute physical length.
1 mm = 0.1 cm = 1/25.4 in.
Centimeters = 5Centimeter (cm), absolute physical length.
1 cm = 10 mm = 0.3937 in.
Remarks
Absolute units (Inches, Millimeters, Centimeters, Points) are DPI-independent. Relative units (Pixels, DeviceIndependentPixels) scale with the target DPI. By convention, LM-Kit uses a normalized 96 DPI “view space”, so 1 DIP equals 1 pixel at 96 DPI.