Re: com.sun.javafx vs javafx (with example/request)

2020-05-13 Thread jfx user2
Turns out that I partially misunderstood the use of Path2D in GraphicsContext. I had been using appendSVGPath for nearly everything and within a single beginPath/closePath. Under those circumstances converting GraphicsContext.path from Path2D to Path (using code from

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Michael Paus
I think I know quite a bit about JavaFX graphics and I do not generally agree with your statements. Especially the statement that the Canvas is so much superior is a myth from the old days of Java 8 where there were a few performance bugs in the scene graph handling. But that's a long time ago.

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Kevin Rushforth
I can see the value in a Shape.toPath() method (or alternatively  a Path.of(Shape) method). I'm still not sold on the value proposition of a similar method to GraphicsContext (and "just make this internal information public" isn't a recipe for adding new API). You can file an Enhancement

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread jfx user2
>From the JavaDoc "Canvas is an image that can be drawn on using a set of graphics commands provided by a GraphicsContext." This a bit of a misnomer. While canvas can be used to draw in image (actually GraphicsContext not canvas itself), the image based methods of GraphicsContext are far

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Michael Paus
Hi, I have to say that your requirements sound a little bit strange to me, but maybe you can make it clearer what your real use-case behind them is. What I do not understand is why you are using the canvas at all. Conceptually the canvas is for direct mode rendering into an image. The fact

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread jfx user2
No... given a Shape, create a Path that represents the outline of that shape. If I had a Path I wouldn’t be requesting the new methods. One of the workarounds for getting a Path from a GraphicsContext is to keep track of it as I’m drawing... however, this is overhead in the gc call that can

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Kevin Rushforth
The performance tracker was identified back in the JDK 9 time frame as a possible candidate for a public API. The following request is tracking it: https://bugs.openjdk.java.net/browse/JDK-8145154 If someone wants to spend the effort to take this feature request and drive it to completion,

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Philip Race
The current path is defined by the application - you - and yet you don't know what it is ? You do say > I have other workarounds where I have to maintain a path as I’m drawing in the canvas Why can't you do that ? No internal API digging. -phil On 5/8/20, 12:02 PM, jfx user2 wrote: Ok,

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Ty Young
On the topic of private APIs that should probably be public... can the performance tracker class be made public too? I'd very much like to know the FPS at which my application is running at.

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread jfx user2
Ok, then please consider the GraphicsContext request that I’ve made. It simply enables you to get the Path from the context without exposing com classes at all. I have other workarounds where I have to maintain a path as I’m drawing in the canvas or I have to do hit testing on a non vector

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Kevin Rushforth
Since Canvas is an immediate mode graphics API, I presume you are interested in the most recent drawing primitive? (we don't keep the composite shape for all drawing primitives -- that would be both too expensive and not really appropriate). How would you expect current rendering attributes

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread jfx user2
Kevin, go easy please :0). There is a need. Access to the outline of the path in the canvas is great for edge following, node attachment points, animating around the non-rectangular border of what’s actually displayed, etc. The other request that I haven’t posted yet is to do the same for

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Kevin Rushforth
While there is no plan to "open up" more of com.sun.javafx (and that isn't really the right way to look at it), if you have a proposed enhancement to the existing public javafx.* classes we could discuss it. As for your specific example, can you say more about what your use case is? The

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread jfx user2
I am aware of this and that’s why I am asking. There are useful private features in com.sun.javafx and I explained one of them in my message. I have an additional related example but the larger question is if there is a plan to open more of com.sun.javafx to the public api, documentation

Re: com.sun.javafx vs javafx (with example/request)

2020-05-08 Thread Kevin Rushforth
Only javafx.* packages are part of the public API. Anything else, including com.sun.javafx.*, is internal implementation details that an application should never call. -- Kevin On 5/8/2020 12:38 AM, jfx user2 wrote: Is there documentation around the packages (com.sun.javafx vs javafx) used