From 9e10d2993989a4f6d1b72a8c9d5f7480b0c0f006 Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 15 Mar 2003 13:58:54 +0000 Subject: Toying with shapes --- include/glcolor.h | 3 ++- include/glshape.h | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/glcolor.h b/include/glcolor.h index 8296451..28ce1f7 100644 --- a/include/glcolor.h +++ b/include/glcolor.h @@ -10,7 +10,8 @@ namespace mogltk { ColorP(const Color &); ColorP(Uint8, Uint8, Uint8, Uint8); void Bind(); - private: + static Color Min; + static Color Max; Color c; }; }; diff --git a/include/glshape.h b/include/glshape.h index a0c7bf2..10c5145 100644 --- a/include/glshape.h +++ b/include/glshape.h @@ -2,24 +2,46 @@ #define __GLSHAPE_H__ #include +#include #include #include namespace mogltk { + typedef enum { + LEFT, + CENTER, + RIGHT + } align_t; class shape : public Base { public: static void box(int x1, int y1, int x2, int y2, ColorP = WHITE); + static void box3d(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, int = 2, int = 0); static void box(int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP); static void obox(int x1, int y1, int x2, int y2, ColorP = WHITE); + static void obox3d(int x1, int y1, int x2, int y2, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, int = 0); static void obox(int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP); static void tbox(texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, ColorP = WHITE); static void tbox(texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP = WHITE); static void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx = 0, int ty = 0, double = 1.0); static void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx1, int ty1, int tx2, int ty2); static void hline(int x1, int x2, int y, ColorP = WHITE); + static void hline3d(int x1, int x2, int y, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, int = 0); static void hline(int x1, int x2, int y, ColorP, ColorP); static void vline(int x, int y1, int y2, ColorP = WHITE); + static void vline3d(int x, int y1, int y2, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, int = 0); static void vline(int x, int y1, int y2, ColorP, ColorP); + static void window(int x1, int y1, int x2, int y2, String title = "", + ColorP titlecolor = DOS_HIGH_WHITE, + ColorP titlebackcolor = DOS_MAGENTA, + ColorP front = DOS_WHITE, + ColorP shade1 = DOS_HIGH_WHITE, + ColorP shade2 = DOS_GRAY); + static void text3d(int x, int y, String, + ColorP textcolor = DOS_BLACK, + ColorP shade1 = DOS_HIGH_WHITE, + ColorP shade2 = DOS_GRAY, + align_t align = LEFT, + int bevel = 0); private: static bool in2D(bool); static void out2D(bool); -- cgit v1.2.3