Re: Bearing path command

Hi Paul,

Paul LeBeau wrote:
> I was just looking at the latest draft and noticed the inclusion of the
> new B/b bearing path command.  This is the first time I've seen this new
> feature, so apologies if this has been discussed before.

This is the first WD it's appeared in.

> I think this section may need a little expansion, as it raised some
> questions for me about implementation.
>
> 1. The first line says it "influences the orientation of subsequent
> relative path commands".  Does that mean that it, in effect, rotates the
> axes for subsequent (relative) path commands?  The only example provided
> used 'h' commands.  What effect does it have on other commands?

In the section of each command it describes what effect the current 
bearing has.  For example see below the table in 
https://svgwg.org/svg2-draft/paths.html#PathDataLinetoCommands for what 
a relative lineto command means in terms of the current point and 
current bearing.

> 2. What happens if there is an absolute command next, or after that?
>   Does it reset the bearing?  Does subsequent mean all subsequent
> relative commands of just the consecutive ones after the bearing command?

No, the only commands that influence the current bearing are "B" and 
"b".  If you have a sequence of segments "M, B, l, L, l" then the 
current bearing will be the same value for all three lineto commands, 
and it will affect both of the relative linetos.

> 3. If an absolute command doesn't reset the bearing, is there anything
> that does?

Just "B" and "b".

> 4. Does the bearing have any effect on the orientation of markers?

That wasn't my intention but it's a good question.  I think vertex 
markers shouldn't be rendered on each B/b command.  So for something 
like "M 100,100 B 45 h 100 b 90 h 100 b 90 h 100" you would still only 
get three vertex markers, and they would be at the same orientation as 
if you'd written the path string using only absolute path commands and 
without the bearing commands.

Received on Thursday, 13 February 2014 05:08:44 UTC