forked from GokuMK/TSRE5
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBrush.h
55 lines (48 loc) · 1.08 KB
/
Brush.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* This file is part of TSRE5.
*
* TSRE5 - train sim game engine and MSTS/OR Editors.
* Copyright (C) 2016 Piotr Gadecki <[email protected]>
*
* Licensed under GNU General Public License 3.0 or later.
*
* See LICENSE.md or https://www.gnu.org/licenses/gpl.html
*/
#ifndef BRUSH_H
#define BRUSH_H
class Texture;
class QImage;
class Brush {
public:
enum Transformation {
RANDOM = 0,
ROT0 = 1,
ROT90 = 2,
ROT180 = 3,
ROT270 = 4,
PRESENT = 5
};
Brush();
// texture
Texture* tex = 0;
Transformation texTransformation = RANDOM;
bool useTexture = false;
int color[3];
int texId = -1;
// universal
int size = 10;
float scale = 1;
float alpha = 1;
float direction = 1;
// height
float hFixed = 0;
int hType = 0;
// embarkment
int eSize = 2;
int eEmb = 5;
int eCut = 5;
int eRadius = 20;
QImage* brushshape = 0;
float getAlpha(int x, int y, int size );
private:
};
#endif /* BRUSH_H */