W3C home > Mailing lists > Public > www-svg@w3.org > October 2011

Re: painting the dashes and gaps in a stroke-dasharray

From: Rick <graham.rick@gmail.com>
Date: Tue, 25 Oct 2011 12:16:05 -0400
Message-ID: <CAGDjS3eX9V_P1VAvOLzoTd2B=rqUWBkXs02tfyoWxxXSE_A6_g@mail.gmail.com>
To: David Dailey <ddailey@zoominternet.net>
Cc: www-svg <www-svg@w3.org>
How about stroke-background?  (or stroke-bg)

On Tue, Oct 25, 2011 at 11:49 AM, David Dailey <ddailey@zoominternet.net> wrote:
> Frequently, one wishes to determine the colors of both the gaps and the
> dashes of a stroke.
>
>
>
> Usually I have done this by drawing two (or more) copies of the path with
> different strokes: http://srufaculty.sru.edu/david.dailey/svg/notknot.svg
>
>
>
> When the paths, though are huge (as in cartography) then repeatedly drawing
> the path is not so efficient, performance-wise.
>
>
>
> So in the use case where we have a boundary of a region that is stroked one
> color on the French side and another color on the Belgian side and where
> there may be a lake contained in France but sharing the border with Belgium,
> we may wish to be able to adjust both colors of the dasharray as it has been
> dually positioned on either side of a path segment shared by two superpaths.
>
>
>
> One way to do this would be
>
>
>
> <path stroke=”red” stroke-dasharray="8,18" stroke-gappaint=”blue”>
>
>
>
> Another more expressive syntax would allow independent coloration of each
> segment of the dash-array:
>
>
>
> <path stroke=”red” stroke-dasharray="8,18,8,18"
> stroke-dashpaint=”red,green,red,yellow” > in which paint server to each
> segment of the path is author-controlled.
>
>
>
> The latter might be very handy for mathematicians and jewelry makers (there
> is a theory of beading and necklaces, that ties in rather nicely to the
> theory of knots, as applied to weaving, fabric and textiles. BTW, I have run
> into people in the textiles industry who are using SVG!). But, generally, I
> am of the theory that more expressiveness is better, (particularly when it
> is cheap, effort-wise), since the endless creativity of humans will usually
> find something to do with the tools they are given.
>
>
>
>
>
> Cheers
>
> David
>
>
>
>



-- 
Politicians should wear uniforms like Nascar drivers.
Emblazoned with their corporate sponsors.
Received on Tuesday, 25 October 2011 16:16:37 GMT

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