Skip to content

Fix #4638: make offscreen PGraphicsFX2D work. - #4698

Closed
GKFX wants to merge 2 commits into
processing:masterfrom
GKFX:bug-jfxOffscreen
Closed

GKFX wants to merge 2 commits into
processing:masterfrom
GKFX:bug-jfxOffscreen

Conversation

@GKFX

@GKFX GKFX commented Oct 9, 2016 •

Copy link
Copy Markdown
Contributor

This was tested against OpenJFX rather than the default JavaFX since Processing was flatly refusing to compile otherwise; I assume it will work the same regardless.
Fix #4638.

@GKFX

GKFX commented Oct 10, 2016

Copy link
Copy Markdown
Contributor Author

BTW, you still can't use an off-screen PGraphicsFX2D in an AWT sketch because of the rule that graphics code must be limited to the FX Application Thread. My attempt to use Platform.runLater to solve this locked up my whole screen, so I gave up, but there might be a better way.

@benfry

benfry commented Oct 12, 2016

Copy link
Copy Markdown
Contributor

What does “This was tested against OpenJFX rather than the default JavaFX since Processing was flatly refusing to compile otherwise” mean?

@GKFX

GKFX commented Oct 12, 2016 •

Copy link
Copy Markdown
Contributor Author

I added a line to core/build.xml to put my system copy of openjfx on the classpath. Ant otherwise couldn't find the javafx package, even with a completely clean, unmodified repository. I'll try and get you a copy of the error message tomorrow, if it's still happening. (I'm sorry for that very vague statement; I posted it in a hurry!)

@GKFX

GKFX commented Oct 13, 2016

Copy link
Copy Markdown
Contributor Author

The error is The import com.sun.javafx cannot be resolved; the full output of Ant is tmp.NBI8A4OM3v.txt.

@benfry

benfry commented Mar 26, 2018

Copy link
Copy Markdown
Contributor

@JakubValtar Low priority, but perhaps you can review when you get a chance?

@martin-y-lu

Copy link
Copy Markdown

Why isn't this in the current source? I added it as a separate implementation and it works perfectly.

@jeremydouglass

Copy link
Copy Markdown
Contributor

@Momopey -- Great that it worked for you. Can you share details about what you tested on? That might help core devs to review.

benfry added a commit to processing/processing4-javafx that referenced this pull request Jan 16, 2022
@benfry

benfry commented Jan 16, 2022

Copy link
Copy Markdown
Contributor

Now merged into the standalone JavaFX library for 4.0 beta 4: processing/processing4-javafx@f7b8c29

JavaFX development is now taking place here: https://github.com/processing/processing4-javafx

@benfry benfry closed this Jan 16, 2022
@benfry

benfry commented Jan 16, 2022

Copy link
Copy Markdown
Contributor

…and thanks @GKFX for the usable fix!

Made one change to only set alpha when !primaryGraphics, but otherwise the rest was more or less as-is.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked. Pull requests that have been closed are automatically locked 30 days after the last comment.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants