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

Canvas node renders paths incorrectly if translate matrix is set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 7u9
    • javafx
    • Linux 3.2.0-23-generic #36-Ubuntu x86_64 GNU/Linux
      Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
      Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

      Using the Canvas node, when I stroke or fill a path after I have called the translate(double,double) method on the GraphicsContext, the path is drawn way out of place. In the attached example it seems that the path is moved three times as much as I specified in the translate method. Stroking text however, seems to paint the text at exactly the spot I expect it. (This behaviour was observed on Linux and Windows 64-Bit).

      I wasn't sure if I encountered a JavaFX bug and thus asked this question on stackoverflow: http://stackoverflow.com/questions/13236523/unexpected-behaviour-of-javafx-graphicscontext-translate. Since nobody seems to see any obvious flaw in my code, I would consider this a bug.

      Find attached a small Netbeans project which reproduces the problem.

            jandrese Joe Andresen (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: