fix #643 - PShape.beginContour() bug #776
Merged
benfry merged 1 commit intobenfry:mainfrom Sep 15, 2023
Merged
Conversation
Owner
|
Excellent, thanks for the fix. If you'd be up for doing a PR for JavaFX as well, that would also be super helpful. Thanks again. |
Contributor
Author
You are welcome! This is my first contribution to the Processing code.
I am, but does this PR not fix the issue for FX2D as well? When I try to reproduce the bug in the PDE with FX2D and with my updated core.jar, I see the contour works correctly. import processing.javafx.*;
PShape s;
void setup() {
size(400, 200, FX2D);
fill(255, 0, 0);
noLoop();
}
void draw() {
translate(50, 50);
s = createShape();
s.beginShape();
s.fill(255, 0, 0);
s.vertex( 0, 0);
s.vertex(100, 0);
s.vertex(100, 100);
s.vertex( 0, 100);
s.beginContour();
s.vertex( 25, 25);
s.vertex( 25, 75);
s.vertex( 75, 75);
s.vertex( 75, 25);
s.endContour();
s.endShape(CLOSE);
shape(s, 0, 0);
translate(200, 0);
beginShape();
fill(255, 0, 0);
vertex( 0, 0);
vertex(100, 0);
vertex(100, 100);
vertex(0, 100);
beginContour();
vertex(25, 25);
vertex(25, 75);
vertex(75, 75);
vertex(75, 25);
endContour();
endShape(CLOSE);
}The JavaFX renderer doesn't have a PShape class of its own, so doesn't it use the same PShape that the Java2D renderer uses? |
Owner
|
Ah, I misunderstood what you'd written about it working with both Java2D and JavaFX. Yes, we should be set for JavaFX as well. Thanks again! |
This was referenced Oct 7, 2023
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for bug #643.
I tested this with the default JAVA2D and FX2D renderers in the PDE using the PShape.beginContour() example code as well as some code in the #643 thread. Happy to do more testing as needed.