processing / processing/processing4
Drawing the same SVG with different stroke weights causes rendering bug with P2D renderer
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 494
- Fork
- 183
- Merge trung bình
- 4 giờ 39 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với sketch P2D được cung cấp và bản tái hiện SVG, sau đó theo dõi cách trình kết xuất P2D xử lý các lần vẽ PShape lặp lại với disabled-style và các giá trị strokeWeight thay đổi. Xác nhận bản sửa bằng cách tái hiện sketch và kiểm tra rằng cả hai hình được kết xuất đều có các giá trị strokeWeight được yêu cầu mà không bị glitch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- computer-graphics
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100