CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
442 stars 28 forks source link

noStroke(); error for images #56

Closed tatyanade closed 4 years ago

tatyanade commented 4 years ago

Having errors with 'noStroke(); ' called on images, The code should have it so only the yellow image has a stroke of color yellow, the yellow shape does have a yellow stroke but in addition most of the shapes have a black stroke and one has a blue stroke

Most of the incorrect strokes are black which makes it seem like maybe noStroke() does something similair to stroke(0);, but it also seems to have something to do with using the previous fill color as the stroke color since the black shape is outlined in blue

//I call no stroke before anything is drawn
  E.noStroke();

  //this has a black stroke
  E.fill(255,0,0);
  E.image(color_magenta, 0, 0); 

  //this has a yellow stroke - which it should
  E.fill(255,255,0);
  E.stroke(255,255,0);
  E.image(color_yellow, 0, 0);

  //this has a black stroke
  E.fill(45,30,0);
  E.noStroke();
  E.image(color_brown, 0, 0);

  //this one also has a black stroke
  E.fill(255,155,155);
  E.image(color_pink, 0, 0); 

  //
  E.fill(0,0,155);
  E.image(color_blue, 0, 0); 

  //part of this had a blue stroke
  E.fill(0,0,0);
  E.image(color_black, 0, 0); 

  //this had a strand of black stroke on the right hand side
  E.fill(0,255,0);
  E.image(color_green, 0, 0);

2020-06-24_23h08_36

PEmbroider_png_colors.zip

LingDong- commented 4 years ago

Thanks for the report, it should now be fixed in: 56fe597b5c4e7bd2539f1fdd2b3eafd7f0bf36b6

The issue was that you're using concentric fill, and concentric fill automatically strokes the outer edge when there're no fill so that the shape doesn't look smaller (Addressed in this issue https://github.com/CreativeInquiry/PEmbroider/issues/14#issuecomment-643811715)

However I forgot to set the color to current fill color, so it's stroked in black instead of red. I also fixed a place where text is always stroked as black, due to same negligence.

tatyanade commented 4 years ago

seems to be working now thanks!