UnitConverter.ConvertPixelsToUnits Method

Converts a value measured in pixels (device-dependent units) to specified device-independent unit.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public static float ConvertPixelsToUnits(
	float resolution,
	int sourceValue,
	Unit destinationUnit
)

Parameters

resolution

Type: System.Single

A resolution in DPI used to convert pixels to destinationUnit.
sourceValue

Type: System.Int32

A value in pixels which should be converted to destinationUnit.
destinationUnit

Type: Aurigma.GraphicsMill.Unit

A destination unit.

Return Value

A value converted to destinationUnit.

See Also

Reference