processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

code symmetry typo or bug in public void setTint(int fill) calls setFill(i,fill) in PShape.java ?

Open cubr3 opened this issue 1 year ago • 0 comments

Hi,

  1. sorry if it's not a bug but setFill and setTint in PShape.java seems to code the same behavior for two different attributes but... setTint(int fill) :

public void setTint(int fill) { if (openShape) { PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setTint()"); return; }

tintColor = fill;

if (vertices != null) {
  for  (int i = 0; i < vertices.length; i++) {
    setFill(i, fill);       <--------------------------- here: shouldn't be setTint(i,fill) ?
  }
}

}

  1. a warning message typo in public void setFill(int index, int fill) : line 2631: PGraphics.showWarning(NO_SUCH_VERTEX_ERROR + " (" + index + ")", "getFill()"); "getFill()" rather than "setFill()" in warning message ?

cubr3 avatar Jan 16 '24 21:01 cubr3