[fpc-devel] TFPCustomCanvas Expanded Clipping

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Nov 30 13:33:05 CET 2011


Felipe Monteiro de Carvalho schrieb:

> I am facing a problem with clipping in TFPCustomCanvas because it has
> these properties:
> 
>     property ClipRect : TRect read GetClipRect write SetClipRect;
>     property Clipping : boolean read GetClipping write SetClipping;
> 
> Which obviously is not extensible for non-rectangular formats. I
> already have written my own extensible and object oriented clipper,
> but I'm unsure how to properly integrate it into TFPCustomCanvas.

What's the purpose of your clipper?

IMO the window manager uses an update region internally, from which one 
or more paint requests are generated, for rectangular ClipRects.

User code can reduce the ClipRect (or region) further, when a certain 
area (control) is painted, and output outside the control's bounds 
should be suppressed.

I'm not sure how far non-rectangular clipping regions are supported by 
all widgetsets, and wouldn't rely on such a capability.

DoDi




More information about the fpc-devel mailing list