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

LinearGradient is incorrect when applied on a shape in a layout

    XMLWordPrintable

    Details

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

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: