-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathline.h
More file actions
32 lines (28 loc) · 803 Bytes
/
line.h
File metadata and controls
32 lines (28 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef LINE_H
#define LINE_H
#include"shape.h"
#include<QPixmap>
#include<QPen>
#include<QPoint>
#include<QPainter>
class Line : public Shape
{
private:
QPoint startPoint;
QPoint endPoint;
int drawMethod;
void set_Pixel(int x, int y, QPen& pen, QPixmap& pix);
void set_Pixel(double x, double y, QPen& pen, QPixmap& pix);
void set_LTRB() override;
public:
Line();
Line(QPoint startPoint,QPoint endPoint);
~Line();
void setDrawMethod(int m);
void draw(QPen& pen, QPixmap& pix) override;
void translate(int dx, int dy) override;
void rotate(int x, int y, int r) override;
void scale(int x, int y, float s) override;
void clip(QPoint point1, QPoint point2, std::string algorithm) override;
};
#endif // LINE_H