<div class="gmail_quote">On Wed, Mar 24, 2010 at 7:49 PM, pete davidson <span dir="ltr"><<a href="mailto:caitifty@gmail.com">caitifty@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Mar 24, 2010 at 7:42 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>
pete davidson wrote:<br>
<br>
> I'm producing maps in svg format using the cairo driver and d.out.file. One<br>
> thing I'd really like to be able to do is set one or more of the vector<br>
> layers to be partially translucent. After rummaging through this list, I'm<br>
> beginning to wonder if its possible at all, since translucency in the guis<br>
> seems to be handled by g.pnmcomp, but perhaps someone with more experience<br>
> knows a way to do it.<br>
<br>
</div>It isn't. The graphics API doesn't support an alpha component.<br>
<br>
Apart from anything else, it can't easily be implemented for<br>
PostScript output, as PostScript doesn't support translucency. Faking<br>
it with patterns is possible, but it starts getting complicated if you<br>
want more than one translucent layer.<br>
<div><br>
> The only workaround I've managed to find so far is to export each layer as<br>
> an individual svg, then use something like inkscape to rejoin them, setting<br>
> the translucency/transparency of each layer as I do it. Which is fine for a<br>
> map with only a few layers, but gets tedious when dealing with maps with<br>
> dozens of layers.<br>
<br>
</div>SVG is XML, so it shouldn't be especially hard to automate the process<br>
using generic XML-processing tools.<br></blockquote></div></div><div><br>Ohh, I hadn't thought of editing the svg/xml directly. Thanks for the suggestion, I'll see what I can achieve from there.<br></div></div></blockquote>
</div><br>And then we discover that the 'svg' produced by cairo using the above script is actually just a png in an svg wrapper.. At least for my particular install of Grass. That's frustrating. Ahh well, back to the drawing board.<br>
<br>Peter<br>