processing / processing/processing4
code symmetry typo or bug in public void setTint(int fill) calls setFill(i,fill) in PShape.java ?
Open
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,
- 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) ?
}
}
}
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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