W3C home > Mailing lists > Public > public-svg-wg@w3.org > July to September 2011

Re: rotated path segment proposal

From: Dirk Schulze <dirk@dschulze.com>
Date: Sun, 24 Jul 2011 08:03:13 +0200
Cc: public-svg-wg@w3.org
Message-Id: <D0CE1D33-A126-43A4-AD89-73B513F94F16@dschulze.com>
To: Cameron McCormack <cam@mcc.id.au>
Hi Cameron,

just some questions for clarification. First: If an author sets a rotation it is used for every following f/F? Does the rotation level always rely to the current userspace of the path? Means independent of the current 'direction' of the path?

If we take the userspace for rotation and not the current direction and the last set rotation value is used, this would give us a straight diagonal line:

M0,100 r-45 f70.71 f70.71

If we would take the current direction of the path, the path direction was rotated by 45 degree and we have to rotate it a second time on the second f-segment . This would lead to a vertical line for the last segment.

The reason why I ask this is, that the idea of 'rotation' and 'forward' reminds me to turtle graphic. And I guess a lot of developers remember this simple programming language, since it is used on many schools to get a feeling for programming. And turtle graphic takes the current direction of the path. But turtle graphic just uses forward and backward and no arcs or curves like we have for SVG Path. Thats means it is possible to interpret the behavior with: store last set rotation level and take this for the direction of the next segment in userspace (first interpretation on the top of this mail). The only hint that the turtle takes the current direction of the path and does not rely to the userspace is, that the turtle gets rotated itself too.

But it could be difficult to get the current direction of a path after applying a curve or arc. The same for M0,0 L0,0. So using the rotation to the basis of the userspace might make most sense. At least it is easier to implement.

I hope my description wasn't  too difficult.


> Hello WG.
> I put some text on the wiki for my rotated path segment proposal:
> http://www.w3.org/Graphics/SVG/WG/wiki/Proposals/Path_data_turtle_graphics_proposal
Received on Sunday, 24 July 2011 06:03:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:13 UTC