This documentation is for the old version. Go to the latest Graphics Mill docs

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

Visual Basic
Public Shared Function ConvertPixelsToUnits ( _
	resolution As Single, _
	sourceValue As Integer, _
	destinationUnit As Unit _
) As Single
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