Raphael.Export icon indicating copy to clipboard operation
Raphael.Export copied to clipboard

cannot export path's background image

Open gerpaick opened this issue 13 years ago • 3 comments

Hi, i am not sure if it is this plugin issue, or my code is wrong. what i need is to export to svg ma paper and the convert it to jpg. i have a path with fill:backgournd.jpg and i cannot get it on my jpg after conversion.

my js code to create this path is more or less:

paper.path("M 190 L 190 L 300 L 250 195 z").attr({'stroke-width': 0,'fill': 'url(images/alfen/02/murek.png)'});

after exporting it to svg i can find with firebug that a variable has:

<path transform="matrix(1,0,0,1,0,0)" fill="url(images/alfen/02/murek.png)" stroke="#000" d="M10,175.65181518151815L948,175.65181518151815L948,195L10,195Z" stroke-width="0"></path>

and my php code for converting is:

<?php 
$json = $_POST["json"];
$output = str_replace('\"','"',$json);
$filenameSVG = 'test';
file_put_contents( $filenameSVG . '.svg', $output);
$konwert = 'convert ' . $filenameSVG .'.svg ' . $filenameSVG .'.jpg';
system($konwert);
?>

but i cannot get it working correctly. i mean, that all svg is converted good, except background for this path.

hope you can help...

thanks

gerard

gerpaick avatar Jun 14 '12 23:06 gerpaick

This is a limitation of the plugin, I haven't specifically implemented background images yet. I'll add support for it at some point (or you can try adding it yourself).

AliasIO avatar Jun 20 '12 01:06 AliasIO

thanks for reply. currently i cannot code because of lack of time. maybe in late september or october i will try to help.

gerpaick avatar Aug 07 '12 11:08 gerpaick

Was a solution ever found for this?

dottodot avatar Aug 10 '14 13:08 dottodot