Skip to main content
Pie
ra0

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCanvas.CopyRect(TRect,TCanvas,TRect) Method

Draws a portion of a VCL canvas on the current canvas.

#Declaration

Delphi
procedure CopyRect(const Dest: TRect; ACanvas: TCanvas; const Source: TRect);

#Parameters

Name Type
Dest TRect
ACanvas TCanvas
Source TRect

#Remarks

Call this procedure and pass a source VCL canvas as the ACanvas parameter. Use the Source and Dest parameters to specify a rectangular portion of the source canvas and the target area of the current canvas. The CopyRect procedure uses the active bitmap draw mode and stretches or shrinks the copied portion if the source and destination rectangles do not match in size.

If you need to copy content between GDI-based DevExpress canvas, use the Canvas property of the source canvas in a CopyRect procedure call. The following code example copies the ARect2 rectangle from the cxCanvas2 canvas to the ARect1 rectangle on the cxCanvas1 canvas:

cxCanvas1.CopyRect(ARect1, cxCanvas2.Canvas, ARect2);

Note

The CopyRect procedure calls the CopyRect procedure for the underlying canvas.

See Also