FMX.Graphics.TCanvas.ExcludeClipRect
Delphi
procedure ExcludeClipRect(const ARect: TRectF); virtual; abstract;
C++
virtual void __fastcall ExcludeClipRect(const System::Types::TRectF &ARect) = 0 ;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TCanvas |
Description
Excludes a rectangle area from the clipping area of TCanvas.
ExcludeClipRect is implemented by TCanvas descendants to exclude a specified rectangle area from the drawing area of the TCanvas.
The ARect
parameter specifies the rectangle area to be excluded, in which drawing has no effect.
If ARect
is empty, ExcludeClipRect does nothing. It does not raise any errors.
Note: The clipping rectangle only operates if the canvas state is first saved using SaveState. For example:
var
MyCanvas: TCanvas;
Save: TCanvasSaveState;
MyRect : TRectF;
begin
try
Save := MyCanvas.SaveState;
// Create the clipping rectangle
MyRect.Create (20, 20, 100, 100);
MyCanvas.ExcludeClipRect (MyRect);
// Do your drawing here
finally
MyCanvas.RestoreState(Save);
end;
end;