inkscape

Flattening SVG matrix transforms in Inkscape

眉间皱痕 提交于 2019-11-28 04:30:00
I have a free clip art SVG file originally created in Inkscape which I'm making modifications to for use in a Windows 8 JavaScript game. It contains numerous instances of a path with a matrix transform applied on a surrounding group, like this: <g transform="matrix(0.443,0.896,-0.896,0.443,589.739,-373.223)"> <path d="M486,313s27-9,43-29l26,4,1,23-22,5s-25-6-48-3z" /> </g> I want to flatten that transform by applying it in advance to the path in Inkscape, to reduce browser work during animation. However when I plug the 6 matrix values into the A B C D E F parameters in Inkscape and apply it,

Convert SVG to transparent PNG with antialiasing, using ImageMagick

旧城冷巷雨未停 提交于 2019-11-28 03:32:33
I want to convert SVG images to PNG files with transparent background and anti-aliased edges (using semi-transparent pixels). Unfortunately I can't get ImageMagick to do the anti-aliasing, the edges always look terrible. Here's what I tried: convert +antialias -background transparent in.svg -resize 25x25 out.png Any ideas or a different command line tool I could use? halfer Inkscape will do this: inkscape \ --export-png=out.png --export-dpi=200 \ --export-background-opacity=0 --without-gui in.svg As a side note, I found that getting transparency was a bit tricky. Instead of using transparent ,

Flattening SVG matrix transforms in Inkscape

可紊 提交于 2019-11-27 05:21:42
问题 I have a free clip art SVG file originally created in Inkscape which I'm making modifications to for use in a Windows 8 JavaScript game. It contains numerous instances of a path with a matrix transform applied on a surrounding group, like this: <g transform="matrix(0.443,0.896,-0.896,0.443,589.739,-373.223)"> <path d="M486,313s27-9,43-29l26,4,1,23-22,5s-25-6-48-3z" /> </g> I want to flatten that transform by applying it in advance to the path in Inkscape, to reduce browser work during

Convert SVG to transparent PNG with antialiasing, using ImageMagick

怎甘沉沦 提交于 2019-11-27 05:09:42
问题 I want to convert SVG images to PNG files with transparent background and anti-aliased edges (using semi-transparent pixels). Unfortunately I can't get ImageMagick to do the anti-aliasing, the edges always look terrible. Here's what I tried: convert +antialias -background transparent in.svg -resize 25x25 out.png Any ideas or a different command line tool I could use? 回答1: Inkscape will do this: inkscape \ --export-png=out.png --export-dpi=200 \ --export-background-opacity=0 --without-gui in

Removing transforms in SVG files

∥☆過路亽.° 提交于 2019-11-26 16:52:56
I have been struggling with this for a while, and can't seem to find an answer (that works) anywhere. I have an SVG file which looks like this: <svg xmlns:dc="http://purl.org/dc/elements/1.1/" ... width="72.9375" height="58.21875" ...> ... <g ... transform="translate(10.75,-308.96875)" style="..."> <path inkscape:connector-curvature="0" d="m -10.254587,345.43597 c 0,-1.41732 0.17692,-2.85384 0.5312502,-3.5625 0.70866,-1.41733 2.14518,-2.82259 3.5625,-3.53125 1.41733,-0.70866 2.11392,-0.70867 3.53125,0 1.41732,0.70866 ... z" ... /> </g> </svg> I want to remove the transform="..." line but still

Inkscape inside PHP/Apache doesn&#39;t render fonts to PNG

余生长醉 提交于 2019-11-26 08:35:34
问题 An issue I discover today is similar to this unanswered problem; though not the same, it may have the same cause. I\'m rendering SVG files using inkscape , as either PNG or PDF. For the most part I intend to use Gearman to render these in the background, but for now I am creating some thumbnails inside a PHP/Apache process. It seems that if inkscape is called (via PHP\'s exec ) inside an Apache process, it cannot find the fonts it needs to render. Thus, the graphic elements render fine, but

How to set a stroke-width:1 on only certain sides of SVG shapes?

孤街浪徒 提交于 2019-11-26 07:43:16
问题 Setting a stroke-width: 1 on a <rect> element in SVG places a stroke on every side of the rectangle. How does one place a stroke width on only three sides of an SVG rectangle? 回答1: If you need stroke or no-stroke then you can also use stroke-dasharray to do this, by making the dashes and gaps match up with the sides of the rectangle. rect { fill: none; stroke: black; } .top { stroke-dasharray: 0,50,150 } .left { stroke-dasharray: 150,50 } .bottom { stroke-dasharray: 100,50 } .right { stroke