W3C home > Mailing lists > Public > www-svg@w3.org > September 2004

Re: Paths for gradients...

From: Philippe Lhoste <PhiLho@GMX.net>
Date: Sun, 26 Sep 2004 10:50:54 +0200
Message-ID: <415682EE.2030309@GMX.net>
To: "SVG (www) list" <www-svg@w3.org>

Anthony Batchelor wrote:
>  I'm a user of Inkscape and when using it I came up with an idea for
> gradients.  I submitted a feature request to them and had a reply which
> is attached below.
>   The basic idea for this feature would be to have a gradient path.  In
> Inkscape I can draw with the Bezier tool and then adjust the path with
> the points and move them to make the line bend how I want.  I think it
> would be really useful (and cool) if, instead of a line, I could use the
> same technique to adjust the directions a gradient faces in an object
> (also with multiple point each selectable and able to have their
> directions different from the other points). So, the gradient can be
> twisted in different directions.
> I hope I managed to convey myself properly, and if you need any clearing
> up on the idea, just ask.

That's funny, I was thinking exactly the same thing and was about to ask
a similar request.

You want probably something like that:
http://pingus.seul.org/~grumbel/tmp/svg/CASPER.svg

Currently, the most used way to simulate such effect is to draw many
paths side-by-side, with colors changing slightly from one path to the next.
Of course, this way is tedious and difficult to do, prone to errors,
very hard to edit (change the curve...), almost impossible to code by
hand, and leads to very large files (lot of paths): 150KB for the given
file, which are slow to display.

Now, a graphic editor like Inkscape can handle most of the work, ie. it
can simulate the gradient along path with the above method, and keep
info to allow easy editing. Back to feature request :-) But the problem
of the file size remains.

On the other side, gradient along path will probably be difficult to
define, to implement and will slow down display (althought probably less
than the "many paths" method).

Note that while we are on the feature requests (probably for the 1.3
version, if ever), it would be nice to have complex brush effects,  la
Expression: http://www.microsoft.com/products/expression/default.asp?pg=tr

Oh well, perhaps for SVG 2.0... When everybody will have computers above
3GHz/1GB...

That, and the variable width strokes, already requested...

-- 
Philippe Lhoste
--  (near) Paris -- France
--  Professional programmer and amateur artist
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --
Received on Sunday, 26 September 2004 08:53:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:55 UTC