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

Declaration

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

Parameters

Name Type Description
gr Graphics

A Graphics object.

Returns

Type Description
Single

A Single value.

Remarks

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