# Even stroke weight on distorted svg

**URL:** <https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749>\
**Category:** Coding Questions\
**Created:** [January 20, 2022, 2:20pm UTC](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749 "2022-01-20T14:20:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielkozma](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@danielkozma](https://discourse.processing.org/u/danielkozma)\
**Post date:** [January 20, 2022, 2:20pm UTC](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749/1 "2022-01-20T14:20:04Z")

</div>

Hi!

I would like to use an imported svg in various distorted aspect ratios.  
Is there a way to get an even stroke weight on the distorted versions (right), just like on the original (left)?

```auto
PShape gl;

void setup() {
  size(640, 640);
  gl = loadShape("gl.svg");
  noLoop();
} 

void draw(){
  background(255);
  gl.disableStyle();
  noFill();
  strokeWeight(10);
  shape(gl, 0, 0, 300, 300);
  shape(gl, 300, 0, 100, 600);
}

```

 ![Screenshot 2022-01-20 at 15.09.07](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/dc6c8fa2b7d6201796e0c20c93709c98fc31f0c3.jpeg)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [January 20, 2022, 10:24pm UTC](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749/2 "2022-01-20T22:24:39Z")

</div>

Difficult

Did you try scale instead?

---

<div class="post-metadata">

**Author:** ![danielkozma](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@danielkozma](https://discourse.processing.org/u/danielkozma)\
**Post date:** [January 21, 2022, 8:23am UTC](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749/3 "2022-01-21T08:23:29Z")

</div>

It’s the same unfortunately.

```auto
void draw(){
  background(255);
  gl.disableStyle();
  gl.scale(0.5, 2);
  noFill();
  strokeWeight(10);
  shape(gl, 0, 0);
}

```

 ![Screenshot 2022-01-21 at 9.21.34](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e8e5fd4d340b2a4d2eae10ac92bdfb9e39b95e62.jpeg)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [January 21, 2022, 9:17am UTC](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749/4 "2022-01-21T09:17:50Z")

</div>

I see

and scale(1,1.7); directly, not as gl.scale() ?
