LinearGradient is incorrect when applied on a shape in a layout

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: fx1.2.1
    • Component/s: javafx
    • Environment:

      French Windows XP Pro SP3, Java 1.6.0_16, JavaFX 1.2.1 (standard)

      If I apply a linear gradient on a rectangle which is just moved with translateX, it works.
      But if the rectangle is placed in a more or less complex layout, the gradient is incorrect, it acts as if the endX is much bigger than it is actually.

      I made a simple script to illustrate the program: if you run as provided, with GetSimpleDisplay() call, it works. If you replace this function with GetSemiComplexDisplay(), you get a first discrepancy. If you replace it with GetComplexDisplay(), it is even more visible: it looks like the horizontal offset induced by the layout acts on the gradient computation.
      I made two linear gradients to see if the issue was because of gradient switch,
      but the issue shows without that...

      RT-5762 LinearGradient not working inside a VBox or HBox
      shows a different (?), but related issue.

            Assignee:
            Jim Graham
            Reporter:
            Philippe Lhoste (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: