diff options
author | pixel <pixel> | 2003-03-14 13:36:40 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-03-14 13:36:40 +0000 |
commit | 2ef9753588b02155faf8bc5a176e4fcf7489dae2 (patch) | |
tree | eaa482c393ca29af35350fd033570989f1fcaff8 /include | |
parent | 700cd603a7ceced2fe8b6a064330d6f88d278dce (diff) |
glcolor, first episode
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/glcolor.h | 18 | ||||
-rw-r--r-- | include/glfont.h | 14 | ||||
-rw-r--r-- | include/glshape.h | 26 | ||||
-rw-r--r-- | include/sprite.h | 4 |
5 files changed, 41 insertions, 23 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 0aa8482..283156d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,4 @@ pkginclude_HEADERS = \ -engine.h glbase.h glfont.h gltexture.h glshape.h glwidgets.h sprite.h +engine.h glbase.h glcolor.h glfont.h gltexture.h glshape.h glwidgets.h sprite.h noinst_HEADERS = gettext.h diff --git a/include/glcolor.h b/include/glcolor.h new file mode 100644 index 0000000..8296451 --- /dev/null +++ b/include/glcolor.h @@ -0,0 +1,18 @@ +#ifndef __GLCOLOR_H__ +#define __GLCOLOR_H__ + +#include <Exceptions.h> +#include <Color.h> + +namespace mogltk { + class ColorP : public Base { + public: + ColorP(const Color &); + ColorP(Uint8, Uint8, Uint8, Uint8); + void Bind(); + private: + Color c; + }; +}; + +#endif diff --git a/include/glfont.h b/include/glfont.h index 4ace74a..991024e 100644 --- a/include/glfont.h +++ b/include/glfont.h @@ -4,24 +4,24 @@ #include <SDL.h> #include <stdarg.h> #include <BString.h> -#include <Color.h> #include <Handle.h> -#include "gltexture.h" +#include <gltexture.h> +#include <glcolor.h> namespace mogltk { class font : public Base { public: font(Handle *); virtual ~font(); - void drawentry(Uint16, int, int, Color = Color(255, 255, 255, 255)); + void drawentry(Uint16, int, int, ColorP = WHITE); void putcursor(int, int); - void putentry(Uint16, Color = Color(255, 255, 255, 255)); - void putchar(char, Color = Color(255, 255, 255, 255)); + void putentry(Uint16, ColorP = WHITE); + void putchar(char, ColorP = WHITE); void newline(void); int printf(const ugly_string &, ...); int printf(const char *, ...); int printf(const ugly_string &, va_list); - void setcolor(Color); + void setcolor(ColorP); void setshadow(int); int getchar(char) const; int singletextsize(const String &) const; @@ -34,7 +34,7 @@ namespace mogltk { Uint16 * corresp; void Bind(int); int cx, cy, ox; - Color textcolor; + ColorP textcolor; int shadow; }; extern font * SystemFont; diff --git a/include/glshape.h b/include/glshape.h index cd9fef0..a0c7bf2 100644 --- a/include/glshape.h +++ b/include/glshape.h @@ -2,24 +2,24 @@ #define __GLSHAPE_H__ #include <Exceptions.h> -#include <Color.h> +#include <glcolor.h> #include <gltexture.h> namespace mogltk { class shape : public Base { public: - static void box(int x1, int y1, int x2, int y2, Color = WHITE); - static void box(int x1, int y1, int x2, int y2, Color, Color, Color, Color); - static void obox(int x1, int y1, int x2, int y2, Color = WHITE); - static void obox(int x1, int y1, int x2, int y2, Color, Color, Color, Color); - static void tbox(texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, Color = WHITE); - static void tbox(texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, Color = WHITE); - static void tbox(texture *, int x1, int y1, int x2, int y2, Color, Color, Color, Color, int tx = 0, int ty = 0, double = 1.0); - static void tbox(texture *, int x1, int y1, int x2, int y2, Color, Color, Color, Color, int tx1, int ty1, int tx2, int ty2); - static void hline(int x1, int x2, int y, Color = WHITE); - static void hline(int x1, int x2, int y, Color, Color); - static void vline(int x, int y1, int y2, Color = WHITE); - static void vline(int x, int y1, int y2, Color, Color); + static void box(int x1, int y1, int x2, int y2, ColorP = WHITE); + 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 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 hline(int x1, int x2, int y, ColorP, ColorP); + static void vline(int x, int y1, int y2, ColorP = WHITE); + static void vline(int x, int y1, int y2, ColorP, ColorP); private: static bool in2D(bool); static void out2D(bool); diff --git a/include/sprite.h b/include/sprite.h index fbc50ff..16565d0 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -4,7 +4,7 @@ #include <vector> #include <Exceptions.h> #include <Handle.h> -#include <Color.h> +#include <glcolor.h> #include "gltexture.h" namespace mogltk { @@ -13,7 +13,7 @@ namespace mogltk { Sprite(Handle *, int, int); Sprite(Uint8 *, int, int); virtual ~Sprite(); - void draw(int, int, Color = WHITE); + void draw(int, int, ColorP = WHITE); private: class TexList : public Base { public: |