strokeWeight() acting strangely with FX2D

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!

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:

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!

:)

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