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

FX Canvas does not allow missing initial moveto commands (which HTML5 Canvas allows)

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8
    • javafx
    • None

      The attached test cases show an HTML5 example that lacks an initial moveto (It is an HTML5 tutorial example with the initial moveTo replaced by a lineTo), yet it draws the same thing that it would have drawn with the moveTo. The similar FX Canvas example throws an Exception for the same path elements (but works if you substitute back in the moveTo).

      Load test.htm into a browser to see the expected output.
      Compile and run test.java to see the exception. Modify test.java to replace the first lineTo with the indicated moveTo and it will produce the same results as the HTML file. It should do so even with the lineTo.

        1. test.htm
          1 kB
        2. test.java
          1.0 kB

          Loading...
          Uploaded image for project: 'JDK'
          1. JDK
          2. JDK-8096486

          FX Canvas does not allow missing initial moveto commands (which HTML5 Canvas allows)

            • Icon: Bug Bug
            • Resolution: Duplicate
            • Icon: P4 P4
            • None
            • 8
            • javafx
            • None

              The attached test cases show an HTML5 example that lacks an initial moveto (It is an HTML5 tutorial example with the initial moveTo replaced by a lineTo), yet it draws the same thing that it would have drawn with the moveTo. The similar FX Canvas example throws an Exception for the same path elements (but works if you substitute back in the moveTo).

              Load test.htm into a browser to see the expected output.
              Compile and run test.java to see the exception. Modify test.java to replace the first lineTo with the indicated moveTo and it will produce the same results as the HTML file. It should do so even with the lineTo.

                1. test.htm
                  1 kB
                2. test.java
                  1.0 kB

                    flar Jim Graham
                    flar Jim Graham
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    3 Start watching this issue

                      Created:
                      Updated:
                      Resolved:
                      Imported:

                        flar Jim Graham
                        flar Jim Graham
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        3 Start watching this issue

                          Created:
                          Updated:
                          Resolved:
                          Imported: