Table of Contents

Method Convert

Namespace
LMKit.Graphics.Geometry
Assembly
LM-Kit.NET.dll

Convert(double, UnitMode, UnitMode, double)

Converts a numeric value from one UnitMode to another.

public static double Convert(double value, UnitMode from, UnitMode to, double dpi = 96)

Parameters

value double

The value to convert.

from UnitMode

The unit of value.

to UnitMode

The target unit for the result.

dpi double

Dots per inch used for pixel-based conversions. Defaults to 96 (LM-Kit view space). Ignored for conversions that do not involve pixels or DIP.

Returns

double

The converted value expressed in the to unit.

Exceptions

ArgumentOutOfRangeException

Thrown if dpi is not positive or an unknown unit is provided.