-
Notifications
You must be signed in to change notification settings - Fork 335
/
Data.hx
52 lines (41 loc) · 998 Bytes
/
Data.hx
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
package hxd.fmt.grd;
class Gradient {
public var name : String;
public var interpolation : Float;
public var colorStops : Array<ColorStop>;
public var transparencyStops : Array<TransparencyStop>;
public var gradientStops : Array<GradientStop>;
public function new() {
colorStops = [];
transparencyStops = [];
gradientStops = [];
}
}
class ColorStop {
public var color : Color;
public var location : Int;
public var midpoint : Int;
public var type : ColorStopType;
public function new() {}
}
enum ColorStopType {
User;
Background;
Foreground;
}
class TransparencyStop {
public var opacity : Float;
public var location : Int;
public var midpoint : Int;
public function new() {}
}
enum Color {
RGB(r:Float, g:Float, b:Float);
HSB(h:Float, s:Float, b:Float);
}
class GradientStop {
public var opacity : Float;
public var colorStop : ColorStop;
public function new() {}
}
class Data extends haxe.ds.StringMap<Gradient> { }