-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRenderWidget.h
38 lines (31 loc) · 1.22 KB
/
RenderWidget.h
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
33
34
35
36
37
38
//
// copyright 2018 Palestine Polytechnic Univeristy
//
// This software can be used and/or modified for academich use as long as
// this commented part is listed
//
// Last modified by: Zein Salah, on 24.04.2020
//
#pragma once
#include <QWidget>
class RenderWidget : public QWidget{
Q_OBJECT
public:
RenderWidget(QWidget *parent = 0);
QSize minimumSizeHint() const override;
QSize sizeHint() const override;
void myDrawLine(float x1, float y1, float x2, float y2);
void drawTicks(float xc, float yc, float r);
void mapPoint(float &x, float &y);
void drawLine(float x1, float y1, float x2, float y2);
void drawLineMyDerivation(float x1, float y1, float x2, float y2);
void drawCircle(float xc, float yc, float r);
void drawArc(float xc, float yc, float t1, float t2, float r);
void drawEllipse(float xc, float yc, float a, float b);
void drawTableLamp();
void drawCar();
void CohenSutherland(float point1X, float point1Y, float point2X, float point2Y, float wLeft, float wRight, float wTop, float wBottom);
void convexPolygonFilling(std::pair<float, float> polygonVertices[], int verticesNumber, float xMax, float xMin, float yMax, float yMin);
protected:
void paintEvent(QPaintEvent *event) override;
};