Back to Devexpress

GraphicsDpi Class

corelibraries-devexpress-dot-xtraprinting-d8c3f45a.md

latest1.9 KB
Original Source

GraphicsDpi Class

Enables you to calculate the DPI values associated with specific units of measure (and vice versa).

Namespace : DevExpress.XtraPrinting

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[JavaPartial]
public class GraphicsDpi
vb
<JavaPartial>
Public Class GraphicsDpi

Example

This example illustrates how to adjust the document margins from one DPI value (corresponding to tenths of a millimeter) to another (corresponding to device-independent pixels) by using the XRConvert.ConvertMargins method.

csharp
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...

void ConvertMargins(){ 
printableComponentLink.Margins = XRConvert.ConvertMargins(printableComponentLink.Margins, 
    GraphicsDpi.TenthsOfAMillimeter, 
    GraphicsDpi.DeviceIndependentPixel);
}
vb
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
' ...

Private Sub ConvertMargins()
    printableComponentLink.Margins = XRConvert.ConvertMargins(printableComponentLink.Margins, _ 
    GraphicsDpi.TenthsOfAMillimeter, _ 
    GraphicsDpi.DeviceIndependentPixel)
End Sub

Inheritance

Object GraphicsDpi

See Also

GraphicsDpi Members

DevExpress.XtraPrinting Namespace