[fpc-devel] TFPCustomCanvas Expanded Clipping
Sven Barth
pascaldragon at googlemail.com
Wed Nov 30 13:39:14 CET 2011
Am 30.11.2011 13:33, schrieb Hans-Peter Diettrich:
> 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.
You are aware that TFPCustomCanvas can be used for widgetset independant
canvases as well? Also Felipe said that he'll need it for his
fpvectorial project (which is also widgetset independant).
Regards,
Sven
More information about the fpc-devel
mailing list