Re: rotated path segment proposal

>> 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.
> 
> No second rotation.
> 
>> 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 don't follow why it would be difficult to get the current direction of the path for curves and arcs -- we need to know the direction so that markers can be oriented correctly, etc.  Whatever the current rules are for determining path direction would be used for tricky cases like "M0,0 L0,0" too.


I just had another thought with the direction of a path. It could be possible to take the direction of the path as the rotation level: M0,0 L100,100 F 100. Forward would continue the direction of the first two segments. You'd see a straight line. Means without setting the rotation to 45 degree we would take it, since the last point points into this direction. But I'm neither sure if it is always possible to get the direction, nor if it makes sense.

Dirk

PS: Should these kind of discussion go to www-svg as well?

Received on Monday, 25 July 2011 17:03:29 UTC