GraphicsDpi.GetGraphicsDpi(Graphics) Method

Gets the DPI value corresponding to the unit of measure of the specified Graphics object.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Data.v20.2.dll


public static float GetGraphicsDpi(
    Graphics gr
Public Shared Function GetGraphicsDpi(
    gr As Graphics
) As Single


Name Type Description
gr Graphics

A Graphics object.


Type Description

A Single value.


If the PageUnit property of the specified Graphics object is equal to GraphicsUnit.Display, this method returns the DpiX property value of this Graphics object.

Otherwise, this method calls the GraphicsDpi.UnitToDpi method with the PageUnit property value of this Graphics object passed as a parameter.

See Also