processing / processing/libprocessing
`stroke()` does not handle float values correctly
オープン
まだ誰も着手していません。
bug
- 主要言語
- Rust
- スター
- 69
- フォーク
- 14
- 平均マージ
- 15日 22時間
- マージ済み PR(30日)
- 3
説明
stroke() appears to mis-handle float inputs. When using floats (e.g. 150.0), the rendered color is incorrect
Expected behavior
Float values in the same range as integers should produce identical results, as in Processing.
Actual behavior
stroke(150)→ correct grayscalestroke(150.0)→ renders as white
Reproduction (mewnala)
from mewnala import *
def setup():
size(640, 360)
background(255)
def draw():
stroke(150.0)
line(0, 0, width, height)
line(width, 0, 0, height)
stroke(155.0, 100.0, 0.0)
line(0, height // 2, width, height // 2)
line(width // 2, 0, width // 2, height)
run()
Equivalent Processing sketch (works as expected)
void setup() {
size(640, 360);
background(255);
}
void draw() {
stroke(150.0);
line(0, 0, width, height);
line(width, 0, 0, height);
stroke(155.0, 100.0, 0.0);
line(0, height/2, width, height/2);
line(width/2, 0, width/2, height);
}
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず stroke() の Rust 実装を見つけ、提供された mewnala の再現を実行します。Processing スケッチを期待されるリファレンスとして使用し、整数および浮動小数点のグレースケール入力と RGB 入力の処理を比較します。同等の浮動小数点値と整数値が同じ色をレンダリングし、該当するテストが存在する場合は関連するテストでカバレッジが確保されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- computer-graphics
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100