Table of Contents

Method PixelToDip

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

PixelToDip(SizeI, double?)

Converts SizeI to device-independent units.

public static SizeD PixelToDip(SizeI value, double? scaleFactor = null)

Parameters

value SizeI

SizeI in pixels.

scaleFactor double?

Scale factor used for the conversion. Optional. If not specified, default value is used.

Returns

SizeD

PixelToDip(RectI[], double?)

Converts array of RectI to device-independent units.

public static RectD[] PixelToDip(RectI[] rects, double? scaleFactor = null)

Parameters

rects RectI[]

Array of RectI in pixels.

scaleFactor double?

Scale factor used for the conversion. Optional. If not specified, default value is used.

Returns

RectD[]

PixelToDip(PointI, double?)

Converts PointI to device-independent units.

public static PointD PixelToDip(PointI value, double? scaleFactor = null)

Parameters

value PointI

PointI in pixels.

scaleFactor double?

Scale factor used for the conversion. Optional. If not specified, default value is used.

Returns

PointD

PixelToDip(RectI, double?)

Converts RectI to device-independent units.

public static RectD PixelToDip(RectI value, double? scaleFactor = null)

Parameters

value RectI

RectI in pixels.

scaleFactor double?

Scale factor used for the conversion. Optional. If not specified, default value is used.

Returns

RectD

PixelToDip(int, double?)

Converts pixels to device-independent units.

public static double PixelToDip(int value, double? scaleFactor = null)

Parameters

value int

Value in pixels.

scaleFactor double?

Scale factor.

Returns

double