[fpc-devel] TFPCustomCanvas Expanded Clipping
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Wed Dec 7 10:31:48 CET 2011
On Wed, Dec 7, 2011 at 9:28 AM, zeljko <zeljko at holobit.net> wrote:
> Note that xxx_boundingRect() functions of qt are marked as slow (I guess
> it's case when you deal with eg 1000 rects in region and you must calculate
> lower TopLeft and high BottomRight) in their docs, I hope that we'll have
> faster ones :)
Regions with thousands of rectangles look something extremely exotic
to me, unless qt regions work internally by reducing all regions to a
series of rectangles.
But we will have real poligonal regions implemented, which allow for
arbitrary paths via a transformation. I already use this for drawing
poligons in TLazCanvas, so we already have IsPointInRegion for
poligons implemented according to:
http://www.visibone.com/inpoly/inpoly.c.txt
http://www.visibone.com/inpoly/
So we can reduce all regions to a small amount of poligons. I never
measured to know if IsPointInRegion is faster via 100s of rectangles
or via poligon, but unless via poligons is dramatically slower I would
definitively not want to change into the 100s of rectangles way.
--
Felipe Monteiro de Carvalho
More information about the fpc-devel
mailing list