-
Bug
-
Resolution: Fixed
-
P3
-
7u6
-
Windows 7, 64bit
Java 7.04
JavaFX 2.2.9 Beta
When Image object created via:
Image img = new Image(MyApp.class.getResource("flower.png").toExternalForm(), true);
It can not be used for ImagePattern because of runtime exception:
java.lang.IllegalArgumentException: Image must be non-null
at com.sun.prism.paint.ImagePattern.<init>(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.createImagePatternPaint(Unknown Source)
at com.sun.javafx.tk.Toolkit.getPaint(Unknown Source)
at javafx.scene.paint.ImagePattern.impl_getPlatformPaint(Unknown Source)
at javafx.scene.shape.Shape.updatePGShape(Unknown Source)
at javafx.scene.shape.Shape.impl_updatePG(Unknown Source)
at javafx.scene.shape.Circle.impl_updatePG(Unknown Source)
at javafx.scene.Node.impl_syncPGNode(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.syncAll(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.syncAll(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source)
at com.sun.javafx.tk.Toolkit.firePulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit$8.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
But if one changed "true" parameter to "false" then ImagePattern created well.
I attached source code. It generate exception, but if line with ImagePattern commented, app works fine.
PS. It can has same origin - if I try create Image with
new Image("filename", isBackgroundLoading)
ImagePattern creation fails no matter, which parameter was used.
Image img = new Image(MyApp.class.getResource("flower.png").toExternalForm(), true);
It can not be used for ImagePattern because of runtime exception:
java.lang.IllegalArgumentException: Image must be non-null
at com.sun.prism.paint.ImagePattern.<init>(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.createImagePatternPaint(Unknown Source)
at com.sun.javafx.tk.Toolkit.getPaint(Unknown Source)
at javafx.scene.paint.ImagePattern.impl_getPlatformPaint(Unknown Source)
at javafx.scene.shape.Shape.updatePGShape(Unknown Source)
at javafx.scene.shape.Shape.impl_updatePG(Unknown Source)
at javafx.scene.shape.Circle.impl_updatePG(Unknown Source)
at javafx.scene.Node.impl_syncPGNode(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.syncAll(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.syncAll(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source)
at com.sun.javafx.tk.Toolkit.firePulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit$8.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
But if one changed "true" parameter to "false" then ImagePattern created well.
I attached source code. It generate exception, but if line with ImagePattern commented, app works fine.
PS. It can has same origin - if I try create Image with
new Image("filename", isBackgroundLoading)
ImagePattern creation fails no matter, which parameter was used.