W3C home > Mailing lists > Public > www-svg@w3.org > April 2010

Is implied lineto after moveto ambiguous?

From: Rick <graham.rick@gmail.com>
Date: Wed, 21 Apr 2010 13:18:52 -0400
Message-ID: <l2u18569e001004211018kdd3ed2cawb7782df3715bab27@mail.gmail.com>
To: www-svg <www-svg@w3.org>
Hello Working Group.

In packing path data for a high traffic web feature, I came across
what I think is an ambiguity in the spec:

The definition for the moveto command (
http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands ) in path
is as follows:

Start a new sub-path at the given (x,y) coordinate. M (uppercase)
indicates that absolute coordinates will follow; m (lowercase)
indicates that relative coordinates will follow. If a relative moveto
(m) appears as the first element of the path, then it is treated as a
pair of absolute coordinates. If a moveto is followed by multiple
pairs of coordinates, the subsequent pairs are treated as implicit
lineto commands.

Lineto comes in two flavours, but no mention is made in the
definition, or in the implementation notes (
), as to which lineto is implied.

It would seem to me that a relative move should imply a relative
lineto and an absolute move would imply an absolute lineto.

Further to this, if a path starts with a relative move, it is seen as
an absolute move, since there is nothing for it to be relative to, but
it could/should be used to imply a relative lineto.

I haven't tested browsers, I would be willing to expend the effort if
any interest is shown.

Received on Wednesday, 21 April 2010 17:19:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:26 UTC