2 GEOS graphic (non icon/menu/sprite) functions
4 ported to small C on 29.10.1999
5 by Maciej 'YTM/Alliance' Witkowiak
6 10,11.03.2000 - updates
13 #include <geos/gstruct.h>
16 void __fastcall__ SetPattern(char newpattern);
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);
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);
30 void __fastcall__ DrawLine(struct window *topBotCoords);
32 void __fastcall__ DrawPoint(struct pixel *myPixel);
33 char __fastcall__ TestPoint(struct pixel *myPixel);
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);
39 char __fastcall__ GetCharWidth(char character);
40 void __fastcall__ LoadCharSet(struct fontdesc *myFont);
41 void __fastcall__ UseSystemFont(void);
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);
50 void __fastcall__ GraphicsString(char *myGfxString);
52 /* VIC colour constants */
70 /* VIC memory banks */
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
82 /* VDC screen constants */
83 #define SCREENBYTEWIDTH 80
84 #define SCREENPIXELWIDTH 640
85 /* control characters for use as numbers, not chars */
88 #define FORWARDSPACE 9
97 #define ESC_GRAPHICS 16
104 #define NEWCARDSET 23
109 /* control characters for use in
110 strings: eg: str[10]=BOLD "Hello"; */
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"
121 /*values of currentMode */
123 #define UNDERLINE_BIT 7
125 #define REVERSE_BIT 5
127 #define OUTLINE_BIT 3
128 #define SUPERSCRIPT_BIT 2
129 #define SUBSCRIPT_BIT 1
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 */
145 #define SET_NOSURPRESS 0
146 #define SET_SURPRESS 0x40
148 #define SET_RIGHTJUST 0
149 #define SET_LEFTJUST 0x80
151 #define ADD1_W 0x2000
152 #define DOUBLE_B 0x80
153 #define DOUBLE_W 0x8000
155 typedef void graphicStr;
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