Re: Bearing path command

Paul LeBeau wrote:
> It occurs to me that there is a side-effect to bearing that may be
> undesirable.
> At present you can append two independent paths safely and know that
> each subpath will remain the same.  However that won't be the case with
> bearing as it is defined now.

That is almost true.  If you begin a path with "m 0,0" it's treated like 
"M 0,0" (except that any subsequent coordinates are still treated as 
relative).  So you can't append two path strings together if the second 
begins with "m".

> In order for a user or a program to safely append two paths, a "B 0"
> will now need to be inserted between them.  If the user is trying to
> stick to relative commands, then the first path will have to be analysed
> to determine the bearing in effect at the end of the path and a
> counter-acting bearing inserted.
> Would it perhaps make sense for the bearing to reset at the end of a
> subpath (Z/z/M/m)?

Maybe, I'm not sure.  Not having the bearing reset makes the feature 
slightly more expressive.  For example what if you wanted to set the 
bearing for a command following a "Z" or a "M" to be relative to the 
direction that closing path segment or movement took?

> Also, I still kind of feel that any absolute path command ought to reset
> it as well.  Is a mixed path like "M 100 100 b 25 h 20 L 30 50 h 20"
> very useful?

Yeah I don't know whether it is useful.  I haven't made any examples yet 
that use the bearing after an absolute command like that.  Do you think 
that absolute commands "feel" like they should reset the bearing back to 0?

Received on Thursday, 13 February 2014 20:24:28 UTC