Skip to main content

GraphicsDpi.UnitToDpi(GraphicsUnit) Method

Converts the specified unit of measure to a corresponding DPI value.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Data.v24.2.dll

Declaration

public static float UnitToDpi(
    GraphicsUnit unit
)

Parameters

Name Type Description
unit GraphicsUnit

A GraphicsUnit enumeration value.

Returns

Type Description
Single

A Single value.

Remarks

When the unit parameter value is equal to Pixel or World, this method returns the GraphicsDpi.Pixel value. To obtain a GraphicsDpi.DeviceIndependentPixel value instead, use the GraphicsDpi.UnitToDpiI method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UnitToDpi(GraphicsUnit) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also