Tahr 6.0.2 svg wrapper

Please post any bugs you have found
Post Reply
Message
Author
User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Tahr 6.0.2 svg wrapper

#1 Post by Geoffrey »

There is a problem with viewing images wrapped with a svg, this code should work,

Code: Select all

<svg width="640" height="480">
   <image xlink:href="./goofy.16.png"
   width="640" height="480" />
   <text x="50%" y="50%"
	  style="text-anchor: middle; fill: #000000; font-weight: bold; font-family: serif; font-size: 30px;">
       You Should See a png image behind this text     
</text>
</svg> 
save as test.svg, if run in /usr/share/backgounds then goofy.16.png should show behind the text using a image viewer, this should also work with gtkdialog

Code: Select all

<pixmap><input file>/path/to/test.svg</input></pixmap>
but don't, I can however convert to a pdf which shows the png using this code

Code: Select all

rsvg-convert -f pdf -o test.pdf test.svg
I came across this when trying to run a application I've been working on which works in other pups.
Attachments
test_pdf.jpg
(46.24 KiB) Downloaded 340 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#2 Post by Geoffrey »

I've tried it in racy and slacko, it dont show in the image viewers so I may be on the wrong track, but it does show in slacko and racy gtkdialog with this code

Code: Select all

#!/bin/sh
export test='
<window>
 <vbox>
    <pixmap>
    <input file>./test.svg</input>
    </pixmap>
 </vbox>
</window>'
gtkdialog --program=test
I'll continue to try and track down the culprate.
Attachments
racy-gtkdialog.jpg
(69.78 KiB) Downloaded 314 times
Last edited by Geoffrey on Fri 13 Mar 2015, 23:06, edited 1 time in total.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#3 Post by Geoffrey »

I can't find any clues to the problem, but I can work around it with rsvg, so it's not urgent.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#4 Post by MochiMoppel »

Everything is fine as long as you use absolute paths for your image. Relative paths seem to work only in browsers. Inkscape has the same limitation. Hardly a "bug", and definitely not a Tahr issue.

Post Reply