Skip to content

Commit

Permalink
Keep original closepath sentences from SVG 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwilligers committed Aug 14, 2018
1 parent 9565700 commit 87cd8be
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions master/paths.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,25 @@ <h3 id="PathDataClosePathCommand">The <strong>"closepath"</strong> command</h3>
length.
</p>

<p>If a "closepath" is followed immediately by a "moveto", then the
"moveto" identifies the start point of the next subpath.
If a "closepath" is followed immediately by any other command, then
the next subpath starts at the same initial point as the current
subpath.</p>

<p>When a subpath ends in a "closepath," it differs in behavior
from what happens when "manually" closing a subpath via a
"lineto" command in how <a href="painting.html#StrokeLinejoinProperty"><span class="prop-name">‘stroke-linejoin’</span></a>
and <a href="painting.html#StrokeLinecapProperty"><span class="prop-name">‘stroke-linecap’</span></a> are implemented. With "closepath", the end of the final segment
of the subpath is "joined" with the start of the initial
segment of the subpath using the current value of <a href="painting.html#StrokeLinejoinProperty"><span class="prop-name">‘stroke-linejoin’</span></a>.
If you instead "manually" close the subpath via a "lineto"
command, the start of the first segment and the end of the last
segment are not joined but instead are each capped using the
current value of <a href="painting.html#StrokeLinecapProperty"><span class="prop-name">‘stroke-linecap’</span></a>.
At the end of the command, the new current point is set to the
initial point of the current subpath.</p>

<table class="PathDataTable">
<tr>
<th>Command</th>
Expand Down

0 comments on commit 87cd8be

Please sign in to comment.