GdiPlusImageRenderHook Class

A service enabling you to customize the GDI+ rendering process before creating report documents.

Namespace: DevExpress.Xpf.Printing

Assembly: DevExpress.Xpf.Printing.v20.1.dll

Declaration

public class GdiPlusImageRenderHook
Public Class GdiPlusImageRenderHook

Remarks

All Graphics objects are passed through the GdiPlusImageRenderHook service and can be customized. To add the service to a report's Printing System, use the PrintingSystemBase.AddService method.

The following example illustrates how to use the GdiPlusImageRenderHook class to adjust the quality of text rendering in a report document.

using DevExpress.Xpf.Printing;
// ...

private void Button_Click(object sender, System.Windows.RoutedEventArgs e) {
    XtraReport1 report = new XtraReport1();
    report.PrintingSystem.AddService(typeof(GdiPlusImageRenderHook), 
        new DelegateGdiPlusImageRenderHook(graphics => {
        graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
    }));
    PrintHelper.ShowPrintPreview(this, report);
}

Inheritance

Object
GdiPlusImageRenderHook
See Also