1 | #include "read_colorstops.hpp" |
---|---|
2 | |
3 | void |
4 | read_colorstops(fastuidraw::ColorStopArray &seq, std::istream &input) |
5 | { |
6 | while(input) |
7 | { |
8 | float t; |
9 | unsigned int r, g, b, a; |
10 | |
11 | input >> t; |
12 | input >> r; |
13 | input >> g; |
14 | input >> b; |
15 | input >> a; |
16 | |
17 | if (!input.fail()) |
18 | { |
19 | fastuidraw::ColorStop c(fastuidraw::u8vec4(r, g, b, a), t); |
20 | seq.add(c); |
21 | } |
22 | } |
23 | } |
24 |