|
1 | 1 | %!TEX root = io2d.tex |
2 | | -\rSec0 [\iotwod.abscubiccurve] {Class \tcode{abs_cubic_curve}} |
| 2 | +\rSec0 [\iotwod.abscubiccurve] {Class template \tcode{basic_figure_items<GraphicsSurfaces>::abs_cubic_curve}} |
| 3 | + |
| 4 | +\rSec1 [\iotwod.abscubiccurve.intro] {Overview} |
3 | 5 |
|
4 | 6 | \pnum |
5 | 7 | \indexlibrary{\idxcode{abs_cubic_curve}}% |
6 | | -The class \tcode{abs_cubic_curve} describes a figure item that is a segment. |
| 8 | +The class \tcode{basic_figure_items<GraphicsSurfaces>::abs_cubic_curve} describes a figure item that is a segment. |
| 9 | + |
| 10 | +\pnum |
| 11 | +It has a \term{first control point} of type \tcode{basic_point_2d<GraphicsSurfaces::graphics_math_type>}, a \term{second control point} of type \tcode{basic_point_2d<GraphicsSurfaces::graphics_math_type>}, and an \tcode{end point} of type \tcode{basic_point_2d<GraphicsSurfaces::graphics_math_type>}. |
7 | 12 |
|
8 | 13 | \pnum |
9 | | -It has a \term{first control point} of type \tcode{basic_point_2d}, a \term{second control point} of type \tcode{basic_point_2d}, and an \tcode{end point} of type \tcode{basic_point_2d}. |
| 14 | +The data are stored in an object of type \tcode{typename GraphicsSurfaces::paths::abs_cubic_curve_data_type}. It is accessible using the \tcode{data} member functions. |
| 15 | + |
| 16 | +\rSec1 [\iotwod.abscubiccurve.synopsis] {Synopsis} |
| 17 | +\begin{codeblock} |
| 18 | +namespace std::experimemtal::io2d::v1 { |
| 19 | + template <class GraphicsSurfaces> |
| 20 | + class basic_figure_items<GraphicsSurfaces>::abs_cubic_curve { |
| 21 | + public: |
| 22 | + using graphics_math_type = typename GraphicsSurfaces::graphics_math_type; |
| 23 | + using data_type = |
| 24 | + typename GraphicsSurfaces::paths::abs_cubic_curve_data_type; |
| 25 | + |
| 26 | + // \ref{\iotwod.abscubiccurve.ctor}, construct: |
| 27 | + abs_cubic_curve(); |
| 28 | + abs_cubic_curve(const basic_point_2d<graphics_math_type>& cpt1, |
| 29 | + const basic_point_2d<graphics_math_type>& cpt2, |
| 30 | + const basic_point_2d<graphics_math_type>& ept) noexcept; |
| 31 | + abs_cubic_curve(const abs_cubic_curve& other) = default; |
| 32 | + abs_cubic_curve(abs_cubic_curve&& other) noexcept = default; |
| 33 | + |
| 34 | + // assign: |
| 35 | + abs_cubic_curve& operator=(const abs_cubic_curve& other) = default; |
| 36 | + abs_cubic_curve& operator=(abs_cubic_curve&& other) noexcept = default; |
| 37 | + |
| 38 | + // \ref{\iotwod.abscubiccurve.acc}, accessors: |
| 39 | + const data_type& data() const noexcept; |
| 40 | + data_type& data() noexcept; |
| 41 | + |
| 42 | + // \ref{\iotwod.abscubiccurve.mod}, modifiers: |
| 43 | + void control_pt1(const basic_point_2d<graphics_math_type>& cpt) noexcept; |
| 44 | + void control_pt2(const basic_point_2d<graphics_math_type>& cpt) noexcept; |
| 45 | + void end_pt(const basic_point_2d<graphics_math_type>& ept) noexcept; |
| 46 | + |
| 47 | + // \ref{\iotwod.abscubiccurve.obs}, observers: |
| 48 | + basic_point_2d<graphics_math_type> control_pt1() const noexcept; |
| 49 | + basic_point_2d<graphics_math_type> control_pt2() const noexcept; |
| 50 | + basic_point_2d<graphics_math_type> end_pt() const noexcept; |
| 51 | + }; |
| 52 | + |
| 53 | + // \ref{\iotwod.abscubiccurve.ops}, equality operators: |
| 54 | + template <class GraphicsSurfaces> |
| 55 | + bool operator==( |
| 56 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& lhs, |
| 57 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& rhs) |
| 58 | + noexcept; |
| 59 | + template <class GraphicsSurfaces> |
| 60 | + bool operator!=( |
| 61 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& lhs, |
| 62 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& rhs) |
| 63 | + noexcept; |
| 64 | +} |
| 65 | +\end{codeblock} |
10 | 66 |
|
11 | | -\rSec1 [\iotwod.abscubiccurve.cons] {\tcode{abs_cubic_curve} constructors} |
| 67 | +\rSec1 [\iotwod.abscubiccurve.ctor] {Constructors}% |
12 | 68 |
|
13 | 69 | \indexlibrary{\idxcode{abs_cubic_curve}!constructor}% |
14 | 70 | \begin{itemdecl} |
|
28 | 84 | \end{itemdecl} |
29 | 85 | \begin{itemdescr} |
30 | 86 | \pnum |
31 | | -\effects |
32 | | -Constructs an object of type \tcode{abs_cubic_curve}. |
33 | | - |
34 | | -\pnum |
35 | | -The first control point is \tcode{cpt1}. |
36 | | - |
37 | | -\pnum |
38 | | -The second control point is \tcode{cpt2}. |
39 | | - |
40 | | -\pnum |
41 | | -The end point is \tcode{ept}. |
42 | | -\end{itemdescr} |
43 | | - |
44 | | -\indexlibrary{\idxcode{abs_cubic_curve}!constructor}% |
45 | | -\begin{itemdecl} |
46 | | -abs_cubic_curve(const abs_cubic_curve& other); |
47 | | -abs_cubic_curve(abs_cubic_curve&& other) noexcept; |
48 | | -\end{itemdecl} |
49 | | -\begin{itemdescr} |
50 | | -\pnum |
51 | | -\effects |
52 | | -Constructs an object of type \tcode{abs_cubic_curve}. In the second form, other is left in a valid state with an unspecified value. |
53 | | - |
54 | | -\pnum |
55 | | -The first control point is \tcode{other.control_pt1()}. |
56 | | - |
57 | | -\pnum |
58 | | -The second control point is \tcode{other.control_pt2()}. |
59 | | - |
60 | | -\pnum |
61 | | -The end point is \tcode{other.end_pt()}. |
62 | | -\end{itemdescr} |
63 | | - |
64 | | -\rSec1 [\iotwod.abscubiccurve.assign] {\tcode{abs_cubic_curve} assignment operators} |
65 | | - |
66 | | -\indexlibrary{\idxcode{abs_cubic_curve}!assignment}% |
67 | | -\begin{itemdecl} |
68 | | -abs_cubic_curve& operator=(const abs_cubic_curve& other); |
69 | | -\end{itemdecl} |
70 | | -\begin{itemdescr} |
71 | | -\pnum |
72 | | -\effects |
73 | | -If \tcode{*this} and \tcode{other} are not the same object, modifies \tcode{*this} such that \tcode{*this.control_pt1()} is \tcode{other.control_pt1()}, \tcode{*this.control_pt2()} is \tcode{other.control_pt2()} and \tcode{*this.end_pt()} is \tcode{other.end_pt()} |
| 87 | +\effects Constructs an object of type \tcode{abs_cubic_curve}. |
74 | 88 |
|
75 | 89 | \pnum |
76 | | -If \tcode{*this} and \tcode{other} are the same object, the member has no effect. |
| 90 | +\remarks The first control point is \tcode{cpt1}. |
77 | 91 |
|
78 | 92 | \pnum |
79 | | -\returns |
80 | | -\tcode{*this} |
81 | | -\end{itemdescr} |
82 | | - |
83 | | -\indexlibrary{\idxcode{abs_cubic_curve}!assignment}% |
84 | | -\begin{itemdecl} |
85 | | -abs_cubic_curve& operator=(abs_cubic_curve&& other) noexcept; |
86 | | -\end{itemdecl} |
87 | | -\begin{itemdescr} |
88 | | -\pnum |
89 | | -\effects |
90 | | -<TODO> |
| 93 | +\remarks The second control point is \tcode{cpt2}. |
91 | 94 |
|
92 | 95 | \pnum |
93 | | -\returns |
94 | | -\tcode{*this} |
| 96 | +\remarks The end point is \tcode{ept}. |
95 | 97 | \end{itemdescr} |
96 | 98 |
|
97 | | -\rSec1 [\iotwod.abscubiccurve.modifiers]{\tcode{abs_cubic_curve} modifiers} |
| 99 | +\rSec1 [\iotwod.abscubiccurve.mod]{\tcode{abs_cubic_curve} modifiers} |
98 | 100 |
|
99 | 101 | \indexlibrarymember{control_pt1}{abs_cubic_curve}% |
100 | 102 | \begin{itemdecl} |
|
128 | 130 | The end point is \tcode{ept}. |
129 | 131 | \end{itemdescr} |
130 | 132 |
|
131 | | -\rSec1 [\iotwod.abscubiccurve.observers]{\tcode{abs_cubic_curve} observers} |
| 133 | +\rSec1 [\iotwod.abscubiccurve.obs] {Observers} |
132 | 134 |
|
133 | 135 | \indexlibrarymember{control_pt1}{abs_cubic_curve}% |
134 | 136 | \begin{itemdecl} |
135 | | -basic_point_2d<typename GraphicsSurfaces::graphics_math_type> control_pt1() const noexcept; |
| 137 | +basic_point_2d<graphics_math_type> control_pt1() const noexcept; |
136 | 138 | \end{itemdecl} |
137 | 139 | \begin{itemdescr} |
138 | 140 | \pnum |
139 | | -\returns |
140 | | -The first control point. |
| 141 | +\returns The first control point. |
141 | 142 | \end{itemdescr} |
142 | 143 |
|
143 | 144 | \indexlibrarymember{control_pt2}{abs_cubic_curve}% |
144 | 145 | \begin{itemdecl} |
145 | | -basic_point_2d<typename GraphicsSurfaces::graphics_math_type> control_pt2() const noexcept; |
| 146 | +basic_point_2d<graphics_math_type> control_pt2() const noexcept; |
146 | 147 | \end{itemdecl} |
147 | 148 | \begin{itemdescr} |
148 | 149 | \pnum |
149 | | -\returns |
150 | | -The second control point. |
| 150 | +\returns The second control point. |
151 | 151 | \end{itemdescr} |
152 | 152 |
|
153 | 153 | \indexlibrarymember{end_pt}{abs_cubic_curve}% |
154 | 154 | \begin{itemdecl} |
155 | | -basic_point_2d<typename GraphicsSurfaces::graphics_math_type> end_pt() const noexcept; |
| 155 | +basic_point_2d<graphics_math_type> end_pt() const noexcept; |
156 | 156 | \end{itemdecl} |
157 | 157 | \begin{itemdescr} |
158 | 158 | \pnum |
159 | | -\returns |
160 | | -The end point. |
| 159 | +\returns The end point. |
161 | 160 | \end{itemdescr} |
162 | 161 |
|
163 | | -\rSec1 [\iotwod.abscubiccurve.ops]{\tcode{abs_cubic_curve} operators} |
| 162 | +\rSec1 [\iotwod.abscubiccurve.ops] {Equality operators}% |
164 | 163 |
|
165 | 164 | \indexlibrarymember{operator==}{abs_cubic_curve}% |
166 | 165 | \begin{itemdecl} |
167 | 166 | template <class GraphicsSurfaces> |
168 | | -bool operator==(const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& lhs, |
169 | | - const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& rhs) noexcept; |
| 167 | +bool operator==( |
| 168 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& lhs, |
| 169 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& rhs) |
| 170 | + noexcept; |
170 | 171 | \end{itemdecl} |
171 | 172 | \begin{itemdescr} |
172 | 173 | \pnum |
173 | 174 | \returns |
174 | | -\begin{codeblock} |
175 | | -lhs.control_pt1() == rhs.control_pt1() && |
176 | | -lhs.control_pt2() == rhs.control_pt2() && |
177 | | -lhs.end_pt() && rhs.end_pt() |
178 | | -\end{codeblock} |
| 175 | +\tcode{lhs.control_pt1() == rhs.control_pt1() \&\& lhs.control_pt2() == rhs.control_pt2() \&\& lhs.end_pt() == rhs.end_pt()}. |
| 176 | +\end{itemdescr} |
| 177 | + |
| 178 | +\indexlibrarymember{operator!=}{abs_cubic_curve}% |
| 179 | +\begin{itemdecl} |
| 180 | +template <class GraphicsSurfaces> |
| 181 | +bool operator!=( |
| 182 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& lhs, |
| 183 | + const typename basic_figure_items<GraphicsSurfaces>::abs_cubic_curve& rhs) |
| 184 | + noexcept; |
| 185 | +\end{itemdecl} |
| 186 | +\begin{itemdescr} |
| 187 | +\pnum |
| 188 | +\returns |
| 189 | +\tcode{lhs.control_pt1() != rhs.control_pt1() \&\& lhs.control_pt2() != rhs.control_pt2() \&\& lhs.end_pt() != rhs.end_pt()}. |
179 | 190 | \end{itemdescr} |
0 commit comments