[fpc-devel] TFPCustomCanvas Expanded Clipping

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Nov 30 15:35:54 CET 2011


On Wed, Nov 30, 2011 at 3:24 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> What's the purpose of defining a clipping region, when the drawing pritives
> don't respect it?

The clipping region is enforced in:

procedure SetColor (x,y:integer; const AValue:TFPColor); override;

Probably not the fastest way to do it, but it works very well. And it
is fast for rectangular regions, so only for less common use cases
(like fpvectorial rendering postscript) it gets slower.

One can also optimize on a per-primitive basis later on. Line()
already has such an optimization in fcl-line but this optimization
conflicted with my non-rectangular region support =) So that's yet
another reason why I want to make a change here.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list