[Clipart] Gradients: sugestion

Bryce Harrington bryce at bryceharrington.com
Mon Jul 5 12:52:05 PDT 2004


On Mon, 5 Jul 2004, [ISO-8859-1] Alberto Simões wrote:
> Hmms..
> This is more tricky than I though.
> One of the problems, should be that I don't know SVG :-) I am trying
> to learn by differences :)
> 
> So, we have a <linearGradient> in a gradient.svg file. To use it I must:
>   1. put a defs around it

It should actually already have the <defs> around it; if not, it is an
incorrect file, so yes that would need to be added.

The <defs> area is the place where you define things that aren't really
drawing objects, but are used to stylize the drawing objects.  So things
like gradients, patterns, markers, etc.  This way, if you use the same
gradient 100 times in your drawing, there only needs to be 1 definition
of it, which saves space as well as making it easy to update all the
gradients that use it, at once.

>   2. add another linearGradient with stops (do not know well what's this)

You should run Inkscape and play with the gradient editor to learn what
stops are.  Basically, a gradient can morph from one color to another,
and possibly to another, and another...  At each point where it has
morphed to a new color, that is a 'stop', basically.  Again, play with
inkscape's gradients and it will make sense; it's hard to explain.

But no, you do not need to add a second linearGradient; I think that is
just the default one that Inkscape puts in the file.  You can omit that
without trouble; sorry I should have deleted it before I sent the file
along.

>   3. put the XML relative to the rectangle.
> 
> So, the point 3 is easy to understand.
> The first, Is not. But, being necessary, it is easy to add.
> The third point is tricky, specially because I can't understand it well.
> 
> Where am I wrong?
> Or, if I am not wrong, can anybody help me with point 2?

HTH,
Bryce




More information about the clipart mailing list