summaryrefslogtreecommitdiff
path: root/plugingui/painter.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
commitaf9c9091ed69394171485aa4c4814504f86f2004 (patch)
tree070b911dc8faed486c8e8829f0f41aec7d5b4350 /plugingui/painter.h
parent5e4cb10f72ef69d73fbd2c1bc42465c9111a4c41 (diff)
Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending...
Diffstat (limited to 'plugingui/painter.h')
-rw-r--r--plugingui/painter.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/plugingui/painter.h b/plugingui/painter.h
index f114c21..c9fd60d 100644
--- a/plugingui/painter.h
+++ b/plugingui/painter.h
@@ -29,14 +29,30 @@
#include <string>
+#include "widget.h"
#include "colour.h"
+#include "pixelbuffer.h"
+#include "font.h"
-class GlobalContext;
-class WidgetContext;
+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(GlobalContext *gctx, WidgetContext *wctx);
+ Painter(Widget *widget);
~Painter();
void flush();
@@ -44,18 +60,20 @@ public:
void setColour(Colour colour);
void drawLine(int x1, int y1, int x2, int y2);
- void drawText(int x, int y, std::string text);
+ void drawText(int x, int y, Font &font, std::string text);
void drawRectangle(int x1, int y1, int x2, int y2);
void drawFilledRectangle(int x1, int y1, int x2, int y2);
void drawPoint(int x, int y);
void drawCircle(int x, int y, int r);
void drawFilledCircle(int x, int y, int r);
+ void drawImage(int x, int y, struct __img__ * img);
private:
- GlobalContext *gctx;
- WidgetContext *wctx;
+ Widget *widget;
+ PixelBufferAlpha *pixbuf;
Colour colour;
};
+};
#endif/*__DRUMGIZMO_PAINTER_H__*/