00001 #ifndef GFXCORE_H
00002 #define GFXCORE_H
00003
00004 #include "bitmap.h"
00005 #include "gfxfont.h"
00006
00011 #define GFX_SCRATCH_SIZE 2048
00012 extern Bitmap *_gfx_scratch;
00013
00018 extern char emptyFill[];
00019 extern char solidFill[];
00020 extern char lineFill[];
00021 extern char ltSlashFill[];
00022 extern char slashFill[];
00023 extern char bkSlashFill[];
00024 extern char ltBkSlashFill[];
00025 extern char hatchFill[];
00026 extern char xHatchFill[];
00027 extern char xLeaveFill[];
00028 extern char wDotFill[];
00029 extern char cDotFill[];
00030
00031
00037 typedef struct Graphics {
00038 struct Bitmap *bitmap;
00039 struct Font *font;
00040 char *fillStyle;
00041 int x, y;
00042 int color;
00043 int blitMode;
00044 } Graphics;
00045
00046
00047 extern void GFX_Init(Graphics *gfx, Bitmap *bm);
00048 extern void GFX_Init(Graphics *gfx, Graphics *gfx2);
00049
00050 extern void GFX_SetFont(Graphics *gfx, Font *font);
00051 extern void GFX_SetFillStyle(Graphics *gfx, char *style);
00052 extern void GFX_SetColor(Graphics *gfx, int color);
00053 extern void GFX_SetBlitMode(Graphics *gfx, int mode);
00054
00055 extern void GFX_MoveRel(Graphics *gfx, int dx, int dy);
00056 extern void GFX_MoveTo (Graphics *gfx, int x, int y);
00057
00058 extern void GFX_HLine (Graphics *gfx, int x, int y, int w);
00059 extern void GFX_VLine (Graphics *gfx, int x, int y, int h);
00060 extern void GFX_Line (Graphics *gfx, int x1, int y1, int x2, int y2);
00061 extern void GFX_LineRel(Graphics *gfx, int dx, int dy);
00062 extern void GFX_LineTo (Graphics *gfx, int x, int y);
00063
00064 extern void GFX_Circle (Graphics *gfx, int xc, int yc, int r);
00065 extern void GFX_Rectangle(Graphics *gfx, int x, int y, int w, int h);
00066 extern void GFX_FillRect (Graphics *gfx, int x, int y, int w, int h);
00067
00068 #endif