Table of Contents

Method PixelFromDip

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

PixelFromDip(float?)

Converts the current dimensions from device-independent pixels (DIPs) to physical pixels.

public readonly SizeI PixelFromDip(float? scaleFactor = null)

Parameters

scaleFactor float?

An optional scaling factor to use for the conversion. If null, the default scaling factor is applied.

Returns

SizeI

A SizeI representing the dimensions in physical pixels.

Remarks

This method is useful for scenarios where precise pixel dimensions are required, such as rendering or layout calculations.