Cannot re-enable stroke or fill of a PShape with P2D #3808

Closed
maxdee opened this Issue Sep 17, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@maxdee

maxdee commented Sep 17, 2015

With 3.0b6 on linux seems you cannot re-enable stroke or fill. (my first bug report, is good?)

// cant re-enable shape stroke/fill
PShape shp;

void setup(){
  //size(200,200); // works 
  size(200,200, P2D); // dosent work
  shp = createShape();
  shp.beginShape();
  shp.vertex(10,10);
  shp.vertex(190,10);
  shp.vertex(190,190);
  shp.vertex(10,190);
  shp.endShape(CLOSE);
  shp.setStroke(color(255));
  shp.setFill(color(100));
}

void draw(){
  background(0);
  shape(shp,0,0);
}
void keyPressed(){
  if(key=='q')shp.setStroke(false);
  else if(key=='w')shp.setStroke(true);
  else if(key=='a')shp.setFill(false);
  else if(key=='s')shp.setFill(true);
}
@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Sep 18, 2015

Member

great find, thank you!

And fixed with e65bb37

Member

codeanticode commented Sep 18, 2015

great find, thank you!

And fixed with e65bb37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment