-
Notifications
You must be signed in to change notification settings - Fork 28
Casting error #74
Copy link
Copy link
Open
Description
Hello,
I recently tried to use VectorGraphics2D with the method indicated in the usage section. I declare somewhere in my application:
Graphics2D g2 = new VectorGraphics2D();
At run time, on this statement:
CommandSequence commands = ((VectorGraphics2D) g2).getCommands();
I get a cast error:
Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: sun.java2d.SunGraphics2D cannot be cast to de.erichseifert.vectorgraphics2d.VectorGraphics2D
and I don't understand what happens. What is wrong ?
I tried several java versions, from 8 to 11, the last one is openjdk 11.0.7-ea 2020-04-14.
Thanks in advance for your help !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels