We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to output a png image from a svg but I get unexpected behavior with the style I use.
<?php require_once ("./vendor/autoload.php"); use SVG\SVG; $image = SVG::fromFile('./test.svg'); $doc = $image->getDocument(); $raster = $image->toRasterImage($doc->getWidth(), $doc->getHeight()); imagepng($raster);
<svg height="100" width="200"> <style> rect { fill: red; } circle { fill: darkgray; } .container circle { fill: green; } .container rect { fill: blue; } </style> <circle cx="50" cy="50" r="40"/> <rect x="30" y="30" width="40" height="40"/> <g class="container"> <circle cx="150" cy="50" r="40"/> <rect x="130" y="30" width="40" height="40"/> </g> </svg>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to output a png image from a svg but I get unexpected behavior with the style I use.
PHP code sample
input SVG source
Input SVG image
Output PNG image
Observations
The text was updated successfully, but these errors were encountered: