processing / processing/processing4

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

未关闭
#820 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug core
主要语言
Java
星标
494
派生
183
平均合并
4 小时 39 分钟
30 天内合并 PR
3

描述

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 ?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

打开 PShape.java,并检查 setTint(int fill) 以及 setFill(int index, int fill)。确认 tint 会更新 tint 属性,并且缺少顶点的警告会指出 setFill();完成意味着已修正报告中的两处不一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
api
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
停滞
描述清晰度
描述清楚
新手友好度
50/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。