processing / processing/processing4

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

Open
#820 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core
Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

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 ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open PShape.java and inspect setTint(int fill) alongside setFill(int index, int fill). Verify that tint updates the tint attribute and that the missing-vertex warning identifies setFill(); done means both reported inconsistencies are corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.