[haiku-appserver] Re: another issue. ClipToPicture.

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Sun, 31 Oct 2004 23:03:43 +0200

Stefano Ceccherini wrote:
>>Well, in a drawing model that was a little better defined, in terms 
>>of
>>hit-rules, etc. these could be done in a number of ways... generating
>>paths from the primitives and then using path-based clipping, for
>>example.
>>
>>The BeOS drawing model was never unified enough to be able to do
>>something like this, so ClipToPicture instead draws into a special
>>"accelerated" canvas that takes the pixel spans that are generated 
>>and
>>converts them into BRegion rectangles and merges them with everything
>>that has been drawn thus far.  That BRegion (or its inverse) is then
>>used to clip the drawing.
> 
> 
>>Thoughts, guys?
> 
> 
> Hey, that's what I thought as well :P
> BTW, if doing lots of "BRegion::Include()" turns out to be too slow, you can 
> do some magic tricks :)
> As I said, BView is a friend of BRegion, so you can add the pixel to the 
> BRegion data manually, then call BRegion::Support::SortRects() and 
> CleanupRegion()...

        OK, we seem to have the answer.

> 
> Anyway, if you're interested I can go deeply into the subject.

        Yes, please.
        Of course, it would be of big help if you can do this for app_server. 
:-) ;-)



Thanks,
Adi

Other related posts: