Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.
[graphlib.git] / DrawingArea.h
1 #ifndef DRAWING_AREA_H
2 #define DRAWING_AREA_H
3
4 #include <DrawingAreaInterface.h>
5
6 #include <QColor>
7 #include <QImage>
8 #include <QPainter>
9
10 class DrawingArea: public DrawingAreaInterface {
11 private:
12     QImage *image;
13     QPainter *painter;
14
15 public:
16     DrawingArea(int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT);
17     ~DrawingArea();
18
19     int width() const;
20     int height() const;
21
22     void setColor(const QColor &color);
23     void setColor(float red, float green, float blue);
24
25     void drawPoint(int x, int y);
26     void drawLine(int x1, int y1, int x2, int y2);
27
28 };
29
30 #endif // !DRAWING_AREA_H
31
32
33