gradients and stuff

Post questions on how to use or achieve an effect in Inkscape.
zacariaz
Posts: 4
Joined: Fri Apr 01, 2011 9:32 pm

gradients and stuff

Postby zacariaz » Fri Apr 01, 2011 9:46 pm

Hi all.

This is my first and probably only post as I'm not really good at these things, however, I do need to solve this problem and no matter how much I try, I fail continuously.

Basically I need to turn this
SVG Image

in to this

Image

The resizing is not important, but the gradient is very trouble some. As you clearly see, the raster approach don't look too handsome and I just can't figure out how to do it in inkscape. Using the object fill/stroke thingy, sometimes it works and sometimes it don't, but even when it works, I simply can't seem to figure out how to alter the gradient to serve my needs.

basically I need alpha 255 at the top and alpha 0 at the bottom, though I may want to experiment a bit.


I do hope you can help.

Best regards.

zacariaz
Posts: 4
Joined: Fri Apr 01, 2011 9:32 pm

Re: gradients and stuff

Postby zacariaz » Sat Apr 02, 2011 1:10 am

Now that my posting has finally been approved, I've actually figured it out my self, though with no help from inkscape.

I've also cleaned out all the unnecessary crud from svg file generated by inkscape, provided proper doctype and such, though there are still some leftovers I don't quite understand. and also I'd really like that standard dimensions of it all to be exactly 800*120, which is kinda tough.

Anywhe5re, here's the result so far.

SVG Image

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: gradients and stuff

Postby druban » Sat Apr 02, 2011 3:08 am

Hi zacarias!
I don't know what the main problem you are having is, so I did this example with a few hints. You have to have two text objects (or text that has been converted to paths, but it's not necessary to do that).
The right hand object has had a rectangle filled with any color placed over it, text and rectangle selected, and then combined (path menu). This should knock the text out of the rectangle (if it doesn't and everything turns one color, then you need to switch your "fill rule" in the fill and stroke dialog box, I have circled the icon in the screenshot), and both sides can now be filled with the :tool_gradient: using a black to transparent gradient. The :tool_gradient: is a little glitchy but persevere and you will figure it out.
g4133.png
g4133.png (175.35 KiB) Viewed 1258 times

The best thing about doing it this way is that nothing is permanent, you can use the :tool_node: to change the rectangle's shape so it precisely lines up with the text AFTER you have done the effect. The same tool can be used to adjust your gradient.
g4165.png
g4165.png (200.08 KiB) Viewed 1254 times

Good luck!
Your mind is what you think it is.

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: gradients and stuff

Postby RobA » Sat Apr 02, 2011 4:02 am

The provided link is already SVG.

Open it into inkscape. Click on the logo. The status bar shows it is a group. Object Ungroup. (still a group.) Object Ungroup. (still a group.) Object Ungroup. Now a path!

Use the gradient tool :tool_gradient: and click at the top of the logo and drag to the bottom of the logo (hold the control key to help constrain the drag to vertical).

Save.

-Rob A>

zacariaz
Posts: 4
Joined: Fri Apr 01, 2011 9:32 pm

Re: gradients and stuff

Postby zacariaz » Sat Apr 02, 2011 8:24 am

Thanks for the comment and the tutorial. I'll make sure to look at it more closely tomorrow. Always nice to learn something new.

As I explained in my second post though, I did solve the problem initially. w3school is good for something after all...

As for the size, I've simply opened it in inkscape and resized it using that.

Regarding the fact the it is not necessary to convert the text to a path, now that's an interesting topic.
Thing is, as I originally started this little project of mine, that was exactly what I did and at the time it was also very important as I had an idea or two involving funny dynamic stuff. never mind that. Thing is though, that some of the letters were positioned just a tad higher or lower than the other, which I dare say is not my expectation from such a popular piece of software. Suppose it could have been the font or something.
Anyway, I converted it to a path and adjusted it to fit exactly as it should and took it from there.

Only thing left is that I don't quite understand the transform/matrix... Well I don't understand it at all to be honest, but hen again, that is not an inkscape question, but rather a general SVG question which may not be answered here. In any case, it work perfectly now. Just don't understand why two nested g tags with each a transform matrix is needed at all or what it actually does. I should think that the path should be enough.

Again thanks for the help.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: gradients and stuff

Postby ~suv » Sat Apr 02, 2011 5:10 pm

zacariaz wrote:Just don't understand why two nested g tags with each a transform matrix is needed at all or what it actually does.
When you transform (move, scale, stretch, rotate, skew) a group in Inkscape, the transformation is stored as an explicit 'transform' attribute to the group (all transformations are merged into one matrix). Ungrouping a group ('Ctrl+u') applies this (parent) transformation to each of the (former child) objects (paths, shapes, groups, …) which had been inside the group.

The groups in your example are (most likely) the result of converting text to path (creates a group of individual paths for each character). You can "purge" the group right after converting the text ('Object > Ungroup' or 'Ctrl+u') and - if you don't want separate paths for the individual glyphs - apply 'Path > Combine' ('Ctrl+k') to the selection you have after ungrouping. Then you can work with the path itself, which - with normal preferences for transforms - will optimize any further transformations directly into the path data instead of using a preserved 'transform' attribute.

zacariaz
Posts: 4
Joined: Fri Apr 01, 2011 9:32 pm

Re: gradients and stuff

Postby zacariaz » Sat Apr 02, 2011 8:05 pm

Well, thanks to ~suv, I don't think I need bother you anymore.

Here the latest and probably final on
SVG Image


Return to “Help with using Inkscape”