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__ cpputs(char *s);
17 void __fastcall__ cpputsxy(int x, int y, char *s);
19 void __fastcall__ SetPattern(char newpattern);
21 void __fastcall__ HorizontalLine(char pattern, char y, int xstart, int xend);
22 void __fastcall__ InvertLine(char y, int xstart, int xend);
23 void __fastcall__ RecoverLine(char y, int xstart, int xend);
24 void __fastcall__ VerticalLine(char pattern, char ystart, char yend, int x);
26 void __fastcall__ InitDrawWindow(struct window *myRectangle);
27 void __fastcall__ Rectangle(void);
28 void __fastcall__ FrameRectangle(char pattern);
29 void __fastcall__ InvertRectangle(void);
30 void __fastcall__ ImprintRectangle(void);
31 void __fastcall__ RecoverRectangle(void);
33 void __fastcall__ DrawLine(struct window *topBotCoords);
35 void __fastcall__ DrawPoint(struct pixel *myPixel);
36 char __fastcall__ TestPoint(struct pixel *myPixel);
38 void __fastcall__ PutChar(char character, char y, int x);
39 void __fastcall__ PutString(char *myString, char y, int x);
40 void __fastcall__ PutDecimal(char style, int value, char y, int x);
42 char __fastcall__ GetCharWidth(char character);
43 void __fastcall__ LoadCharSet(struct fontdesc *myFont);
44 void __fastcall__ UseSystemFont(void);
46 void __fastcall__ BitmapUp(struct iconpic *myIcon);
47 void __fastcall__ BitmapClip(char skipl, char skipr, int skiptop,
48 struct iconpic *myIcon);
49 void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
50 char skipr, int skiptop,
51 struct iconpic *myIcon);
53 void __fastcall__ GraphicsString(char *myGfxString);
55 /* VIC colour constants */
73 /* VIC memory banks */
78 /* VIC screen sizes */
79 #define VIC_X_POS_OFF 24
80 #define VIC_Y_POS_OFF 50
81 #define SC_BYTE_WIDTH 40
82 #define SC_PIX_HEIGHT 200
83 #define SC_PIX_WIDTH 320
85 /* VDC screen constants */
86 #define SCREENBYTEWIDTH 80
87 #define SCREENPIXELWIDTH 640
88 /* control characters for use as numbers, not chars */
90 #define FORWARDSPACE 9
99 #define ESC_GRAPHICS 16
106 #define NEWCARDSET 23
111 /* control characters for use in
112 strings: eg: str[10]=BOLD "Hello"; */
114 #define CULINEON "\016"
115 #define CULINEOFF "\017"
116 #define CREV_ON "\022"
117 #define CREV_OFF "\023"
118 #define CBOLDON "\030"
119 #define CITALICON "\031"
120 #define COUTLINEON "\032"
121 #define CPLAINTEXT "\033"
123 /*values of currentMode */
125 #define UNDERLINE_BIT 7
127 #define REVERSE_BIT 5
129 #define OUTLINE_BIT 3
130 #define SUPERSCRIPT_BIT 2
131 #define SUBSCRIPT_BIT 1
133 #define SET_UNDERLINE 0x80
134 #define SET_BOLD 0x40
135 #define SET_REVERSE 0x20
136 #define SET_ITALIC 0x10
137 #define SET_OUTLINE 0x08
138 #define SET_SUPERSCRIPT 0x04
139 #define SET_SUBSCRIPT 0x02
140 #define SET_PLAINTEXT 0
141 /* values of dispBufferOn */
142 #define ST_WRGS_FORE 0x20
143 #define ST_WR_BACK 0x40
144 #define ST_WR_FORE 0x80
145 /* PutDecimal parameters */
147 #define SET_NOSURPRESS 0
148 #define SET_SURPRESS 0x40
150 #define SET_RIGHTJUST 0
151 #define SET_LEFTJUST 0x80
153 #define ADD1_W 0x2000
154 #define DOUBLE_B 0x80
155 #define DOUBLE_W 0x8000
157 typedef void graphicStr;
159 #define MOVEPENTO(x,y) (char)1, (unsigned)(x), (char)(y)
160 #define LINETO(x,y) (char)2, (unsigned)(x), (char)(y)
161 #define RECTANGLETO(x,y) (char)3, (unsigned)(x), (char)(y)
162 #define NEWPATTERN(p) (char)5, (char)(p)
163 #define FRAME_RECTO(x,y) (char)7, (unsigned)(x), (char)(y)
164 #define PEN_X_DELTA(x) (char)8, (unsigned)(x)
165 #define PEN_Y_DELTA(y) (char)9, (char)(y)
166 #define PEN_XY_DELTA(x,y) (char)10, (unsigned)(x), (char)(y)
167 #define GSTR_END (char)NULL
168 /* ESC_PUTSTRING can't be implemented - it needs text, not pointer to it
169 #define ESC_PUTSTRING(x,y,text) (char)6, (unsigned)(x), (char)(y), (text), (char)NULL