|
1 | 1 | %!TEX root = io2d.tex |
2 | | -\rSec0 [\iotwod.colorstops] {Color stops} |
3 | | - |
4 | | -\rSec1 [\iotwod.colorstops.colorstop]{Class \tcode{color_stop}} |
| 2 | +\rSec0 [\iotwod.colorstop]{Class \tcode{color_stop}} |
5 | 3 |
|
| 4 | +\rSec1 [\iotwod.colorstop.intro] {Overview} |
6 | 5 | \pnum |
7 | 6 | \indexlibrary{\idxcode{color_stop}}% |
8 | 7 | The class \tcode{color_stop} describes a color stop that is used by gradient brushes. |
9 | 8 |
|
10 | 9 | \pnum |
11 | 10 | It has an offset of type \tcode{float} and a color of type \tcode{rgba_color}. |
12 | 11 |
|
13 | | -\rSec2 [\iotwod.colorstops.colorstop.synopsis] {\tcode{color_stop} synopsis} |
| 12 | +\rSec1 [\iotwod.colorstop.synopsis] {\tcode{color_stop} synopsis} |
14 | 13 |
|
15 | 14 | \begin{codeblock} |
16 | 15 | namespace std::experimental::io2d::v1 { |
17 | 16 | class color_stop { |
18 | 17 | public: |
19 | | - // \ref{\iotwod.colorstops.colorstop.cons}, construct: |
20 | | - constexpr color_stop(float o, const rgba_color& c); |
| 18 | + // \ref{\iotwod.colorstop.cons}, construct: |
| 19 | + constexpr color_stop() noexcept; |
| 20 | + constexpr color_stop(float o, const rgba_color& c) noexcept; |
21 | 21 |
|
22 | | - // \ref{\iotwod.colorstops.colorstop.modifiers}, modifiers: |
23 | | - constexpr void offset(float val) noexcept; |
24 | | - constexpr void color(const rgba_color& val) noexcept; |
| 22 | + // \ref{\iotwod.colorstop.modifiers}, modifiers: |
| 23 | + constexpr void offset(float o) noexcept; |
| 24 | + constexpr void color(const rgba_color& c) noexcept; |
25 | 25 |
|
26 | | - // \ref{\iotwod.colorstops.colorstop.observers}, observers: |
| 26 | + // \ref{\iotwod.colorstop.observers}, observers: |
27 | 27 | constexpr float offset() const noexcept; |
28 | 28 | constexpr rgba_color color() const noexcept; |
29 | 29 | }; |
30 | 30 | } |
31 | 31 | \end{codeblock} |
32 | 32 |
|
33 | | -\rSec2 [\iotwod.colorstops.colorstop.cons]{\tcode{color_stop} constructors} |
| 33 | +\rSec1 [\iotwod.colorstop.cons]{\tcode{color_stop} constructors} |
34 | 34 |
|
35 | 35 | \indexlibrary{\idxcode{color_stop}!constructor}% |
36 | 36 | \begin{itemdecl} |
37 | | -constexpr color_stop(float o, const rgba_color& c) noexcept; |
| 37 | +constexpr color_stop() noexcept; |
38 | 38 | \end{itemdecl} |
39 | 39 | \begin{itemdescr} |
40 | 40 | \pnum |
41 | 41 | \effects |
42 | | -Constructs a \tcode{color_stop} object. |
| 42 | +Equivalent to: \tcode{color_stop(0.0f, rgba_color::transparent_black())}. |
| 43 | +\end{itemdescr} |
| 44 | + |
| 45 | +\indexlibrary{\idxcode{color_stop}!constructor}% |
| 46 | +\begin{itemdecl} |
| 47 | +constexpr color_stop(float o, const rgba_color& c) noexcept; |
| 48 | +\end{itemdecl} |
| 49 | +\begin{itemdescr} |
| 50 | +\pnum |
| 51 | +\requires |
| 52 | +\tcode{o >= 0.0f} and \tcode{o <= 1.0f}. |
43 | 53 |
|
44 | 54 | \pnum |
45 | | -The offset shall be set to the value of \tcode{o}. |
| 55 | +\effects |
| 56 | +Constructs a \tcode{color_stop} object. |
46 | 57 |
|
47 | 58 | \pnum |
48 | | -The color shall be set to the value of \tcode{c}. |
| 59 | +The offset is \tcode{o}. The color is \tcode{c}. |
49 | 60 | \end{itemdescr} |
50 | 61 |
|
51 | | -\rSec2 [\iotwod.colorstops.colorstop.modifiers]{\tcode{color_stop} modifiers} |
| 62 | +\rSec1 [\iotwod.colorstop.modifiers]{\tcode{color_stop} modifiers} |
52 | 63 |
|
53 | 64 | \indexlibrarymember{offset}{color_stop}% |
54 | 65 | \begin{itemdecl} |
55 | | -constexpr void offset(float val) noexcept; |
| 66 | +constexpr void offset(float o) noexcept; |
56 | 67 | \end{itemdecl} |
57 | 68 | \begin{itemdescr} |
58 | | - \pnum |
59 | | - \effects |
60 | | - The offset shall be set to the value of \tcode{val}. |
| 69 | +\pnum |
| 70 | +\requires |
| 71 | +\tcode{o >= 0.0f} and \tcode{o <= 1.0f}. |
| 72 | + |
| 73 | +\pnum |
| 74 | +\effects |
| 75 | +The offset is \tcode{o}. |
61 | 76 | \end{itemdescr} |
62 | 77 |
|
63 | 78 | \indexlibrarymember{color}{color_stop}% |
64 | 79 | \begin{itemdecl} |
65 | | -constexpr void color(float val) noexcept; |
| 80 | +constexpr void color(const rgba_color& c) noexcept; |
66 | 81 | \end{itemdecl} |
67 | 82 | \begin{itemdescr} |
68 | | - \pnum |
69 | | - \effects |
70 | | - The color shall be set to the value of \tcode{val}. |
| 83 | +\pnum |
| 84 | +\effects |
| 85 | +The color is \tcode{c}. |
71 | 86 | \end{itemdescr} |
72 | 87 |
|
73 | | -\rSec2 [\iotwod.colorstops.colorstop.observers]{\tcode{color_stop} observers} |
| 88 | +\rSec1 [\iotwod.colorstop.observers]{\tcode{color_stop} observers} |
74 | 89 |
|
75 | | -\indexlibrary{\idxcode{color_stop}!\idxcode{offset}} |
76 | | -\indexlibrary{\idxcode{offset}!\idxcode{color_stop}} |
| 90 | +\indexlibrarymember{offset}{color_stop}% |
77 | 91 | \begin{itemdecl} |
78 | | - constexpr float offset() const noexcept; |
| 92 | +constexpr float offset() const noexcept; |
79 | 93 | \end{itemdecl} |
80 | 94 | \begin{itemdescr} |
81 | | - \pnum |
82 | | - \returns |
83 | | - The value of the offset. |
| 95 | +\pnum |
| 96 | +\returns |
| 97 | +The offset. |
84 | 98 | \end{itemdescr} |
85 | 99 |
|
86 | | -\indexlibrary{\idxcode{color_stop}!\idxcode{color}} |
87 | | -\indexlibrary{\idxcode{color}!\idxcode{color_stop}} |
| 100 | +\indexlibrarymember{color}{color_stop}% |
88 | 101 | \begin{itemdecl} |
89 | | - constexpr rgba_color color() const noexcept; |
| 102 | +constexpr rgba_color color() const noexcept; |
90 | 103 | \end{itemdecl} |
91 | 104 | \begin{itemdescr} |
92 | | - \pnum |
93 | | - \returns |
94 | | - The value of the color. |
| 105 | +\pnum |
| 106 | +\returns |
| 107 | +The color. |
95 | 108 | \end{itemdescr} |
0 commit comments