Skip to content

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

Open
@processing-bot

Description

@processing-bot

Created by: cubr3

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions