Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.
[graphlib.git] / DrawingArea.h
diff --git a/DrawingArea.h b/DrawingArea.h
new file mode 100644 (file)
index 0000000..76d03ef
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef DRAWING_AREA_H
+#define DRAWING_AREA_H
+
+#include <DrawingAreaInterface.h>
+
+#include <QColor>
+#include <QImage>
+#include <QPainter>
+
+class DrawingArea: public DrawingAreaInterface {
+private:
+    QImage *image;
+    QPainter *painter;
+
+public:
+    DrawingArea(int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT);
+    ~DrawingArea();
+
+    int width() const;
+    int height() const;
+
+    void setColor(const QColor &color);
+    void setColor(float red, float green, float blue);
+
+    void drawPoint(int x, int y);
+    void drawLine(int x1, int y1, int x2, int y2);
+
+};
+
+#endif // !DRAWING_AREA_H
+
+
+