Skip to content

Commit 10f380b

Browse files
committed
Cleaned up the color_stop class definition.
1 parent 1b8f85a commit 10f380b

File tree

1 file changed

+50
-37
lines changed

1 file changed

+50
-37
lines changed

source/color-stop.tex

Lines changed: 50 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,108 @@
11
%!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}}
53

4+
\rSec1 [\iotwod.colorstop.intro] {Overview}
65
\pnum
76
\indexlibrary{\idxcode{color_stop}}%
87
The class \tcode{color_stop} describes a color stop that is used by gradient brushes.
98

109
\pnum
1110
It has an offset of type \tcode{float} and a color of type \tcode{rgba_color}.
1211

13-
\rSec2 [\iotwod.colorstops.colorstop.synopsis] {\tcode{color_stop} synopsis}
12+
\rSec1 [\iotwod.colorstop.synopsis] {\tcode{color_stop} synopsis}
1413

1514
\begin{codeblock}
1615
namespace std::experimental::io2d::v1 {
1716
class color_stop {
1817
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;
2121

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;
2525

26-
// \ref{\iotwod.colorstops.colorstop.observers}, observers:
26+
// \ref{\iotwod.colorstop.observers}, observers:
2727
constexpr float offset() const noexcept;
2828
constexpr rgba_color color() const noexcept;
2929
};
3030
}
3131
\end{codeblock}
3232

33-
\rSec2 [\iotwod.colorstops.colorstop.cons]{\tcode{color_stop} constructors}
33+
\rSec1 [\iotwod.colorstop.cons]{\tcode{color_stop} constructors}
3434

3535
\indexlibrary{\idxcode{color_stop}!constructor}%
3636
\begin{itemdecl}
37-
constexpr color_stop(float o, const rgba_color& c) noexcept;
37+
constexpr color_stop() noexcept;
3838
\end{itemdecl}
3939
\begin{itemdescr}
4040
\pnum
4141
\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}.
4353

4454
\pnum
45-
The offset shall be set to the value of \tcode{o}.
55+
\effects
56+
Constructs a \tcode{color_stop} object.
4657

4758
\pnum
48-
The color shall be set to the value of \tcode{c}.
59+
The offset is \tcode{o}. The color is \tcode{c}.
4960
\end{itemdescr}
5061

51-
\rSec2 [\iotwod.colorstops.colorstop.modifiers]{\tcode{color_stop} modifiers}
62+
\rSec1 [\iotwod.colorstop.modifiers]{\tcode{color_stop} modifiers}
5263

5364
\indexlibrarymember{offset}{color_stop}%
5465
\begin{itemdecl}
55-
constexpr void offset(float val) noexcept;
66+
constexpr void offset(float o) noexcept;
5667
\end{itemdecl}
5768
\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}.
6176
\end{itemdescr}
6277

6378
\indexlibrarymember{color}{color_stop}%
6479
\begin{itemdecl}
65-
constexpr void color(float val) noexcept;
80+
constexpr void color(const rgba_color& c) noexcept;
6681
\end{itemdecl}
6782
\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}.
7186
\end{itemdescr}
7287

73-
\rSec2 [\iotwod.colorstops.colorstop.observers]{\tcode{color_stop} observers}
88+
\rSec1 [\iotwod.colorstop.observers]{\tcode{color_stop} observers}
7489

75-
\indexlibrary{\idxcode{color_stop}!\idxcode{offset}}
76-
\indexlibrary{\idxcode{offset}!\idxcode{color_stop}}
90+
\indexlibrarymember{offset}{color_stop}%
7791
\begin{itemdecl}
78-
constexpr float offset() const noexcept;
92+
constexpr float offset() const noexcept;
7993
\end{itemdecl}
8094
\begin{itemdescr}
81-
\pnum
82-
\returns
83-
The value of the offset.
95+
\pnum
96+
\returns
97+
The offset.
8498
\end{itemdescr}
8599

86-
\indexlibrary{\idxcode{color_stop}!\idxcode{color}}
87-
\indexlibrary{\idxcode{color}!\idxcode{color_stop}}
100+
\indexlibrarymember{color}{color_stop}%
88101
\begin{itemdecl}
89-
constexpr rgba_color color() const noexcept;
102+
constexpr rgba_color color() const noexcept;
90103
\end{itemdecl}
91104
\begin{itemdescr}
92-
\pnum
93-
\returns
94-
The value of the color.
105+
\pnum
106+
\returns
107+
The color.
95108
\end{itemdescr}

0 commit comments

Comments
 (0)