forked from apsystems/GrblHoming
-
Notifications
You must be signed in to change notification settings - Fork 190
/
Copy pathitemtobase.h
37 lines (29 loc) · 781 Bytes
/
itemtobase.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
#ifndef ITEMTOBASE_H
#define ITEMTOBASE_H
#include <QPainter>
#include "stdio.h"
#include "positem.h"
class ItemToBase
{
public:
ItemToBase(int index);
virtual ~ItemToBase() ;
virtual void moveToFirst(QPainterPath& path) = 0;
virtual void addToPath(QPainterPath& path) = 0;
virtual PosItem computeExtents() = 0;
virtual double getXScr() = 0;
virtual double getYScr() = 0;
virtual double getXRaw() = 0;
virtual double getYRaw() = 0;
void setParams(double scale, double height, double offsetx, double offsety);
double screenX(double x);
double screenY(double y);
int getIndex() { return index; }
protected:
double scale;
double height;
double offsetx;
double offsety;
int index;
};
#endif // ITEMTOBASE_H