[fpc-devel] TFPCustomCanvas Expanded Clipping

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Dec 7 09:45:55 CET 2011



On Wed, 7 Dec 2011, Felipe Monteiro de Carvalho wrote:

> On Wed, Nov 30, 2011 at 10:35 AM,  <michael.vancanneyt at wisa.be> wrote:
>> Good basics.
>>
>> What about the following:
>>
>> Create TBaseClipRegion with abstract method PointIsInRegion(P : TPoint)
>> (and maybe some others, like line intersections or so).
>
> Indeed good idea, I am implementing like that with slightly different
> names (TFPCustomRegion and IsPointInRegion).
>
> And what about adding virtual to many drawing methods in
> TFPCustomCanvas? This way TCanvas could override them more cleanly
> without the need to hide them.
>
> I know that the design is to make people implement DoRectangle, etc,
> instead, but I can clearly see a case for changing more directly the
> behavior. Also fcl-image comes without debug info, so removing the
> methods from TCanvas would bring a debugging annoyance.

At first sight I would think this is not a good proposal, because it was a
conscious decision to do it the way it is done now.

But first please explain what you mean with "This way TCanvas could override
them more cleanly without the need to hide them." ?

Michael.



More information about the fpc-devel mailing list