sharp icon indicating copy to clipboard operation
sharp copied to clipboard

SVG with transform-origin property

Open baravak opened this issue 4 years ago • 1 comments

code

<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300" xml:lang="fa">
  <rect x="0" y="0" width="300" height="300" fill="white"/>
    <g transform="scale(-1, 1)" transform-origin="center">
        <rect x="50%" y="35" width="39" height="30" fill="#007BA4"  transform="scale(1, 1)" transform-origin="center"/>
        <text x="50%" y="35" transform="translate(19.5, 15) scale(-1, 1)" transform-origin="center" text-anchor="middle" dy="4" fill="white">-13</text>
      </g>
</svg>

Chrome image

output new-file

baravak avatar Sep 11 '21 11:09 baravak

Hi, the transform-origin property is SVG2 and part of the CSS Transforms Module - please see https://gitlab.gnome.org/GNOME/librsvg/-/issues/754

lovell avatar Sep 11 '21 14:09 lovell