processing / processing/processing4
Drawing the same SVG with different stroke weights causes rendering bug with P2D renderer
オープン
まだ誰も着手していません。
bug
core
- 主要言語
- Java
- スター
- 494
- フォーク
- 183
- 平均マージ
- 4時間 39分
- マージ済み PR(30日)
- 3
説明
Created by: cadin
Description
When drawing an SVG shape (with style disabled) using the P2D renderer, the rendering will glitch if the shape is drawn more than once with a different stroke weight.
Expected Behavior
The shape should appear on the canvas at different stroke weights.
Current Behavior
The first instance of the shape appears as expected. Subsequent shapes (drawn after changing strokeWeight) are drawn with a glitched stroke.
Steps to Reproduce
- Set up sketch with P2D renderer.
- Load an SVG into a PShape and call
disableStyle()on it. - Draw the shape to the screen once, then change
strokeWeightand draw again.
Example code (from this repo with SVG file included):
PShape aSVG;
void setup() {
size(600, 300, P2D); // changing to default renderer works
aSVG = loadShape("A.svg");
aSVG.disableStyle();
}
void draw() {
background(255);
scale(3);
strokeWeight(1);
shape(aSVG); // removing this first shape works
strokeWeight(3); // removing this stroke change works
shape(aSVG, 100, 0);
}
Your Environment
- Processing version: 4.3
- Operating System and OS version: Mac OS 14.2.1 (Intel)
Workarounds
- Using the default renderer works as expected
- Drawing the shape only once (with any stroke weight) works as expected
- Drawing the shape multiple times without changing stroke weight works as expected
- Loading the same SVG into a separate PShape instance to render as the second graphic works as expected
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供されたP2DスケッチとSVGの再現から始め、続いてP2Dレンダラーがdisabled-styleのPShape描画の繰り返しとstrokeWeight値の変更をどのように処理するかを追跡します。スケッチを再現し、レンダリングされた両方の図形が要求されたstrokeWeight値で、グリッチなく描画されることを確認して修正を検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100