The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Box

PageCanvas Class

Encapsulates the layout drawing surface.

Namespace: DevExpress.XtraRichEdit.API.Layout

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

public abstract class PageCanvas
Public MustInherit Class PageCanvas
public abstract class PageCanvas
Public MustInherit Class PageCanvas
public abstract class PageCanvas
Public MustInherit Class PageCanvas

Remarks

The PageCanvas class provides methods for drawing objects in the document layout.

Use the PagePainter.Canvas property to obtain the PageCanvas object in overridden methods of the PagePainter descendant.

Use the BeforePagePaintEventArgs.Canvas property to access the PageCanvas object and perform a custom draw in the BeforePagePaint event handler.

The PageCanvas enables you to draw lines and shapes, with the specific Draw_GraphicalElement_ method. You can also draw images with the PageCanvas.DrawImage method and text with the PageCanvas.DrawString method.

For complex drawings, you may need to convert the document units of measurement to the units used in layout drawings. The PageCanvas.ConvertToDrawingLayoutUnits method is implemented to accomplish this task.

Examples

This code snippet illustrates the implementation of a PagePainter descendant. It draws color rectangles in place of the words and labels a floating picture with a text string drawn over it.

Public Class MyLayoutPainter
    Inherits PagePainter

Inheritance

Object
PageCanvas
See Also