home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kyūkyoku!! X68000 Emulator
/
X68000Book.dat
/
mac
/
OLS
/
X68000
/
Ko-Window
/
kow142s.lzh
/
wsrv
/
draw.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-12-10
|
3KB
|
143 lines
/*
* ò`ëµâIâvâVâçâô
*/
#ifndef AttrDefault
#define AttrDefault 9
#define AttrHighLight 4
#define AttrReverse 8
#define OptionXor 0x10
typedef enum {
OptionLine,
OptionBox,
OptionFill,
OptionShadow,
}
SheetOption ;
#define ShadowUp 0
#define ShadowDown 1
typedef struct {
int h, v, hword ; /* æσé½é│ */
unsigned short *buf1 ; /* âoâbâtâ@é╓é╠â|âCâôâ^ */
unsigned short *buf2 ; /* âoâbâtâ@é╓é╠â|âCâôâ^ */
}
Sheet ;
#endif
#ifdef DRAW
typedef enum {
DrawClear,
DrawLine,
DrawPut,
DrawSymbol,
DrawPattern,
DrawGraphicClear,
DrawGraphicLine,
DrawGraphicPut,
DrawDot,
DrawCircle,
#if 0
DrawEllipse,
DrawTriangle,
DrawPoly,
#endif
DrawGraphicDot,
DrawGraphicCircle,
}
DrawOption ;
typedef struct {
int code ;
}
DrawClearStruct ;
typedef struct {
int x1, y1, x2, y2 ;
int code, option ;
}
DrawLineStruct ;
typedef struct {
int x, y ;
void *sp ;
}
DrawPutStruct ;
typedef struct {
int x, y ;
char *str ;
int attr, font ;
}
DrawSymbolStruct ;
typedef struct {
void *sp ;
}
DrawPatternStruct ;
typedef struct {
int x1, y1, x2, y2 ;
short *gbuf ;
}
DrawGraphicPutStruct ;
typedef struct {
int x, y;
int code;
}
DrawDotStruct ;
typedef struct {
int x, y;
int rx, ry;
int code, option;
}
DrawCircleStruct ;
typedef struct {
int *data;
int code, option;
}
DrawTriangleStruct;
typedef struct {
int n;
int *data;
int code, option;
}
DrawPolyStruct;
typedef struct {
DrawOption type ;
union {
DrawClearStruct clear ;
DrawLineStruct line ;
DrawPutStruct put ;
DrawSymbolStruct symbol ;
DrawPatternStruct pattern ;
DrawGraphicPutStruct gput ;
DrawDotStruct dot;
DrawCircleStruct circle;
DrawTriangleStruct triangle;
DrawPolyStruct poly;
}
option ;
}
DrawBuf ;
#else
typedef char DrawBuf[28] ;
#endif
/*
proto -e draw.c > temp
*/
extern void DrawSetClear( DrawBuf*, int );
extern void DrawSetLine( DrawBuf*, int, int, int, int, int, int );
extern void DrawSetPut( DrawBuf*, int, int, void* );
extern void DrawSetSymbol( DrawBuf*, int, int, char*, int, int );
extern void DrawSetPattern( DrawBuf*, void* );
extern void DrawSetGraphicClear( DrawBuf*, int );
extern void DrawSetGraphicLine( DrawBuf*, int, int, int, int, int, int );
extern void DrawSetGraphicPut( DrawBuf*, int, int, int, int, short* );