[EMAIL PROTECTED] writes:

> Hi,
> 
> Finally I've written a sufficiently long program using GGI to face the
> problem of (vertical) scrolling. :-)
> 
> I am wondering how I can do it; the only idea I can think of is to use
> ggiCopyBox() with a few rows of pixels at a time (starting at the top
> when scrolling down) and repeat this until the entire screen has been
> updated.
> 
> Is this a good idea? How do you make your apps scroll (vertically)?
> Are there any other methods of doing this?

First try setting a larger virtual y size than the visible size.
Then you can scroll around with ggiSetOrigin(). But for obvious
reasons this won't work on all targets and mode, so then you'll
have to resort to using ggiCopyBox(). You should copy the whole
screen at a time though, why would you want to copy a few rows
at a time?

> PS: Can I draw to a visual without any limititations, i.e., fear of
> segmentation faults and the such?

As long as you draw with the drawing functions (i.e. not using
DirectBuffer) they all honour the clipping rectangle, which can't
be bigger than the visual's virtual size.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 452062
       Stockholm, Sweden       |   E-Mail: [EMAIL PROTECTED]

Reply via email to