Proposal: Shorthand spline segments in mixed curves

Under the current SVG2 working draft, the curve produced by a "smooth
curveto" command *isn't* smooth if the path happens to mix quadratic and
cubic spline segments, or mixes either kind of spline segment with
elliptical arcs. This is a disappointing limitation, since it means one
can't combine the shorthands with another technique for shrinking file size
-- simplifying cubic segments to quadratic ones when the control points
happen to be equal -- or with the use of real elliptical arcs (which Bezier
curves can only roughly approximate).

Following a straight-line segment, this limitation is understandable, since
there's no obvious choice of length for the control handle; but the rest of
the time, it makes no sense to me. Is there a compelling reason for it?

If not, I propose the following amendments to the commands T,t,S,s:

   - When either follows a quadratic-spline segment, it mirrors that
   segment's control point.
   - When either follows a cubic-spline segment, it mirrors that segment's
   second control point.
   - When either follows an elliptical arc of 180 degrees or shorter, it
   behaves as though that arc were the cubic-spline segment that best
   approximates it.
   - When either follows an elliptical arc longer than 180 degrees,
   it behaves as though that arc were the cubic-spline segment that best
   approximates the last 180 degrees of it.

On a related note, is there any reason we can't have smooth-closepath
commands? (They could work even if the first path segment *had* been a
straight line.)

Sincerely,
Chris Hennick
Trent University
Peterborough, ON, Canada
http://softwetware.blogspot.com/

Received on Monday, 31 March 2014 07:54:16 UTC