I have a problem with raphaeljs export plugin ( https://github.com/ElbertF/Raphael.Export ).
in a path element I use attribute fill
and as a source I give a image url to fullfill. But when I export this to SVG I see a path element definition, but when I export it to PNG, I do not see again.
So in my app I add an attr
to path
element like this:
paper.path("M 195 10 L 300 L 195 z").attr({'stroke-width': 0,'fill': 'url(images/alfen/02/murek.png)'});
and I export this with paper.toSVG()
and in my SVG I find a path:
<path transform="matrix(1,0,0,1,0,0)" fill="url(images/alfen/02/murek.png)" stroke="#000" d="M203,183.94389438943895L948,183.94389438943895L948,195L203,195Z" stroke-width="0"></path>
But when I transform this to PNG with:
<?php
$json = $_POST['json'];
$output = str_replace('\"','"',$json);
$filenameSVG = 'test';
file_put_contents("$filenameSVG.svg", $output);
$konwert = "convert $filenameSVG.svg $filenameSVG.jpg";
system($konwert);
I cannot find this path fulfilled with my background. Can anybody help?