Skip to content

Commit a81e5e2

Browse files
committed
Added all the missing path functionality. I think paths are finally done. Cleaning up display-surface.tex then need to return to brushes, look through enums for bogus/outdated things, and glance through the whole paper to see if I can spot any obvi9us errors. Cleanups of large hbox overflows needs to be done as well.
1 parent c93ecbd commit a81e5e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3837
-2994
lines changed

source/abs-cubic-curve.tex

+6-18
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,11 @@
1919
constexpr abs_cubic_curve() noexcept;
2020
constexpr abs_cubic_curve(const vector_2d& cpt1, const vector_2d& cpt2,
2121
const vector_2d& ept) noexcept;
22-
constexpr abs_cubic_curve(const abs_cubic_curve&) noexcept = default;
23-
constexpr abs_cubic_curve& operator=(const abs_cubic_curve&)
24-
noexcept = default;
25-
abs_cubic_curve(abs_cubic_curve&&) noexcept = default;
26-
abs_cubic_curve& operator=(abs_cubic_curve&&)
27-
noexcept = default;
2822

2923
// \ref{abscubiccurve.modifiers}, modifiers:
30-
void control_point_1(const vector_2d& cpt) noexcept;
31-
void control_point_2(const vector_2d& cpt) noexcept;
32-
void end_point(const vector_2d& ept) noexcept;
24+
constexpr void control_point_1(const vector_2d& cpt) noexcept;
25+
constexpr void control_point_2(const vector_2d& cpt) noexcept;
26+
constexpr void end_point(const vector_2d& ept) noexcept;
3327

3428

3529
// \ref{abscubiccurve.observers}, observers:
@@ -85,9 +79,8 @@
8579
\rSec1 [abscubiccurve.modifiers]{\tcode{abs_cubic_curve} modifiers}
8680

8781
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_1}}
88-
\indexlibrary{\idxcode{control_point_1}!\idxcode{abs_cubic_curve}}
8982
\begin{itemdecl}
90-
void control_point_1(const vector_2d& cpt) noexcept;
83+
constexpr void control_point_1(const vector_2d& cpt) noexcept;
9184
\end{itemdecl}
9285
\begin{itemdescr}
9386
\pnum
@@ -96,9 +89,8 @@
9689
\end{itemdescr}
9790

9891
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_2}}
99-
\indexlibrary{\idxcode{control_point_2}!\idxcode{abs_cubic_curve}}
10092
\begin{itemdecl}
101-
void control_point_2(const vector_2d& cpt) noexcept;
93+
constexpr void control_point_2(const vector_2d& cpt) noexcept;
10294
\end{itemdecl}
10395
\begin{itemdescr}
10496
\pnum
@@ -107,9 +99,8 @@
10799
\end{itemdescr}
108100

109101
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{end_point}}
110-
\indexlibrary{\idxcode{end_point}!\idxcode{abs_cubic_curve}}
111102
\begin{itemdecl}
112-
void end_point(const vector_2d& ept) noexcept;
103+
constexpr void end_point(const vector_2d& ept) noexcept;
113104
\end{itemdecl}
114105
\begin{itemdescr}
115106
\pnum
@@ -120,7 +111,6 @@
120111
\rSec1 [abscubiccurve.observers]{\tcode{abs_cubic_curve} observers}
121112

122113
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_1}}
123-
\indexlibrary{\idxcode{control_point_1}!\idxcode{abs_cubic_curve}}
124114
\begin{itemdecl}
125115
constexpr vector_2d control_point_1() const noexcept;
126116
\end{itemdecl}
@@ -131,7 +121,6 @@
131121
\end{itemdescr}
132122

133123
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_2}}
134-
\indexlibrary{\idxcode{control_point_2}!\idxcode{abs_cubic_curve}}
135124
\begin{itemdecl}
136125
constexpr vector_2d control_point_2() const noexcept;
137126
\end{itemdecl}
@@ -142,7 +131,6 @@
142131
\end{itemdescr}
143132

144133
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{end_point}}
145-
\indexlibrary{\idxcode{end_point}!\idxcode{abs_cubic_curve}}
146134
\begin{itemdecl}
147135
constexpr vector_2d end_point() const noexcept;
148136
\end{itemdecl}

source/abs-ellipse.tex

+176
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
%!TEX root = io2d.tex
2+
\rSec0 [absellipse] {Class \tcode{abs_ellipse}}
3+
4+
\pnum
5+
\indexlibrary{\idxcode{abs_ellipse}}
6+
The class \tcode{abs_ellipse} describes a path instruction that add a new path consisting of an ellipse and closes it.
7+
8+
\pnum
9+
It has a Center of type \tcode{vector_2d}, an X Axis Radius of type \tcode{double}, and a Y Axis Radius of type \tcode{double}.
10+
11+
\rSec1 [absellipse.synopsis] {\tcode{abs_ellipse} synopsis}
12+
13+
\begin{codeblock}
14+
namespace std { namespace experimental { namespace io2d { inline namespace v1 {
15+
namespace path_data {
16+
class abs_ellipse {
17+
public:
18+
// \ref{absellipse.cons}, construct/copy/move/destroy:
19+
constexpr abs_ellipse() noexcept;
20+
constexpr abs_ellipse(const vector_2d& ctr, double x, double y) noexcept;
21+
constexpr explicit abs_ellipse(const circle& c) noexcept;
22+
23+
// \ref{absellipse.modifiers}, modifiers:
24+
constexpr void center(const vector_2d& ctr) noexcept;
25+
constexpr void x_axis(double rad) noexcept;
26+
constexpr void y_axis(double rad) noexcept;
27+
28+
// \ref{absellipse.observers}, observers:
29+
constexpr vector_2d center() const noexcept;
30+
constexpr double x_axis() const noexcept;
31+
constexpr double y_axis() const noexcept;
32+
};
33+
}
34+
} } } }
35+
\end{codeblock}
36+
37+
\rSec1 [absellipse.cons] {\tcode{abs_ellipse} constructors}
38+
39+
\indexlibrary{\idxcode{abs_ellipse}!constructor}
40+
\begin{itemdecl}
41+
constexpr abs_ellipse() noexcept;
42+
\end{itemdecl}
43+
\begin{itemdescr}
44+
\pnum
45+
\effects
46+
Constructs an object of type \tcode{abs_ellipse}.
47+
48+
\pnum
49+
The value of Center is \tcode{vector_2d\{0,0, 0.0\}}.
50+
51+
\pnum
52+
The value of X Axis Radius is \tcode{0.0}.
53+
54+
\pnum
55+
The value of Y Axis Radius is \tcode{0.0}.
56+
\end{itemdescr}
57+
58+
\indexlibrary{\idxcode{abs_ellipse}!constructor}
59+
\begin{itemdecl}
60+
constexpr abs_ellipse(const vector_2d& ctr, double x, double y) noexcept;
61+
\end{itemdecl}
62+
\begin{itemdescr}
63+
\pnum
64+
\preconditions
65+
\tcode{x >= 0.0}.
66+
67+
\pnum
68+
\tcode{y >= 0.0}.
69+
70+
\pnum
71+
\effects
72+
Constructs an object of type \tcode{abs_ellipse}.
73+
74+
\pnum
75+
The value of Center is \tcode{ctr}.
76+
77+
\pnum
78+
The value of X Axis Radius is \tcode{x}.
79+
80+
\pnum
81+
The value of Y Axis Radius is \tcode{y}.
82+
\end{itemdescr}
83+
84+
\indexlibrary{\idxcode{abs_ellipse}!constructor}
85+
\begin{itemdecl}
86+
constexpr explicit abs_ellipse(const circle& c) noexcept;
87+
\end{itemdecl}
88+
\begin{itemdescr}
89+
\pnum
90+
\preconditions
91+
\tcode{c.radius() >= 0.0}.
92+
93+
\pnum
94+
\effects
95+
Constructs an object of type \tcode{abs_ellipse}.
96+
97+
\pnum
98+
The value of Center is \tcode{c.center()}.
99+
100+
\pnum
101+
The value of X Axis Radius is \tcode{c.radius()}.
102+
103+
\pnum
104+
The value of Y Axis Radius is \tcode{c.radius()}.
105+
\end{itemdescr}
106+
107+
\rSec1 [absellipse.modifiers]{\tcode{abs_ellipse} modifiers}
108+
109+
\indexlibrary{\idxcode{abs_ellipse}!\idxcode{center}}
110+
\begin{itemdecl}
111+
constexpr void center(const vector_2d& ctr) noexcept;
112+
\end{itemdecl}
113+
114+
\begin{itemdescr}
115+
\pnum
116+
\effects
117+
The value of Center is \tcode{ctr}.
118+
\end{itemdescr}
119+
120+
\indexlibrary{\idxcode{abs_ellipse}!\idxcode{x_axis}}
121+
\begin{itemdecl}
122+
constexpr void x_axis(double rad) noexcept;
123+
\end{itemdecl}
124+
\begin{itemdescr}
125+
\preconditions
126+
\tcode{rad >= 0.0}.
127+
128+
\pnum
129+
\effects
130+
The value of X Axis Radius is \tcode{rad}.
131+
\end{itemdescr}
132+
133+
\indexlibrary{\idxcode{abs_ellipse}!\idxcode{y_axis}}
134+
\begin{itemdecl}
135+
constexpr void y_axis(double rad) noexcept;
136+
\end{itemdecl}
137+
\begin{itemdescr}
138+
\preconditions
139+
\tcode{rad >= 0.0}.
140+
141+
\pnum
142+
\effects
143+
The value of Y Axis Radius is \tcode{rad}.
144+
\end{itemdescr}
145+
146+
\rSec1 [absellipse.observers]{\tcode{abs_ellipse} observers}
147+
148+
\indexlibrary{\idxcode{abs_ellipse}!\idxcode{center}}
149+
\begin{itemdecl}
150+
constexpr double center() const noexcept;
151+
\end{itemdecl}
152+
\begin{itemdescr}
153+
\pnum
154+
\returns
155+
The value of Center.
156+
\end{itemdescr}
157+
158+
\indexlibrary{\idxcode{abs_ellipse}!\idxcode{x_axis}}
159+
\begin{itemdecl}
160+
constexpr double x_axis() const noexcept;
161+
\end{itemdecl}
162+
\begin{itemdescr}
163+
\pnum
164+
\returns
165+
The value of X Axis Radius.
166+
\end{itemdescr}
167+
168+
\indexlibrary{\idxcode{abs_ellipse}!\idxcode{y_axis}}
169+
\begin{itemdecl}
170+
constexpr double y_axis() const noexcept;
171+
\end{itemdecl}
172+
\begin{itemdescr}
173+
\pnum
174+
\returns
175+
The value of Y Axis Radius.
176+
\end{itemdescr}

source/abs-line.tex

+2-8
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@
1818
// \ref{absline.cons}, construct:
1919
constexpr abs_line() noexcept;
2020
constexpr explicit abs_line(const vector_2d& pt) noexcept;
21-
constexpr abs_line(const abs_line&) noexcept = default;
22-
constexpr abs_line& operator=(const abs_line&) noexcept = default;
23-
abs_line(abs_line&&) noexcept = default;
24-
abs_line& operator=(abs_line&&) noexcept = default;
2521

2622
// \ref{absline.modifiers}, modifiers:
27-
void to(const vector_2d& pt) noexcept;
23+
constexpr void to(const vector_2d& pt) noexcept;
2824

2925
// \ref{absline.observers}, observers:
3026
constexpr vector_2d to() const noexcept;
@@ -64,9 +60,8 @@
6460
\rSec1 [absline.modifiers]{\tcode{abs_line} modifiers}
6561

6662
\indexlibrary{\idxcode{abs_line}!\idxcode{to}}
67-
\indexlibrary{\idxcode{to}!\idxcode{abs_line}}
6863
\begin{itemdecl}
69-
void to(const vector_2d& pt) noexcept;
64+
constexpr void to(const vector_2d& pt) noexcept;
7065
\end{itemdecl}
7166
\begin{itemdescr}
7267
\pnum
@@ -77,7 +72,6 @@
7772
\rSec1 [absline.observers]{\tcode{abs_line} observers}
7873

7974
\indexlibrary{\idxcode{abs_line}!\idxcode{to}}
80-
\indexlibrary{\idxcode{to}!\idxcode{abs_line}}
8175
\begin{itemdecl}
8276
constexpr vector_2d to() const noexcept;
8377
\end{itemdecl}

source/abs-move.tex

+2-8
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@
2121
// \ref{absmove.cons}, construct:
2222
constexpr abs_move() noexcept;
2323
constexpr explicit abs_move(const vector_2d& pt) noexcept;
24-
constexpr abs_move(const abs_move&) noexcept = default;
25-
constexpr abs_move& operator=(const abs_move&) noexcept = default;
26-
abs_move(abs_move&&) noexcept = default;
27-
abs_move& operator=(abs_move&&) noexcept = default;
2824

2925
// \ref{absmove.modifiers}, modifiers:
30-
void to(const vector_2d& pt) noexcept;
26+
constexpr void to(const vector_2d& pt) noexcept;
3127

3228
// \ref{absmove.observers}, observers:
3329
constexpr vector_2d to() const noexcept;
@@ -67,9 +63,8 @@
6763
\rSec1 [absmove.modifiers]{\tcode{abs_move} modifiers}
6864

6965
\indexlibrary{\idxcode{abs_move}!\idxcode{to}}
70-
\indexlibrary{\idxcode{to}!\idxcode{abs_move}}
7166
\begin{itemdecl}
72-
void to(const vector_2d& pt) noexcept;
67+
constexpr void to(const vector_2d& pt) noexcept;
7368
\end{itemdecl}
7469
\begin{itemdescr}
7570
\pnum
@@ -80,7 +75,6 @@
8075
\rSec1 [absmove.observers]{\tcode{abs_move} observers}
8176

8277
\indexlibrary{\idxcode{abs_move}!\idxcode{to}}
83-
\indexlibrary{\idxcode{to}!\idxcode{abs_move}}
8478
\begin{itemdecl}
8579
constexpr vector_2d to() const noexcept;
8680
\end{itemdecl}

0 commit comments

Comments
 (0)