# strokeWeight() acting strangely with FX2D

**URL:** https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423
**Category:** Coding Questions
**Created:** [August 22, 2020, 10:18am UTC](https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423 "2020-08-22T10:18:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ketchupmustard](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@ketchupmustard](https://discourse.processing.org/u/ketchupmustard)
#### Post date: [August 22, 2020, 10:18am UTC](https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423/1 "2020-08-22T10:18:57Z")

</div>

Hey y’all.

I was gonna post my code but I noticed it’s resolved once I get rid of FX2D in my fullscreen() declaration.

Basically I couldn’t seem to selectively change the strokeWeight - I couldn’t change certain elements away from a strokeWeight that was assigned in a public void function “display()”.

It’s not a big deal, but if anyone has any insights I’d be curious to hear them.  
_G’day!_

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [August 22, 2020, 7:56pm UTC](https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423/2 "2020-08-22T19:56:31Z")

</div>

Hello,

I got some interesting with different renderers and code in setup() or draw() and even with no draw()!

I tried FX2D, P2D, P3D and default.

Sharing some test code:

```auto
void setup() 
  {
  size(720, 400, FX2D);
  //fullScreen(FX2D);
  print(FX2D, P2D, P3D, OPENGL);
  background(0);  
  //noSmooth();
  
  stroke(255);
 
  textAlign(CENTER);
  textSize(24);

   translate(50, 0);
  //for (int i = 0; i<21; i++)
  // {  
  // strokeWeight(i);
  // line(30*i, height-50, 30*i, 100);
  // point(30*i, 25);
  // text(i, 30*i, 80);
  // }
  //print("Done!");  
  }

void draw()
  {
  background(0);
  translate(50, 0);
  for (int i = 0; i<21; i++)
    {  
    strokeWeight(i);
    line(30*i, height-50, 30*i, 100);
    point(30*i, 25);
    text(i, 30*i, 80);
    }
  }

```

Have fun!

`:)`

---

<div class="post-metadata">

### Author: ![ketchupmustard](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@ketchupmustard](https://discourse.processing.org/u/ketchupmustard)
#### Post date: [August 28, 2020, 8:16am UTC](https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423/3 "2020-08-28T08:16:06Z")

</div>

Cool! And strange. Funny how much bigger a “pixel” is in FX2D.
