Skip to content

Commit 0e22809

Browse files
committed
Final cleanup to paths for uniformity and better use of terminology. Continuing work on #22. I had forgotten that there were capitalized terms in areas other than the path files.
1 parent d7eca2c commit 0e22809

19 files changed

+150
-200
lines changed

source/abs-cubic-curve.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33

44
\pnum
55
\indexlibrary{\idxcode{abs_cubic_curve}}%
6-
The class \tcode{abs_cubic_curve} describes a path item that adds a cubic \bezierlocal curve path segment to a path.
6+
The class \tcode{abs_cubic_curve} describes a path item that is a path segment.
77

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

11-
\pnum
12-
When interpreting a path group, after the curve is added to the path, the path's current point is the end point.
13-
1411
\rSec1 [\iotwod.abscubiccurve.synopsis] {\tcode{abs_cubic_curve} synopsis}
1512

1613
\begin{codeblock}

source/abs-line.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33

44
\pnum
55
\indexlibrary{\idxcode{abs_line}}%
6-
The class \tcode{abs_line} describes a path item that adds a line path segment to a path.
6+
The class \tcode{abs_line} describes a path item that is a path segment.
77

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

11-
\pnum
12-
After the line is added to the path, the path's current point is the end point.
13-
1411
\rSec1 [\iotwod.absline.synopsis] {\tcode{abs_line} synopsis}
1512

1613
\begin{codeblock}

source/abs-matrix.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
\pnum
77
\indexlibrary{\idxcode{abs_matrix}}%
8-
The class \tcode{abs_matrix} describes a path item that assigns the value of the \tcode{abs_matrix} object's \term{transform matrix} to a path group transformation matrix.
8+
The class \tcode{abs_matrix} describes a path item that is a path group instruction.
99

1010
\pnum
11-
The transform matrix is a \tcode{matrix_2d} object.
11+
It has a transform matrix of type \tcode{matrix_2d}.
1212

1313
\begin{codeblock}
1414
namespace std::experimental::io2d::v1 {

source/abs-new-path.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33

44
\pnum
55
\indexlibrary{\idxcode{abs_new_path}}%
6-
The class \tcode{abs_new_path} describes a path item that creates a new path and makes the previous path, if any, an open path unless it was made a closed path by a \tcode{close_path} object.
6+
The class \tcode{abs_new_path} describes a path item that is a new path instruction.
77

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

11-
\pnum
12-
When interpreting a path group, the path's last-move-to-point and current point are set to the value of the at point.
13-
1411
\rSec1 [\iotwod.absnewpath.synopsis] {\tcode{abs_new_path} synopsis}%
1512

1613
\begin{codeblock}

source/abs-quadratic-curve.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33

44
\pnum
55
\indexlibrary{\idxcode{abs_quadratic_curve}}%
6-
The class \tcode{abs_quadratic_curve} describes a path item that adds a quadratic \bezierlocal curve path segment to a path.
6+
The class \tcode{abs_quadratic_curve} describes a path item that is a path segment.
77

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

11-
\pnum
12-
When interpreting a path group, after the curve is added to the path, the path's current point becomes the end point.
13-
1411
\rSec1 [\iotwod.absquadraticcurve.synopsis] {\tcode{abs_quadratic_curve} synopsis}
1512

1613
\begin{codeblock}

source/arc.tex

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,11 @@
55

66
\pnum
77
\indexlibrary{\idxcode{arc}}%
8-
The class \tcode{arc} describes a path item that adds an arc path segment to a path.
8+
The class \tcode{arc} describes a path item that is a path segment.
99

1010
\pnum
1111
It has a \term{radius} of type \tcode{vector_2d}, a \term{rotation} of type \tcode{float}, and a \term{start angle} of type \tcode{float}.
1212

13-
\pnum
14-
The rotation and start angle are in radians. The arc begins at its start angle and ends at the angle that is rotation radians from the start angle.
15-
16-
\pnum
17-
\begin{note}
18-
Negative rotation is clockwise. Positive rotation is counterclockwise.
19-
\end{note}
20-
21-
\pnum
22-
The radius describes the \xaxis radius and \yaxis radius of the ellipse that the arc is on. The point of the start angle is the path's current point.
23-
24-
\pnum
25-
After the arc is added to the path, the path's current point is the point at which the arc ends.
26-
2713
\rSec1 [\iotwod.arc.synopsis] {\tcode{arc} synopsis}
2814

2915
\begin{codeblock}

source/close-path.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
\pnum
55
\indexlibrary{\idxcode{close_path}}
6-
The class \tcode{close_path} describes a path item that creates a line from the current point to the last-move-to point, makes the path a closed path, and then creates a new path.
7-
8-
\pnum
9-
The current point and last-move-to point of the new path are the last-move-to point of the closed path.
6+
The class \tcode{close_path} describes a path item that is a close path instruction.
107

118
\rSec1 [\iotwod.closepath.synopsis] {\tcode{close_path} synopsis}%
129

source/definitions-paths.tex

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,78 @@
11
%!TEX root = io2d.tex
22

33
\indexdefn{path segment}%
4-
\definition{path segment}{\iotwod.defns.pathsegment}
5-
a line, \bezierlocal curve, or arc, each of which has a start point and an end point
4+
\definition{path segment}{\iotwod.defns.pathseg}
5+
line, \bezierlocal curve, or arc, each of which has a start point and an end point
66

77
\indexdefn{control point}%
8-
\definition{control point}{\iotwod.defns.controlpoint}
9-
a point other than the start point and end point that is used in defining a \bezierlocal curve
8+
\definition{control point}{\iotwod.defns.controlpt}
9+
point other than the start point and end point that is used in defining a \bezierlocal curve
1010

1111
\indexdefn{degenerate path segment}%
12-
\definition{degenerate path segment}{\iotwod.defns.degeneratepathsegment}
13-
a path segment that has the same values for its start point, end point, and, if any, control points
12+
\definition{degenerate path segment}{\iotwod.defns.degenepathseg}
13+
path segment that has the same values for its start point, end point, and, if any, control points
1414

1515
\indexdefn{initial path segment}%
16-
\definition{initial path segment}{\iotwod.defns.initialpathsegment}
17-
a path segment whose start point is not defined as being the end point of another path segment
16+
\definition{initial path segment}{\iotwod.defns.initialpathseg}
17+
path segment whose start point is not defined as being the end point of another path segment
1818
\begin{note}
1919
It is possible for the initial path segment and final path segment to be the same path segment.
2020
\end{note}
2121

2222
\indexdefn{final path segment}%
23-
\definition{final path segment}{\iotwod.defns.finalpathsegment}
24-
a path segment whose end point does not define the start point of any other path segment
23+
\definition{final path segment}{\iotwod.defns.finalpathseg}
24+
path segment whose end point does not define the start point of any other path segment
2525
\begin{note}
2626
It is possible for the initial path segment and final path segment to be the same path segment.
2727
\end{note}
2828

2929
\indexdefn{path instruction}%
30-
\definition{path instruction}{\iotwod.defns.pathinstruction}
31-
an instruction that creates a new path, closes an existing path, adds a geometry as a new closed path, or modifies the interpretation of path segments that follow it
30+
\definition{path instruction}{\iotwod.defns.newpathinstruction}
31+
\defncontext{new path instruction} instruction that creates a new path
32+
33+
\indexdefn{path instruction}%
34+
\definition{path instruction}{\iotwod.defns.closepathinstruction}
35+
\defncontext{close path instruction} instruction that creates a line path segment from the current point to the , a path and establishes a new path
3236

3337
\indexdefn{path item}%
3438
\definition{path item}{\iotwod.defns.pathitem}
35-
a path segment or path instruction
39+
path segment, new path instruction, close path instruction, or path group instruction
3640

3741
\indexdefn{path}%
3842
\definition{path}{\iotwod.defns.path}
39-
a collection of path items where the end point of each path segment, except the final path segment, defines the start point of exactly one other path segment in the collection
43+
collection of path items where the end point of each path segment, except the final path segment, defines the start point of exactly one other path segment in the collection
44+
45+
\indexdefn{degenerate path}%
46+
\definition{degenerate path}{\iotwod.defns.degenpath}
47+
path composed entirely of a new path instruction, zero or more degenerate path segments, zero of more path group items, and, optionally, a close path instruction
4048

4149
\indexdefn{current point}%
4250
\definition{current point}{\iotwod.defns.currentpoint}
43-
a point established or used by various path items
51+
point used as the start point of a path segment
4452

45-
\indexdefn{last-move-to point}%
46-
\definition{last-move-to point}{\iotwod.defns.lastmovetopoint}
47-
the point in a path that is the start point of the initial path segment
53+
\indexdefn{new path point}%
54+
\definition{new path point}{\iotwod.defns.newpathpt}
55+
point in a path that is the start point of the initial path segment
4856

4957
\indexdefn{path group}%
5058
\definition{path group}{\iotwod.defns.pathgroup}
51-
a collection of paths
52-
53-
\indexdefn{path group origin}%
54-
\definition{path group origin}{\iotwod.defns.pathgrporigin}
55-
a point to which each of the points in a path group is relative
59+
collection of paths
5660

5761
\indexdefn{path group transformation matrix}%
5862
\definition{path group transformation matrix}{\iotwod.defns.pathgrptransform}
59-
an affine transformation matrix used to apply affine transformations to the points in a path group
63+
affine transformation matrix used to apply affine transformations to the points in a path group
64+
65+
\indexdefn{path group instruction}%
66+
\definition{path group instruction}
67+
instruction that modifies the path group transformation matrix
6068

6169
\indexdefn{closed path}%
6270
\definition{closed path}{\iotwod.defns.closedpath}
63-
a path with one or more path segments where the last-move-to point is used to define the end point of the path's final path segment
71+
path with one or more path segments where the new path point is used to define the end point of the path's final path segment
6472

6573
\indexdefn{open path}%
6674
\definition{open path}{\iotwod.defns.openpath}
67-
a path with one or more path segments where the last-move-to point is not used to define the end point of the path's final path segment
75+
path with one or more path segments where the new path point is not used to define the end point of the path's final path segment
6876
\begin{note}
6977
Even if the start point of the initial path segment and the end point of the final path segment are assigned the same coordinates, the path is still an open path since the final path segment's end point is not defined as being the start point of the initial segment but instead merely happens to have the same value as that point.
7078
\end{note}
71-
%
72-
%\indexdefn{interpret}%
73-
%\definition{interpret}{\iotwod.defns.pathgrpinterpret}
74-
%\defncontext{path group} sequentially evaluate zero or more path items ...
75-
%
76-
%\indexdefn{degenerate path}
77-
%\definition{degenerate path}{\iotwod.defns.degeneratepath}
78-
%a path with only one path segment
79-
%\begin{note}
80-
%The path segment is not required to be a degenerate path segment.
81-
%\end{note}

source/path-examples.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
pb.rel_line({ -260.0f, 0.0f }); // Line from [280, 180] to
4949
// [280 - 260, 180 + 0].
5050
pb.close_path(); // Creates a line from [20, 180] to [80, 20]
51-
// (the last-move-to point), which makes this a closed path.
51+
// (the new path point), which makes this a closed path.
5252
imgSfc.stroke(foreBrush, pb, nullopt, nullopt, nullopt, aliased);
5353
\end{codeblock}
5454

source/path-group-interpretation.tex

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
This subclause describes how to interpret a path group for use in a rendering and composing operation.
77

88
\pnum
9-
Interpreting a path group consists of evaluating a sequence of \tcode{path_data::path_item} objects and transforming them into zero or more paths as-if in the manner specified in this subclause.
10-
11-
\pnum
12-
Until a \tcode{path_data::path_item} object containing a \tcode{path_data::abs_new_path} object is evaluated, a path shall only contain \tcode{path_data::path_item} objects containing \tcode{path_data::abs_matrix} or \tcode{path_data::abs_origin} objects; no diagnostic is required.
9+
Interpreting a path group consists of sequentially evaluating the \tcode{path_data::path_item} objects in a path group and transforming them into zero or more paths as-if in the manner specified in this subclause.
1310

1411
\pnum
1512
The interpretation of a path group requires the state data specified in Table~\ref{tab:\iotwod.paths.interpretation.state}.
@@ -41,6 +38,17 @@
4138

4239
\FloatBarrier
4340

41+
\pnum
42+
When interpreting a path group, until a \tcode{path_data::abs_new_path} path item is reached, a path shall only contain path group instruction path items; no diagnostic is required. If a path is a degenerate path, none of its path items have any effects, with two exceptions:
43+
\begin{itemize}
44+
\item the path's \tcode{path_data::abs_new_path} or \tcode{path_data::rel_new_path} path item sets the value of \tcode{currPt} as-if the path item was interpreted; and,
45+
\item any path group instruction path items are evaluated with full effect.
46+
\end{itemize}.
47+
48+
%\pnum
49+
%\begin{note}
50+
%The requirement above stating "until a \tcode{path_data::abs_new_path} path item is reached..." uses the word "reached" to make it clear that whether the first path is a degenerate path is irrelevant to that requirement.
51+
%\end{note}
4452
\pnum
4553
The effects of a path item contained in a \tcode{path_data::path_item} object when that object is being evaluated during path group interpretation are described in Table~\ref{tab:\iotwod.paths.interpretation.effects}.
4654

@@ -94,11 +102,3 @@
94102

95103
\begin{note} \tcode{p.radius()}, which specifies the radius of the arc, is implicitly included in the above statement of effects by the specifications of the center of the arc and the end of the arcs. The use of the current point as the origin for the application of the path group transformation matrix is also implicitly included by the same specifications. \end{note} \\
96104
\end{libreqtab2a}
97-
98-
\pnum
99-
Excluding \tcode{path_data::abs_matrix} objects, if any, the first path item in a path group shall be an \tcode{path_data::abs_new_path} object when it is interpreted; no diagnostic is required.
100-
101-
\pnum
102-
\begin{note}
103-
The interpretation of all path items other than \tcode{path_data::abs_matrix} objects and \tcode{path_data::abs_new_path} objects requires that the current point (see: Table~\ref{tab:\iotwod.paths.interpretation.state}) has a value, and only a \tcode{path_data::abs_new_path} object establishes a value for the current point without needing an existing value for the current point.
104-
\end{note}

0 commit comments

Comments
 (0)