[haiku-development] Re: BView::ConstrainClippingRegion()
- From: Stephan Assmus <superstippi@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Tue, 31 Mar 2009 09:52:53 +0200
On 2009-03-31 at 09:45:30 [+0200], Ingo Weinhold <ingo_weinhold@xxxxxx>
wrote:
>
> On 2009-03-29 at 16:56:23 [+0200], Stephan Assmus <superstippi@xxxxxx>
> wrote:
> > Hi guys,
> >
> > I've thought of, or rather needed, a change in our app_server behaviour
> > with regards to BView::ConstrainClippingRegion(). I've confirmed that
> > the Dano app_server behaves this way (as our app_server right now): If
> > you call this function outside of Draw(), it's a permanent change to
> > the current view state and any drawing you do in Draw will be clipped
> > accordingly. You can undo it by calling ConstrainClippingRegion(NULL).
> > The behaviour I want to change is with regards to app_server painting
> > the background *before* BView::Draw() is being called. The Dano
> > app_server completely ignores the user clipping when painting the
> > background, be it either solid color or a view bitmap. I have a
> > situation where it's useful that the app_server limits the background
> > drawing to the current user clipping. Should I regard the BeOS
> > behaviour as an oversight and change it? Or can any of you think of
> > unwanted side effects? So far, I have not seen any, but I didn't run a
> > lot of different apps.
>
> I guess this feature is used pretty rarely anyway. Firefox might be a
> candidate. I don't really have an opinion regarding your proposal. I'm
> wondering though, what will be drawn in the area without the clipping
> region, if the view background isn't drawn. Obviously no-one can drawn
> anything there until the clipping region is reset, so wouldn't the area
> remain dirty until then? Or are you thinking of a parent drawing it?
Other way around - a child drawing it. I've made the change such that only
this particular case is covered. So only views with B_DRAW_ON_CHILDREN can
clip the background drawing, regular views cannot clip it as in BeOS. One
would be interested in this feature when one wants to draw over certain
childs via B_DRAW_ON_CHILDREN, but wants to prevent drawing over other
childs via the means of ConstrainClippingRegion().
Best regards,
-Stephan
Other related posts: