W3C home > Mailing lists > Public > www-svg@w3.org > December 2002

markers and attribute inheritance

From: Brian Cuthie <brian@systemix.com>
Date: Thu, 12 Dec 2002 16:59:08 -0500
To: <www-svg@w3.org>
Message-ID: <00e401c2a229$b8639cd0$0a01a8c0@gizmo>

Hello,

I've got a drawing application (Visio like drawings for the Pocket PC,
www.pocketdraw.com) that uses a slightly modified SVG as its native file
format. SVG support has been limited to the stuff which is necessary for
diagramming, with some additional elements and attributes (new
namespace) added to support concepts such as connecting lines between
objects.

While working on the SVG exporter, I was horrified to discover that I
slightly misinterpreted the SVG marker behavior. In my implementation,
markers inherit attributes *after* they're deep cloned into the context
of their reference. This ensures that arrows, for example, take on the
color of the line that they're applied to.  

I see now that this is not how SVG implements markers, leading me to
wonder why. Am I the only one who thinks the current SVG marker behavior
is wrong? I can't help but question the utility of a marker that doesn't
automatically match the line it's applied to. Are all my "red" lines
supposed to use different marker definitions than my "black" ones? It
seems to me that you can always explicitly specify attributes in the
marker definition if you want its appearance fixed. But the SVG behavior
allow for marker reuse among lines with different attributes.  

Any opinions? Am I missing something?

Cheers,

-brian


Received on Thursday, 12 December 2002 17:05:11 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:24 GMT