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

Canvas node renders paths incorrectly if translate matrix is set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u9
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      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)

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: