Skip to content

Commit 0611d03

Browse files
committed
Fixed path_factory to be a proper sequence container. Added types for color_stop and color_stop_group, the latter of which is also a sequence container. Changed the location of the path elements since nested classes can't be forward declared. Fixed various errors. Began work on brushes. The remaining changes should be easy enough. Then surfaces. Added a circle class and moved it, vector_2d, rectangle, and matrix_2d into a new section located in geometry.tex.
1 parent 4308d6e commit 0611d03

25 files changed

+1736
-795
lines changed

source/abs-cubic-curve.tex

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
11
%!TEX root = io2d.tex
2-
\rSec0 [pathfactory.pathabscubiccurve] {Class \tcode{path_factory::path_abs_cubic_curve}}
2+
\rSec0 [abscubiccurve] {Class \tcode{abs_cubic_curve}}
33

44
\pnum
5-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}}
6-
The class \tcode{path_factory::path_abs_cubic_curve} describes a path segment that is a cubic \bezierlocal curve.
5+
\indexlibrary{\idxcode{abs_cubic_curve}}
6+
The class \tcode{abs_cubic_curve} describes a path segment that is a cubic \bezierlocal curve.
77

88
\pnum
99
It has a first control point of type \tcode{vector_2d}, a second control point of type \tcode{vector_2d}, and an end point of type \tcode{vector_2d}.
1010

11-
\rSec1 [pathfactory.pathabscubiccurve.synopsis] {\tcode{path_factory::path_abs_cubic_curve} synopsis}
11+
\rSec1 [abscubiccurve.synopsis] {\tcode{abs_cubic_curve} synopsis}
1212

1313
\begin{codeblock}
1414
namespace std { namespace experimental { namespace io2d { inline namespace v1 {
15-
class path_factory::path_abs_cubic_curve {
16-
public:
17-
// \ref{pathfactory.pathabscubiccurve.cons}, construct/copy/move/destroy:
18-
path_abs_cubic_curve(const vector_2d& cp1, const vector_2d& cp2,
19-
const vector_2d& ep) noexcept;
20-
21-
// \ref{pathfactory.pathabscubiccurve.modifiers}, modifiers:
22-
void control_point_1(const vector_2d& cp) noexcept;
23-
void control_point_2(const vector_2d& cp) noexcept;
24-
void end_point(const vector_2d& ep) noexcept;
25-
26-
27-
// \ref{pathfactory.pathabscubiccurve.observers}, observers:
28-
vector_2d control_point_1() const noexcept;
29-
vector_2d control_point_2() const noexcept;
30-
vector_2d end_point() const noexcept;
15+
namespace path_data {
16+
class abs_cubic_curve {
17+
public:
18+
// \ref{abscubiccurve.cons}, construct:
19+
abs_cubic_curve(const vector_2d& cp1, const vector_2d& cp2,
20+
const vector_2d& ep) noexcept;
21+
22+
// \ref{abscubiccurve.modifiers}, modifiers:
23+
void control_point_1(const vector_2d& cp) noexcept;
24+
void control_point_2(const vector_2d& cp) noexcept;
25+
void end_point(const vector_2d& ep) noexcept;
26+
27+
28+
// \ref{abscubiccurve.observers}, observers:
29+
vector_2d control_point_1() const noexcept;
30+
vector_2d control_point_2() const noexcept;
31+
vector_2d end_point() const noexcept;
32+
};
3133
};
3234
} } } }
3335
\end{codeblock}
3436

35-
\rSec1 [pathfactory.pathabscubiccurve.cons] {\tcode{path_factory::path_abs_cubic_curve} constructors}
37+
\rSec1 [abscubiccurve.cons] {\tcode{abs_cubic_curve} constructors}
3638

37-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!constructor}
39+
\indexlibrary{\idxcode{abs_cubic_curve}!constructor}
3840
\begin{itemdecl}
39-
path_abs_cubic_curve(const vector_2d& cp1, const vector_2d& cp2,
41+
abs_cubic_curve(const vector_2d& cp1, const vector_2d& cp2,
4042
const vector_2d& ep) noexcept;
4143
\end{itemdecl}
4244
\begin{itemdescr}
4345
\pnum
4446
\effects
45-
Constructs an object of type \tcode{path_factory::path_abs_cubic_curve}.
47+
Constructs an object of type \tcode{abs_cubic_curve}.
4648

4749
\pnum
4850
The first control point shall be set to the value of \tcode{cp1}.
@@ -54,10 +56,10 @@
5456
The end point shall be set to the value of \tcode{ep}.
5557
\end{itemdescr}
5658

57-
\rSec1 [pathfactory.pathabscubiccurve.modifiers]{\tcode{path_factory::path_abs_cubic_curve} modifiers}
59+
\rSec1 [abscubiccurve.modifiers]{\tcode{abs_cubic_curve} modifiers}
5860

59-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!\idxcode{control_point_1}}
60-
\indexlibrary{\idxcode{control_point_1}!\idxcode{path_factory::path_abs_cubic_curve}}
61+
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_1}}
62+
\indexlibrary{\idxcode{control_point_1}!\idxcode{abs_cubic_curve}}
6163
\begin{itemdecl}
6264
void control_point_1(const vector_2d& cp) noexcept;
6365
\end{itemdecl}
@@ -67,8 +69,8 @@
6769
The first control point shall be set to the value of \tcode{cp}.
6870
\end{itemdescr}
6971

70-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!\idxcode{control_point_2}}
71-
\indexlibrary{\idxcode{control_point_2}!\idxcode{path_factory::path_abs_cubic_curve}}
72+
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_2}}
73+
\indexlibrary{\idxcode{control_point_2}!\idxcode{abs_cubic_curve}}
7274
\begin{itemdecl}
7375
void control_point_2(const vector_2d& cp) noexcept;
7476
\end{itemdecl}
@@ -78,8 +80,8 @@
7880
The second control point shall be set to the value of \tcode{cp}.
7981
\end{itemdescr}
8082

81-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!\idxcode{end_point}}
82-
\indexlibrary{\idxcode{end_point}!\idxcode{path_factory::path_abs_cubic_curve}}
83+
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{end_point}}
84+
\indexlibrary{\idxcode{end_point}!\idxcode{abs_cubic_curve}}
8385
\begin{itemdecl}
8486
void end_point(const vector_2d& ep) noexcept;
8587
\end{itemdecl}
@@ -89,10 +91,10 @@
8991
The end point shall be set to the value of \tcode{ep}.
9092
\end{itemdescr}
9193

92-
\rSec1 [pathfactory.pathabscubiccurve.observers]{\tcode{path_factory::path_abs_cubic_curve} observers}
94+
\rSec1 [abscubiccurve.observers]{\tcode{abs_cubic_curve} observers}
9395

94-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!\idxcode{control_point_1}}
95-
\indexlibrary{\idxcode{control_point_1}!\idxcode{path_factory::path_abs_cubic_curve}}
96+
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_1}}
97+
\indexlibrary{\idxcode{control_point_1}!\idxcode{abs_cubic_curve}}
9698
\begin{itemdecl}
9799
vector_2d control_point_1() const noexcept;
98100
\end{itemdecl}
@@ -102,8 +104,8 @@
102104
The value of the first control point.
103105
\end{itemdescr}
104106

105-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!\idxcode{control_point_2}}
106-
\indexlibrary{\idxcode{control_point_2}!\idxcode{path_factory::path_abs_cubic_curve}}
107+
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{control_point_2}}
108+
\indexlibrary{\idxcode{control_point_2}!\idxcode{abs_cubic_curve}}
107109
\begin{itemdecl}
108110
vector_2d control_point_2() const noexcept;
109111
\end{itemdecl}
@@ -113,8 +115,8 @@
113115
The value of the second control point.
114116
\end{itemdescr}
115117

116-
\indexlibrary{\idxcode{path_factory::path_abs_cubic_curve}!\idxcode{end_point}}
117-
\indexlibrary{\idxcode{end_point}!\idxcode{path_factory::path_abs_cubic_curve}}
118+
\indexlibrary{\idxcode{abs_cubic_curve}!\idxcode{end_point}}
119+
\indexlibrary{\idxcode{end_point}!\idxcode{abs_cubic_curve}}
118120
\begin{itemdecl}
119121
vector_2d end_point() const noexcept;
120122
\end{itemdecl}

source/abs-line.tex

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,52 @@
11
%!TEX root = io2d.tex
2-
\rSec0 [pathfactory.pathabsline] {Class \tcode{path_factory::path_abs_line}}
2+
\rSec0 [absline] {Class \tcode{abs_line}}
33

44
\pnum
5-
\indexlibrary{\idxcode{path_factory::path_abs_line}}
6-
The class \tcode{path_factory::path_abs_line} describes a path segment that is a line.
5+
\indexlibrary{\idxcode{abs_line}}
6+
The class \tcode{abs_line} describes a path segment that is a line.
77

88
\pnum
99
It has an end point of type \tcode{vector_2d}.
1010

11-
\rSec1 [pathfactory.pathabsline.synopsis] {\tcode{path_factory::path_abs_line} synopsis}
11+
\rSec1 [absline.synopsis] {\tcode{abs_line} synopsis}
1212

1313
\begin{codeblock}
1414
namespace std { namespace experimental { namespace io2d { inline namespace v1 {
15-
class path_factory::path_abs_line {
16-
public:
17-
// \ref{pathfactory.pathabsline.cons}, construct:
18-
explicit path_abs_line(const vector_2d& pt) noexcept;
15+
namespace path_data {
16+
class abs_line {
17+
public:
18+
// \ref{absline.cons}, construct:
19+
explicit abs_line(const vector_2d& pt) noexcept;
1920

20-
// \ref{pathfactory.pathabsline.modifiers}, modifiers:
21-
void to(const vector_2d& pt) noexcept;
21+
// \ref{absline.modifiers}, modifiers:
22+
void to(const vector_2d& pt) noexcept;
2223

23-
// \ref{pathfactory.pathabsline.observers}, observers:
24-
vector_2d to() const noexcept;
24+
// \ref{absline.observers}, observers:
25+
vector_2d to() const noexcept;
26+
};
2527
};
2628
} } } }
2729
\end{codeblock}
2830

29-
\rSec1 [pathfactory.pathabsline.cons] {\tcode{path_factory::path_abs_line} constructors and assignment operators}
31+
\rSec1 [absline.cons] {\tcode{abs_line} constructors and assignment operators}
3032

31-
\indexlibrary{\idxcode{path_factory::path_abs_line}!constructor}
33+
\indexlibrary{\idxcode{abs_line}!constructor}
3234
\begin{itemdecl}
33-
explicit path_abs_line(const vector_2d& pt) noexcept;
35+
explicit abs_line(const vector_2d& pt) noexcept;
3436
\end{itemdecl}
3537
\begin{itemdescr}
3638
\pnum
3739
\effects
38-
Constructs an object of type \tcode{path_factory::path_abs_line}.
40+
Constructs an object of type \tcode{abs_line}.
3941

4042
\pnum
4143
The end point shall be set to the value of \tcode{pt}.
4244
\end{itemdescr}
4345

44-
\rSec1 [pathfactory.pathabsline.modifiers]{\tcode{path_factory::path_abs_line} modifiers}
46+
\rSec1 [absline.modifiers]{\tcode{abs_line} modifiers}
4547

46-
\indexlibrary{\idxcode{path_factory::path_abs_line}!\idxcode{to}}
47-
\indexlibrary{\idxcode{to}!\idxcode{path_factory::path_abs_line}}
48+
\indexlibrary{\idxcode{abs_line}!\idxcode{to}}
49+
\indexlibrary{\idxcode{to}!\idxcode{abs_line}}
4850
\begin{itemdecl}
4951
void to(const vector_2d& pt) noexcept;
5052
\end{itemdecl}
@@ -54,10 +56,10 @@
5456
The end point shall be set to the value of \tcode{pt}.
5557
\end{itemdescr}
5658

57-
\rSec1 [pathfactory.pathabsline.observers]{\tcode{path_factory::path_abs_line} observers}
59+
\rSec1 [absline.observers]{\tcode{abs_line} observers}
5860

59-
\indexlibrary{\idxcode{path_factory::path_abs_line}!\idxcode{to}}
60-
\indexlibrary{\idxcode{to}!\idxcode{path_factory::path_abs_line}}
61+
\indexlibrary{\idxcode{abs_line}!\idxcode{to}}
62+
\indexlibrary{\idxcode{to}!\idxcode{abs_line}}
6163
\begin{itemdecl}
6264
vector_2d to() const noexcept;
6365
\end{itemdecl}

source/abs-move.tex

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,55 @@
11
%!TEX root = io2d.tex
2-
\rSec0 [pathfactory.pathabsmove] {Class \tcode{path_factory::path_abs_move}}
2+
\rSec0 [absmove] {Class \tcode{abs_move}}
33

44
\pnum
5-
\indexlibrary{\idxcode{path_factory::path_abs_move}}
6-
The class \tcode{path_factory::path_abs_move} describes a path operation that creates a new path and makes the previous path, if any, an open path unless it was closed by \tcode{path_factory::path_close_path}.
5+
\indexlibrary{\idxcode{abs_move}}
6+
The class \tcode{abs_move} describes a path operation that creates a new path and makes the previous path, if any, an open path unless it was closed by \tcode{close_path}.
77

88
\pnum
99
It has an end point of type \tcode{vector_2d}.
1010

1111
\pnum
1212
The end point is also the start point of the new path and its last-move-to point.
1313

14-
\rSec1 [pathfactory.pathabsmove.synopsis] {\tcode{path_factory::path_abs_move} synopsis}
14+
\rSec1 [absmove.synopsis] {\tcode{abs_move} synopsis}
1515

1616
\begin{codeblock}
1717
namespace std { namespace experimental { namespace io2d { inline namespace v1 {
18-
class path_factory::path_abs_move {
19-
public:
20-
// \ref{pathfactory.pathabsmove.cons}, construct:
21-
explicit move_to(const vector_2d& pt) noexcept;
18+
namespace path_data {
19+
class abs_move {
20+
public:
21+
// \ref{absmove.cons}, construct:
22+
explicit abs_move(const vector_2d& pt) noexcept;
2223

23-
// \ref{pathfactory.pathabsmove.modifiers}, modifiers:
24-
void to(const vector_2d& pt) noexcept;
24+
// \ref{absmove.modifiers}, modifiers:
25+
void to(const vector_2d& pt) noexcept;
2526

26-
// \ref{pathfactory.pathabsmove.observers}, observers:
27-
vector_2d to() const noexcept;
27+
// \ref{absmove.observers}, observers:
28+
vector_2d to() const noexcept;
29+
};
2830
};
2931
} } } }
3032
\end{codeblock}
3133

32-
\rSec1 [pathfactory.pathabsmove.cons] {\tcode{path_factory::path_abs_move} constructors}
34+
\rSec1 [absmove.cons] {\tcode{abs_move} constructors}
3335

34-
\indexlibrary{\idxcode{path_factory::path_abs_move}!constructor}
36+
\indexlibrary{\idxcode{abs_move}!constructor}
3537
\begin{itemdecl}
36-
explicit path_abs_move(const vector_2d& pt) noexcept;
38+
explicit abs_move(const vector_2d& pt) noexcept;
3739
\end{itemdecl}
3840
\begin{itemdescr}
3941
\pnum
4042
\effects
41-
Constructs an object of type \tcode{path_factory::path_abs_move}.
43+
Constructs an object of type \tcode{abs_move}.
4244

4345
\pnum
4446
The end point shall be set to the value of \tcode{pt}.
4547
\end{itemdescr}
4648

47-
\rSec1 [pathfactory.pathabsmove.modifiers]{\tcode{path_factory::path_abs_move} modifiers}
49+
\rSec1 [absmove.modifiers]{\tcode{abs_move} modifiers}
4850

49-
\indexlibrary{\idxcode{path_factory::path_abs_move}!\idxcode{to}}
50-
\indexlibrary{\idxcode{to}!\idxcode{path_factory::path_abs_move}}
51+
\indexlibrary{\idxcode{abs_move}!\idxcode{to}}
52+
\indexlibrary{\idxcode{to}!\idxcode{abs_move}}
5153
\begin{itemdecl}
5254
void to(const vector_2d& pt) noexcept;
5355
\end{itemdecl}
@@ -57,10 +59,10 @@
5759
The end point shall be set to the value of \tcode{pt}.
5860
\end{itemdescr}
5961

60-
\rSec1 [pathfactory.pathabsmove.observers]{\tcode{path_factory::path_abs_move} observers}
62+
\rSec1 [absmove.observers]{\tcode{abs_move} observers}
6163

62-
\indexlibrary{\idxcode{path_factory::path_move_to}!\idxcode{to}}
63-
\indexlibrary{\idxcode{to}!\idxcode{path_factory::path_move_to}}
64+
\indexlibrary{\idxcode{abs_move}!\idxcode{to}}
65+
\indexlibrary{\idxcode{to}!\idxcode{abs_move}}
6466
\begin{itemdecl}
6567
vector_2d to() const noexcept;
6668
\end{itemdecl}

0 commit comments

Comments
 (0)