ggiGetOrigin

ggiSetOrigin(3ggi)             LibGGI API Manual            ggiSetOrigin(3ggi)



NAME
       ggiSetOrigin, ggiGetOrigin - Set and get origin of virtual screen

SYNOPSIS
       #include <ggi/ggi.h>

       int ggiSetOrigin(ggi_visual_t vis, int x, int y);

       int ggiGetOrigin(ggi_visual_t vis, int *x, int *y); .SH "DESCRIPTION"

       ggiSetOrigin sets the top-left corner of the displayed area to (x, y).

       When using a larger virtual area, you can pan the visible area over the
       virtual one to do scrolling. Some targets have extemely efficient means
       to do this (i.e. they do it in hardware).

       Large virtual areas are also commonly used for buffering the display
       contents, but that is usually more easily accomplished by requesting a
       specific number of frames when setting a mode.

       This call takes dot coordinates, not pixel coordinates as all other
       drawing primitives do. There is no difference in graphics modes because
       by definition dpp is 1x1, in text modes the application can do smooth
       scrolling.

       ggiGetOrigin gets the current top-left corner of the displayed area
       into (x, y).

       Due to rounding to the hardware's capabilities, the values retrieved by
       a subsequent ggiGetOrigin may not necessarily match those passed to
       ggiSetOrigin previously.

RETURN VALUE
       0 for OK, otherwise an error code.

EXAMPLES
   PAN FROM THE TOP TO THE BOTTOM OF THE VIRTUAL SCREEN
       for(i = 0; i < virt_y-visible_y; i++) {
               ggiSetOrigin(vis, 0, i);
       }




GGI                             12 August 1999              ggiSetOrigin(3ggi)