File: ggiSetOrigin.3ggi

package info (click to toggle)
libggi 1%3A2.0.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,072 kB
  • ctags: 5,274
  • sloc: ansic: 42,720; sh: 6,508; makefile: 666
file content (46 lines) | stat: -rw-r--r-- 1,627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.\\" auto-generated by docbook2man-spec $Revision: 1.5 $
.TH "ggiSetOrigin" "3ggi" "22 August 2001" "GGI" "LibGGI API"
.SH NAME
ggiSetOrigin, ggiGetOrigin \- Set and get origin of virtual screen
.SH SYNOPSIS
\fB#include <ggi/ggi.h>
.sp
int ggiSetOrigin(ggi_visual_t \fIvis\fB, int \fIx\fB, int \fIy\fB);
.sp
int ggiGetOrigin(ggi_visual_t \fIvis\fB, int *\fIx\fB, int *\fIy\fB);
\fR.SH "DESCRIPTION"
.PP
\fBggiSetOrigin\fR sets the top-left corner of the displayed area to
(\fIx\fR, \fIy\fR).
.PP
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).
.PP
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 \fIframes\fR when setting a mode.
.PP
This call takes \fBdot\fR coordinates, not
pixel coordinates as all other drawing primitives do. There is no
difference in graphics modes because by definition \fIdpp\fR is
1x1, but in text modes the application can do smooth scrolling.
.PP
\fBggiGetOrigin\fR gets the current top-left corner of the displayed
area into (\fIx\fR, \fIy\fR).
.PP
Due to rounding to the hardware's capabilities, the values
retrieved by a subsequent \fBggiGetOrigin\fR may not necessarily match
those passed to \fBggiSetOrigin\fR previously.
.SH "RETURN VALUE"
.PP
0 for OK, otherwise an error code.
.SH "EXAMPLES"
.SS "PAN FROM THE TOP TO THE BOTTOM OF THE VIRTUAL SCREEN"
.sp
.nf
for(i = 0; i < virt_y-visible_y; i++) {
        ggiSetOrigin(vis, 0, i);
}
.sp
.fi