Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef CANVAS_H
- #define CANVAS_H
- #include <QObject>
- #include <QWidget>
- #include <QPaintEvent>
- #include <QMouseEvent>
- #include <QResizeEvent>
- #include <QPoint>
- #include <QPainterPath>
- class Canvas : public QWidget
- {
- Q_OBJECT
- public:
- explicit Canvas(QWidget *parent = 0);
- signals:
- public slots:
- void colorBox();
- void backGround();
- void drawRectangle();
- void drawEllipse();
- void drawPoly();
- void drawLine();
- void Save();
- private:
- QVector<QPointF> m_points;
- QImage image;
- void UpdateImage();
- QColor color;
- // void drawPolygon();
- QPointF P1;
- QPointF P2;
- QString set="Draw Poly";
- QColor Background=Qt::white;
- QPainterPath path;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement