]> git.sur5r.net Git - cc65/blob - include/geos/ggraph.h
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / include / geos / ggraph.h
1 /*
2   GEOS graphic (non icon/menu/sprite) functions
3
4   ported to small C on 29.10.1999
5   by Maciej 'YTM/Alliance' Witkowiak
6   10,11.03.2000 - updates
7 */
8
9 #ifndef _GGRAPH_H
10 #define _GGRAPH_H
11
12 #ifndef _GSTRUCT_H
13 #include <geos/gstruct.h>
14 #endif
15
16 void __fastcall__ SetPattern(char newpattern);
17
18 void __fastcall__ HorizontalLine(char pattern, char y, int xstart, int xend);
19 void __fastcall__ InvertLine(char y, int xstart, int xend);
20 void __fastcall__ RecoverLine(char y, int xstart, int xend);
21 void __fastcall__ VerticalLine(char pattern, char ystart, char yend, int x);
22
23 void __fastcall__ InitDrawWindow(struct window *myRectangle);
24 void __fastcall__ Rectangle(void);
25 void __fastcall__ FrameRectangle(char pattern);
26 void __fastcall__ InvertRectangle(void);
27 void __fastcall__ ImprintRectangle(void);
28 void __fastcall__ RecoverRectangle(void);
29
30 void __fastcall__ DrawLine(struct window *topBotCoords);
31
32 void __fastcall__ DrawPoint(struct pixel *myPixel);
33 char __fastcall__ TestPoint(struct pixel *myPixel);
34
35 void __fastcall__ PutChar(char character, char y, int x);
36 void __fastcall__ PutString(char *myString, char y, int x);
37 void __fastcall__ PutDecimal(char style, int value, char y, int x);
38
39 char __fastcall__ GetCharWidth(char character);
40 void __fastcall__ LoadCharSet(struct fontdesc *myFont);
41 void __fastcall__ UseSystemFont(void);
42
43 void __fastcall__ BitmapUp(struct iconpic *myIcon);
44 void __fastcall__ BitmapClip(char skipl, char skipr, int skiptop,
45                              struct iconpic *myIcon);
46 void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
47                                char skipr, int skiptop,
48                                struct iconpic *myIcon);
49
50 void __fastcall__ GraphicsString(char *myGfxString);
51
52 /* VIC colour constants */
53 #define BLACK           0
54 #define WHITE           1
55 #define RED             2
56 #define CYAN            3
57 #define PURPLE          4
58 #define GREEN           5
59 #define BLUE            6
60 #define YELLOW          7
61 #define ORANGE          8
62 #define BROWN           9
63 #define LTRED           10
64 #define DKGREY          11
65 #define GREY            12
66 #define MEDGREY         12
67 #define LTGREEN         13
68 #define LTBLUE          14
69 #define LTGREY          15
70 /* VIC memory banks */
71 #define GRBANK0         3
72 #define GRBANK1         2
73 #define GRBANK2         1
74 #define GRBANK3         0
75 /* VIC screen sizes */
76 #define VIC_X_POS_OFF   24
77 #define VIC_Y_POS_OFF   50
78 #define SC_BYTE_WIDTH   40
79 #define SC_PIX_HEIGHT   200
80 #define SC_PIX_WIDTH    320
81 #define SC_SIZE         8000
82 /* VDC screen constants */
83 #define SCREENBYTEWIDTH         80
84 #define SCREENPIXELWIDTH        640
85 /* control characters for use as numbers, not chars */
86 #define EOF             0
87 #define BACKSPACE       8
88 #define FORWARDSPACE    9
89 #define TAB             9
90 #define LF              10
91 #define HOME            11
92 #define PAGE_BREAK      12
93 #define UPLINE          12
94 #define CR              13
95 #define ULINEON         14
96 #define ULINEOFF        15
97 #define ESC_GRAPHICS    16
98 #define ESC_RULER       17
99 #define REV_ON          18
100 #define REV_OFF         19
101 #define GOTOX           20
102 #define GOTOY           21
103 #define GOTOXY          22
104 #define NEWCARDSET      23
105 #define BOLDON          24
106 #define ITALICON        25
107 #define OUTLINEON       26
108 #define PLAINTEXT       27
109 /* control characters for use in
110    strings: eg: str[10]=BOLD "Hello";   */
111 #define CCR             "\015"
112 #define CULINEON        "\016"
113 #define CULINEOFF       "\017"
114 #define CREV_ON         "\022"
115 #define CREV_OFF        "\023"
116 #define CBOLDON         "\030"
117 #define CITALICON       "\031"
118 #define COUTLINEON      "\032"
119 #define CPLAINTEXT      "\033"
120
121 /*values of currentMode */
122 /* bitNumbers */
123 #define UNDERLINE_BIT   7
124 #define BOLD_BIT        6
125 #define REVERSE_BIT     5
126 #define ITALIC_BIT      4
127 #define OUTLINE_BIT     3
128 #define SUPERSCRIPT_BIT 2
129 #define SUBSCRIPT_BIT   1
130 /* bitMasks */
131 #define SET_UNDERLINE   0x80
132 #define SET_BOLD        0x40
133 #define SET_REVERSE     0x20
134 #define SET_ITALIC      0x10
135 #define SET_OUTLINE     0x08
136 #define SET_SUPERSCRIPT 0x04
137 #define SET_SUBSCRIPT   0x02
138 #define SET_PLAINTEXT   0
139 /* values of dispBufferOn */
140 #define ST_WRGS_FORE    0x20
141 #define ST_WR_BACK      0x40
142 #define ST_WR_FORE      0x80
143 /* PutDecimal parameters */
144 /* leading 0s? */
145 #define SET_NOSURPRESS  0
146 #define SET_SURPRESS    0x40
147 /* justification */
148 #define SET_RIGHTJUST   0
149 #define SET_LEFTJUST    0x80
150 /* C128 x flags */
151 #define ADD1_W          0x2000
152 #define DOUBLE_B        0x80
153 #define DOUBLE_W        0x8000
154
155 typedef void graphicStr;
156
157 #define MOVEPENTO(x,y) (char)1, (unsigned)(x), (char)(y)
158 #define LINETO(x,y) (char)2, (unsigned)(x), (char)(y)
159 #define RECTANGLETO(x,y) (char)3, (unsigned)(x), (char)(y)
160 #define NEWPATTERN(p) (char)5, (char)(p)
161 #define FRAME_RECTO(x,y) (char)7, (unsigned)(x), (char)(y)
162 #define PEN_X_DELTA(x) (char)8, (unsigned)(x)
163 #define PEN_Y_DELTA(y) (char)9, (char)(y)
164 #define PEN_XY_DELTA(x,y) (char)10, (unsigned)(x), (char)(y)
165 #define GSTR_END (char)NULL
166 /* ESC_PUTSTRING can't be implemented - it needs text, not pointer to it
167    #define ESC_PUTSTRING(x,y,text) (char)6, (unsigned)(x), (char)(y), (text), (char)NULL
168 */
169
170 #endif