Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale svg shape along one axis without distorting strokes and borders

Tags:

svg

inkscape

Here I have this kind of svg image with some magnetic field plotted (a zoomed extract in png)

normal picture

I need to scale it along the x axis only, I did it with Inkscape (which use svg scale or matrix transform operations), and I get this :

scaled picture

But borders and strokes became uneven, I would like to be able to scale the positions of the paths and shapes without skewing the stroke themselves... Possibly with Inkscape, or with any script based procedure. Do you know a trick ?

Edit (link to the original pictures, with the scaling problem, on the second one we can clearly see that the width of the strokes and borders is compressed along the x axis)

  • https://drive.google.com/file/d/0B8WF7wbMU-x_aUd3YXVuQ3lXTTQ/view?usp=sharing
  • https://drive.google.com/file/d/0B8WF7wbMU-x_bk1EX2k4RmdSUjg/view?usp=sharing
like image 310
yota Avatar asked Oct 17 '25 18:10

yota


2 Answers

If you select the whole SVG, or a group of paths and apply a transform to the group, then everything inside the group will be affected by the transform. As you have seen.

The laborious fix is to separate the magnetic field lines from the magnet. Scale the magnet. Then manually reposition the field line path points so that they are again in the right place.

A quicker, clumsier fix is to set vector-effect="non-scaling-stroke" on all paths. As I have done in the demo below.

path {
  vector-effect: non-scaling-stroke;
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   version="1.1"
   id="svg2"
   viewBox="0 0 563.82182 362.26449"
   height="102.23909mm"
   width="159.12305mm">
  <defs
     id="defs4">
    <linearGradient
       id="linearGradient4241">
      <stop
         id="stop4213"
         offset="0"
         style="stop-color:#0000ff;stop-opacity:1;" />
      <stop
         id="stop4215"
         offset="1"
         style="stop-color:#ff0000;stop-opacity:0.99823529" />
    </linearGradient>
    <linearGradient
       gradientTransform="matrix(0.82241962,0,0,0.89095453,63.969225,-1206.069)"
       gradientUnits="userSpaceOnUse"
       y2="546.27576"
       x2="75.756363"
       y1="546.27576"
       x1="32.835037"
       id="linearGradient4217"
       xlink:href="#linearGradient4241" />
    <linearGradient
       gradientTransform="matrix(0.82241962,0,0,0.89095453,-44.030777,232.65547)"
       gradientUnits="userSpaceOnUse"
       y2="546.27576"
       x2="75.756363"
       y1="546.27576"
       x1="32.835037"
       id="linearGradient4217-7"
       xlink:href="#linearGradient4241" />
    <linearGradient
       gradientTransform="matrix(0.82241962,0,0,0.89095453,-763.39297,-432.70679)"
       gradientUnits="userSpaceOnUse"
       y2="546.27576"
       x2="75.756363"
       y1="546.27576"
       x1="32.835037"
       id="linearGradient4217-6"
       xlink:href="#linearGradient4241" />
    <linearGradient
       gradientTransform="matrix(0.82241962,0,0,0.89095453,-152.03077,-1206.069)"
       gradientUnits="userSpaceOnUse"
       y2="546.27576"
       x2="75.756363"
       y1="546.27576"
       x1="32.835037"
       id="linearGradient4217-4"
       xlink:href="#linearGradient4241" />
    <linearGradient
       gradientTransform="matrix(0.82241962,0,0,0.89095453,675.33143,-432.7068)"
       gradientUnits="userSpaceOnUse"
       y2="546.27576"
       x2="75.756363"
       y1="546.27576"
       x1="32.835037"
       id="linearGradient4217-1"
       xlink:href="#linearGradient4241" />
  </defs>
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     transform="translate(-73.662629,-665.93152)"
     id="layer1">
    <g
       transform="matrix(0.29856128,0,0,1,355.57359,149.50258)"
       id="g4507">
      <g
         id="g4320">
        <path
           id="path4153"
           d="m 0,552.3622 c 80.812204,0 59.093923,140 59.093923,140"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4155"
           d="m 0,602.84432 c 58.643249,0 55.55839,89.51788 55.55839,89.51788"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4157"
           d="m 0,626.3622 c 47.984904,0 52.528,66 52.528,66"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4159"
           d="m 0,641.3622 c 41.612891,0 48.992398,51 48.992398,51"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4161"
           d="m 0,687.19206 c 15.185923,0 22.728432,5.17014 22.728432,5.17014"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4163"
           d="m 0,683.0762 c 19.642857,0 27.5,9.286 27.5,9.286"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4165"
           d="m 0,678.07649 c 23.417381,0 30.51405,14.28571 30.51405,14.28571"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4167"
           d="m 0,672.89792 c 26.255466,0 33.035714,19.46428 33.035714,19.46428"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4169"
           d="m 0,666.46935 c 27.201534,0 36.25,25.89285 36.25,25.89285"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4171"
           d="m 0,660.93363 c 32.150793,0 40.535714,31.42857 40.535714,31.42857"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4173"
           d="m 0,651.8262 c 35.357594,0 44.821429,40.536 44.821429,40.536"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4175"
           d="m 63.63961,692.3622 c 0,0 16.981931,-136.99505 106.5711,-136.99505 45.49797,0 74.75128,38.38366 74.75128,78.28682 C 244.96199,721.63008 135,722.48612 135,722.48612"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4177"
           d="m 67.680221,692.3622 c 0,0 14.423127,-67.29452 63.134529,-67.29452 33.27827,0 45.96195,30.66778 45.96195,42.4264 0,41.79791 -41.7767,47.53845 -41.7767,47.53845"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4179"
           d="m 71.720831,692.3622 c 0,0 11.094741,-43.05086 48.992399,-43.05086 16.3308,0 33.84011,16.60672 33.84011,32.32488 0,19.68808 -19.55334,26.76904 -19.55334,26.76904"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4181"
           d="m 75.256365,692.3622 c 0,0 11.573597,-29.0239 37.880725,-29.4138 18.75404,-0.27796 30.05204,14.05467 30.05204,25.63262 0,9.73554 -8.18913,12.75318 -8.18913,12.75318"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4183"
           d="m 78.539361,692.3622 c 0,0 8.215091,-19.94362 32.577419,-19.94362 7.6532,0 28.28427,7.24916 28.28427,19.44543 0,3.62409 -4.40105,4.29315 -4.40105,4.29315"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4185"
           d="m 81.191011,692.3622 c 0,0 9.708931,-13.25136 24.748739,-13.25136 20.58329,0 27.65292,13.25136 27.65292,13.25136"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4187"
           d="m 84.726545,692.3622 c 0,0 8.33376,-6.18029 21.718275,-6.18029 13.8896,0 19.1929,6.18029 19.1929,6.18029"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4189"
           d="m 135,728.60831 c 34.13072,3.5863 110.97214,65.65992 110.97214,65.65992"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4191"
           d="m 135,734.4167 c 56.66571,41.77339 -16.81215,108.33885 -16.81215,108.33885"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4193"
           d="m 135,740.93363 c 0,0 4.82143,2.11096 4.82143,7.85714 0,12.5 -14.87264,26.78572 -28.92857,26.78572 C 85.203264,775.57649 87.5,746.3622 87.5,746.3622"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4195"
           d="m 95.535714,746.3622 c 0,0 7.915766,11.17858 21.249996,11.17858 8.04285,0 16.42858,-11.42858 16.42858,-11.42858"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4197"
           d="m 134.286,746.3622 c 1.42857,6.875 4.28543,-0.42856 0.714,-2.57142"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4199"
           d="m 81.785715,746.3622 c -0.625,3.75 5.178571,1.42858 3.839285,0"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4201"
           d="m 63.75,746.3622 c 4.553571,8.66072 16.696428,4.19643 16.517857,0"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4203"
           d="m 0,759.41797 c 10.354102,0 17.425131,-13.05577 17.425131,-13.05577"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4205"
           d="m 25.089286,746.3622 c 3.75,20 27.410714,9.73215 23.928571,0"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
        <path
           id="path4207"
           d="m 27.053571,746.3622 c -0.625,4.46429 5.178572,2.23215 3.392858,0"
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
      </g>
      <g
         id="g4449"
         transform="matrix(-1,0,0,1,-3.0931644e-4,-1.4281962e-4)">
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,552.3622 c 80.812204,0 59.093923,140 59.093923,140"
           id="path4451" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,602.84432 c 58.643249,0 55.55839,89.51788 55.55839,89.51788"
           id="path4453" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,626.3622 c 47.984904,0 52.528,66 52.528,66"
           id="path4455" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,641.3622 c 41.612891,0 48.992398,51 48.992398,51"
           id="path4457" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,687.19206 c 15.185923,0 22.728432,5.17014 22.728432,5.17014"
           id="path4459" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,683.0762 c 19.642857,0 27.5,9.286 27.5,9.286"
           id="path4461" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,678.07649 c 23.417381,0 30.51405,14.28571 30.51405,14.28571"
           id="path4463" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,672.89792 c 26.255466,0 33.035714,19.46428 33.035714,19.46428"
           id="path4465" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,666.46935 c 27.201534,0 36.25,25.89285 36.25,25.89285"
           id="path4467" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,660.93363 c 32.150793,0 40.535714,31.42857 40.535714,31.42857"
           id="path4469" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,651.8262 c 35.357594,0 44.821429,40.536 44.821429,40.536"
           id="path4471" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 63.63961,692.3622 c 0,0 16.981931,-136.99505 106.5711,-136.99505 45.49797,0 74.75128,38.38366 74.75128,78.28682 C 244.96199,721.63008 135,722.48612 135,722.48612"
           id="path4473" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 67.680221,692.3622 c 0,0 14.423127,-67.29452 63.134529,-67.29452 33.27827,0 45.96195,30.66778 45.96195,42.4264 0,41.79791 -41.7767,47.53845 -41.7767,47.53845"
           id="path4475" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 71.720831,692.3622 c 0,0 11.094741,-43.05086 48.992399,-43.05086 16.3308,0 33.84011,16.60672 33.84011,32.32488 0,19.68808 -19.55334,26.76904 -19.55334,26.76904"
           id="path4477" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 75.256365,692.3622 c 0,0 11.573597,-29.0239 37.880725,-29.4138 18.75404,-0.27796 30.05204,14.05467 30.05204,25.63262 0,9.73554 -8.18913,12.75318 -8.18913,12.75318"
           id="path4479" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 78.539361,692.3622 c 0,0 8.215091,-19.94362 32.577419,-19.94362 7.6532,0 28.28427,7.24916 28.28427,19.44543 0,3.62409 -4.40105,4.29315 -4.40105,4.29315"
           id="path4481" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 81.191011,692.3622 c 0,0 9.708931,-13.25136 24.748739,-13.25136 20.58329,0 27.65292,13.25136 27.65292,13.25136"
           id="path4483" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 84.726545,692.3622 c 0,0 8.33376,-6.18029 21.718275,-6.18029 13.8896,0 19.1929,6.18029 19.1929,6.18029"
           id="path4485" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 135,728.60831 c 34.13072,3.5863 110.97214,65.65992 110.97214,65.65992"
           id="path4487" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 135,734.4167 c 56.66571,41.77339 -16.81215,108.33885 -16.81215,108.33885"
           id="path4489" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 135,740.93363 c 0,0 4.82143,2.11096 4.82143,7.85714 0,12.5 -14.87264,26.78572 -28.92857,26.78572 C 85.203264,775.57649 87.5,746.3622 87.5,746.3622"
           id="path4491" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 95.535714,746.3622 c 0,0 7.915766,11.17858 21.249996,11.17858 8.04285,0 16.42858,-11.42858 16.42858,-11.42858"
           id="path4493" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 134.286,746.3622 c 1.42857,6.875 4.28543,-0.42856 0.714,-2.57142"
           id="path4495" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 81.785715,746.3622 c -0.625,3.75 5.178571,1.42858 3.839285,0"
           id="path4497" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 63.75,746.3622 c 4.553571,8.66072 16.696428,4.19643 16.517857,0"
           id="path4499" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 0,759.41797 c 10.359294,0 17.425131,-13.05577 17.425131,-13.05577"
           id="path4501" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 25.089286,746.3622 c 3.75,20 27.410714,9.73215 23.928571,0"
           id="path4503" />
        <path
           style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.83013558px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
           d="m 27.053571,746.3622 c -0.625,4.46429 5.178572,2.23215 3.392858,0"
           id="path4505" />
      </g>
      <g
         id="g4313"
         style="opacity:1;stroke:#808080;stroke-width:1.83013558;stroke-opacity:1"
         transform="translate(0,2.2107222e-5)">
        <rect
           transform="scale(-1,-1)"
           y="-746.36218"
           x="81"
           height="54"
           width="54"
           id="rect4209"
           style="opacity:1;fill:url(#linearGradient4217);fill-opacity:1;stroke:#808080;stroke-width:1.83013558;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
        <rect
           y="692.36218"
           x="-27"
           height="54"
           width="54"
           id="rect4209-3"
           style="opacity:1;fill:url(#linearGradient4217-7);fill-opacity:1;stroke:#808080;stroke-width:1.83013558;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
        <rect
           transform="matrix(0,-1,1,0,0,0)"
           y="27"
           x="-746.36218"
           height="54"
           width="54"
           id="rect4209-7"
           style="opacity:1;fill:url(#linearGradient4217-6);fill-opacity:1;stroke:#808080;stroke-width:1.83013558;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
        <rect
           transform="scale(-1,-1)"
           y="-746.36218"
           x="-135"
           height="54"
           width="54"
           id="rect4209-74"
           style="opacity:1;fill:url(#linearGradient4217-4);fill-opacity:1;stroke:#808080;stroke-width:1.83013558;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
        <rect
           transform="matrix(0,1,-1,0,0,0)"
           y="27"
           x="692.36218"
           height="54"
           width="54"
           id="rect4209-0"
           style="opacity:1;fill:url(#linearGradient4217-1);fill-opacity:1;stroke:#808080;stroke-width:1.83013558;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
      </g>
    </g>
  </g>
</svg>
like image 190
Paul LeBeau Avatar answered Oct 21 '25 23:10

Paul LeBeau


The problem is that you are scaling a group of objects, rather than the objects contained in the group. As a result, Inkscape and SVG standard render the unscaled objects composing the group, and then apply the scaling—this results in strokes being scaled too.

If you want to scale the paths in an anisotropic way but not the strokes along them, you need to scale the objects that make up the group. Select the group, ungroup ShiftCtrlG until the helpline mentions "N objects of type path,rectangle" and scale this selection. Then group them again CtrlG.

like image 32
Joce NoToPutinsWarInUkraine Avatar answered Oct 21 '25 21:10

Joce NoToPutinsWarInUkraine