Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8120197

Need to specify behavior of out-of-range arguments for WriteableImage constructors

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 7u6
    • Component/s: javafx
    • Labels:

      Description

      Constructing a WritableImage with a width or height <= 0 with throw an exception in the toolkit:

      java.lang.IllegalArgumentException: Image dimensions must be > 0
              at com.sun.prism.Image.<init>(Image.java:135)
              at com.sun.prism.Image.<init>(Image.java:118)
              at com.sun.prism.Image.fromByteBgraPreData(Image.java:44)
              at com.sun.javafx.tk.quantum.QuantumToolkit.createPlatformImage(QuantumToolkit.java:1312)
              at javafx.scene.image.Image.<init>(Image.java:662)
              at javafx.scene.image.WritableImage.<init>(WritableImage.java:70)

      This should be documented if this is the desired behavior (which I think it is).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                flar Jim Graham
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: