mirror of
https://github.com/Chouchen/svgToImage.git
synced 2020-02-03 22:08:42 +01:00
Ajout de texte dans l'image
Ajout des lignes à tirets Ajout de la "prise en compte" (ou plutôt de l'ignore-mode) des <g>
This commit is contained in:
10
test.php
10
test.php
@@ -26,18 +26,20 @@ $svg = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="600" height
|
||||
<circle cx="50" cy="50" r="50" fill="turquoise" stroke="#000"></circle>
|
||||
<circle cx="100" cy="50" r="40" stroke="#000" stroke-width="2" fill="none"/>
|
||||
<image x="170" y="277" width="48" height="66" preserveAspectRatio="none" href="http://labs.shikiryu.com/experimental-cut/images/pieces/1.png" style="cursor: move; opacity: 1; " r="90" opacity="1" transform="rotate(21.91207728 194 310)"></image>
|
||||
<path d="M50 50 V150 H150 L200 50 Z" stroke="red" stroke-width="3" />
|
||||
<path d="M50 50 V150 H150 L200 50 Z" stroke="red" stroke-width="3" stroke-dasharray="2,2" />
|
||||
<polygon points="60,150 160,60 260,150 210,250 110,250" stroke="red" stroke-width="3"/>
|
||||
|
||||
<polyline stroke="gray" stroke-width="5"
|
||||
points="80,250 80,280 60,280 60,310 80,310 80,340 40,340 40,370 80,370 80,400 20,400 20,430 80,430" />
|
||||
</svg>';
|
||||
|
||||
$svgtoimage = SVGTOIMAGE::parse($svg);
|
||||
//$svgtoimage = SVGTOIMAGE::parse($svg);
|
||||
//$svgtoimage = new SVGTOIMAGE($svg);
|
||||
//$svgtoimage = SVGTOIMAGE::load('france.svg');
|
||||
$svgtoimage = SVGTOIMAGE::load('Exemple_histogramme.svg');
|
||||
//$svgtoimage = SVGTOIMAGE::load('basic.svg');
|
||||
$svgtoimage->setShowDesc();
|
||||
$svgtoimage->setWidth(300);
|
||||
$svgtoimage->setHeight(512);
|
||||
//$svgtoimage->setWidth(300);
|
||||
//$svgtoimage->setHeight(512);
|
||||
//header('Content-type: image/png');
|
||||
echo $svgtoimage->toImage();
|
||||
Reference in New Issue
Block a user