LEFT | RIGHT |
(no file at all) | |
1 .TH GRAPHICS 3 | 1 .TH GRAPHICS 3 |
2 .SH NAME | 2 .SH NAME |
3 Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror, initdisplay
, closedisplay, getdefont, getwindow, gengetwindow, flushimage, bufimage, lockdi
splay, unlockdisplay, cursorswitch, cursorset, openfont, buildfont, freefont, Pf
mt, Rfmt, strtochan, chantostr, chantodepth \- interactive graphics | 3 Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror, initdisplay
, closedisplay, getdefont, getwindow, gengetwindow, flushimage, bufimage, lockdi
splay, unlockdisplay, cursorswitch, cursorset, openfont, buildfont, freefont, Pf
mt, Rfmt, strtochan, chantostr, chantodepth \- interactive graphics |
4 .SH SYNOPSIS | 4 .SH SYNOPSIS |
5 .nf | 5 .nf |
6 .PP | 6 .PP |
7 .ft L | 7 .ft L |
8 #include <u.h> | 8 #include <u.h> |
9 #include <libc.h> | 9 #include <libc.h> |
10 #include <draw.h> | 10 #include <draw.h> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 int unlockdisplay(Display *d) | 53 int unlockdisplay(Display *d) |
54 .PP | 54 .PP |
55 .B | 55 .B |
56 int getwindow(Display *d, int ref) | 56 int getwindow(Display *d, int ref) |
57 .PP | 57 .PP |
58 .B | 58 .B |
59 int gengetwindow(Display *d, char *winname, | 59 int gengetwindow(Display *d, char *winname, |
60 .br | 60 .br |
61 .B | 61 .B |
62 Image **ip, Screen **sp, int ref) | 62 Image **ip, Screen **sp, int ref) |
| 63 .PP |
| 64 .B |
| 65 int scalesize(Display *d, int n) |
63 .PP | 66 .PP |
64 .B | 67 .B |
65 void cursorswitch(Cursor *curs) | 68 void cursorswitch(Cursor *curs) |
66 .PP | 69 .PP |
67 .B | 70 .B |
68 void cursorset(Point p) | 71 void cursorset(Point p) |
69 .PP | 72 .PP |
70 .B | 73 .B |
71 Font* openfont(Display *d, char *name) | 74 Font* openfont(Display *d, char *name) |
72 .PP | 75 .PP |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 .\" .I gengetwindow | 497 .\" .I gengetwindow |
495 .\" to connect to them. | 498 .\" to connect to them. |
496 .IR Gengetwindow 's | 499 .IR Gengetwindow 's |
497 extra arguments are the full path of the window's | 500 extra arguments are the full path of the window's |
498 .B winname | 501 .B winname |
499 file and pointers to be overwritten with the values of the `global' | 502 file and pointers to be overwritten with the values of the `global' |
500 .B Image | 503 .B Image |
501 and | 504 and |
502 .B Screen | 505 .B Screen |
503 variables for the new window. | 506 variables for the new window. |
| 507 .PP |
| 508 Historically, Plan 9 graphics programs have used fixed-size graphics features th
at assume a narrow range of display densities, around 100 dpi: pixels (or dots)
per inch. |
| 509 The new field |
| 510 .B display->dpi |
| 511 contains the display's actual density if known, or else |
| 512 .B DefaultDPI |
| 513 (100). |
| 514 .I Scalesize |
| 515 scales the fixed pixel count |
| 516 .I n |
| 517 by |
| 518 .BR display->dpi / DefaultDPI , |
| 519 rounding appropriately. |
504 .PP | 520 .PP |
505 The mouse cursor is always displayed. | 521 The mouse cursor is always displayed. |
506 The initial cursor is an arrow. | 522 The initial cursor is an arrow. |
507 .I Cursorswitch | 523 .I Cursorswitch |
508 causes the argument cursor to be displayed instead. | 524 causes the argument cursor to be displayed instead. |
509 A zero argument causes a switch back to the arrow cursor. | 525 A zero argument causes a switch back to the arrow cursor. |
510 .I Cursorset | 526 .I Cursorset |
511 moves the mouse cursor to position | 527 moves the mouse cursor to position |
512 .IR p , | 528 .IR p , |
513 provided (if in a window) that the requesting program is | 529 provided (if in a window) that the requesting program is |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 .B Cursor | 662 .B Cursor |
647 structure are reminders of an archaic color map | 663 structure are reminders of an archaic color map |
648 and might be more appropriately called | 664 and might be more appropriately called |
649 .B white | 665 .B white |
650 and | 666 and |
651 .BR black . | 667 .BR black . |
652 .PP | 668 .PP |
653 These manual pages contain many references to | 669 These manual pages contain many references to |
654 the now-fictitious | 670 the now-fictitious |
655 .BR /dev/draw . | 671 .BR /dev/draw . |
LEFT | RIGHT |