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.v23.1.dll

NuGet Package: DevExpress.Data


public static float UnitToDpi(
    GraphicsUnit unit


Name Type Description
unit GraphicsUnit

A GraphicsUnit enumeration value.


Type Description

A Single value.


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.


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