[haiku-appserver] Re: partly paiting

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Thu, 27 Oct 2005 18:38:57 +0200

Hi,

> >     It's clearer now?
> 
> Not really. Do you just mean that:
> 
> view->Bounds().PrintToStream();
> view->ScrollTo(-5, -5);
> view->Bounds().PrintToStream();
> 
> will dump two different bounds? (the second is shifted, as is the
> origin of the local coordinate system)

I'm not sure about that. The Bounds() rectangle is like the currently 
visible portion of the views contents. When you scroll a view, another 
portion of the contents are displayed. In another words, the Bounds() 
rectangle changes. However, the coordinate system origin is something 
different, I think:

suppose Origin() = B_ORIGIN, then

StrokeLine(BPoint(5, 5), BPoint(10, 5));

will draw a line at a certain position in the view.

SetOrigin(5, 5);
StrokeLine(BPoint(0, 0), BPoint(5, 0));

will draw the very same line (on screen), everything else being equal.

I don't really know what happens to Bounds() after calling SetOrigin() like 
that. But I do know that Origin() will not be affected by simply scrolling 
the view (shifting the visible portion of the contents). I would find it 
logical if Bounds() returned something different after SetOrigin(), but 
without actual scrolling of course. But the Be implementation *could* be 
buggy or inconsequent or whatever you want to call it. We need to test that.

Best regards,
-Stephan


Other related posts: