RE: Does PATH need a new attribute?

Just a quick remark (sorry for not having more time) – the superpath proposals developed by Professor Moissinac (fairly recently) and sort of suggested rudimentarily by me and him circa 2007 involve breaking paths (sorta like vePath in SVG 1.2) into segments for purposes of 

a)      Reducing file size in large maps (where regions share complex polygons)

b)      Reducing redundancy in declaration of boundaries of large maps

c)       Animating subpaths of complex paths in which parts (like legs) might move independently of bodies, but still share the same stroking, fill, and “modifiers”  (such things as clips, masks, filters, animations, replications and the like) as the superpath.l

 

I was thinking about the relevance here before Amelia wrote this.  What Jean Claude demonstrated to me that made superpath distinct from vePath was the necessity of “orientation.” Some of the proposals for advanced gradients and warping (like meshes) also bring in this idea of topological orientability. 

 

It is fun stuff and practical too I think. Sorry for postquoting or whatever it is.

 

Regards

D

From: Amelia Bellamy-Royds [mailto:amelia.bellamy.royds@gmail.com] 
Sent: Thursday, April 16, 2015 8:36 PM
To: www-svg
Cc: Smailus, Thomas O
Subject: Re: Does PATH need a new attribute?

 

To focus on the core issue (and not the specific example Thomas provided), the question really comes down to: 

 

Can we make it possible in SVG to create stroke effects that apply to only certain segments in a complex shape?

 

In CGM, as I understand it, this particular on/off stroking effect is included within the basic path geometry instructions.  However, there are many more general cases as well.  In data viz/d3, we often get people asking if it is possible to color one section of a polyline-type path differently than the others.

 

The solution that currently exists is the same solution that Thomas is using for his CGM conversions: create two (or more) paths, one to draw the fill, and the other(s) to draw the line segments.  But as Thomas pointed out, that loses the "connectedness" of the strokes, which can have effects e.g. in linejoins.

 

I'm somewhat concerned about the idea of mixing stroking instructions in with path data because it muddles up geometry and painting styles.

 

In my mind, the best approach--in the sense of most generalizable--would be to use the "superpath" idea, where you could construct a single filled shape as the concatenation of multiple segments.  Fill styles would apply to the entire shape, but stroke styles (including stroke: none) could apply to subpaths.  (We'd probably be able to poach a lot of the CSS border style rules for defining how to connect two stroke segments with different styles.)

 

I confess I haven't had a chance to look through the various proposals for superpath-type elements carefully, so I don't know if any of them currently include the option of styling the strokes on subpaths individually.  But, I don't expect that it would be a major conflict to try to integrate the idea.  After all, since stroke styles are inherited, you would always be able to stroke the entire superpath shape as normal just by setting the stroke styles on it and not on the subpaths.

 

AmeliaBR

 

 

 

Received on Friday, 17 April 2015 03:43:07 UTC