From 4b7414b3f6869f2bdeb097e4f997498bae9f0aee Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 30 Mar 2013 17:44:20 +0100 Subject: New box rendering of all widgets. Minor tweaks still missing. --- plugingui/painter.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'plugingui/painter.h') diff --git a/plugingui/painter.h b/plugingui/painter.h index 02b8aba..6d5c297 100644 --- a/plugingui/painter.h +++ b/plugingui/painter.h @@ -37,20 +37,6 @@ namespace GUI { -struct __img__ { - size_t width; - size_t height; - unsigned int pixels[128000]; - unsigned int order; -}; -/* -struct __img__ { - size_t width; - size_t height; - unsigned int *pixels; - unsigned int order; -}; -*/ class Painter { public: Painter(Widget *widget); @@ -67,10 +53,9 @@ public: void drawPoint(int x, int y); void drawCircle(int x, int y, double r); void drawFilledCircle(int x, int y, int r); - void drawImage(int x, int y, struct __img__ * img); void drawImage(int x, int y, Image *image); void drawImageStretched(int x0, int y0, GUI::Image *image, - size_t width, size_t height); + int width, int height); typedef struct { Image *topLeft; @@ -85,6 +70,13 @@ public: } Box; void drawBox(int x, int y, Box *box, int width, int height); + typedef struct { + Image *left; + Image *right; + Image *center; + } Bar; + void drawBar(int x, int y, Bar *bar, int width, int height); + void clear(); private: -- cgit v1.2.3