00001
00002
00003
00004
00005
00006
00007 #ifndef PSCMGFX_H
00008 #define PSCMGFX_H
00009
00010 struct pscmGfx
00011
00012
00013
00014
00015 {
00016 struct pscmGfx *next;
00017 struct psGfx *ps;
00018 int colAlloc;
00019 int colUsed;
00020 void *curFont;
00021 int curColor;
00022 struct colHash *colorHash;
00023 struct rgbColor colorMap[256];
00024 int colorsUsed;
00025 int clipMinX, clipMaxX;
00026 int clipMinY, clipMaxY;
00027 struct hash *hints;
00028 };
00029
00030 struct pscmGfx *pscmOpen(int width, int height, char *file);
00031
00032
00033 void pscmClose(struct pscmGfx **ppscm);
00034
00035
00036 void pscmSetClip(struct pscmGfx *pscm, int x, int y, int width, int height);
00037
00038
00039 void pscmUnclip(struct pscmGfx *pscm);
00040
00041
00042 int pscmFindColorIx(struct pscmGfx *pscm, int r, int g, int b);
00043
00044
00045 void pscmBox(struct pscmGfx *pscm, int x, int y,
00046 int width, int height, int colorIx);
00047
00048
00049 void pscmLine(struct pscmGfx *pscm,
00050 int x1, int y1, int x2, int y2, int colorIx);
00051
00052
00053 void pscmText(struct pscmGfx *pscm, int x, int y, int colorIx,
00054 MgFont *font, char *text);
00055
00056
00057 void pscmTextRight(struct pscmGfx *pscm, int x, int y, int width, int height,
00058 int color, MgFont *font, char *text);
00059
00060
00061 void pscmTextCentered(struct pscmGfx *pscm, int x, int y,
00062 int width, int height, int color, MgFont *font, char *text);
00063
00064
00065 #endif