On Wednesday 30 of November 2011 10:35:59 michael.vancann...@wisa.be wrote:
> Create TBaseClipRegion with abstract method PointIsInRegion(P : TPoint) > (and maybe some others, like line intersections or so). > > Create a descendent TRectClipRegion with property ClipRect: TRect. > It can implement the abstract method(s). > > Then implement the ClipRegion property, as you propose. > > Setting the ClipRect property just sets ClipRegion to a TRectClipRegion > instance with the Rect filled in. (TFPCustomCanvas should own this > instance, i.e. destroy when canvas is destroyed) > > Property clipping just determines whether the ClipRegion object > is used, yes or no. > > Seems pretty straightforward to me, backwards compatible, and only a single > extra property is introduced (ClipRegion). +1. That's how qt organized it's painting (QPainter) ClipRect = bounding rect of clip region (region can have more than 1 rect eg. poly region). zeljko
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel