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

Clipped node seems to get Opacity value applied twice making it half as bright as expected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      JDK 8 build b76 32-bit, Windows 7 64-bit

      Description

      I'm working on a visualization where Nodes are perspective transformed, have reflections and those reflections are clipped to prevent them from fading into each other.

      I seem to have found a regression when it comes to how Opacity is applied as I didn't see this in the 2.2 branch.

      What I'm seeing is this:

      I have a Node, that has an opacity of 0.5. This node has a PerspectiveTransform applied to it with a Reflection as the input for the PerspectiveTransform. It also has a Clip applied to it, which allows most of the node to get rendered apart from maybe a part of the Reflection. When the Clip is applied, the apparent Opacity of the node seems to be more like 0.25 instead of 0.5 (when visually compared with a Node that really has 0.5 Opacity). The higher I set the Opacity, the less the change is noticable, and in fact at 1.0 Opacity, no change is visible at all with or without the Clip -- this leads me to believe the Opacity is applied twice somehow in the presence of the Clip, perhaps in combination with the effects applied.

      Unfortunately, I have been unable to isolate the problem. A simple test case with a PerspectiveTransform and Reflection, a simple Clip and some nodes at 0.5 Opacity does not exhibit the same problem. I have ruled out that it is not a specific control (ie, it occurs with TreeCells containing an ImageView graphic just as readibly as with TreeCells having a Button as their graphic).

      I'm still working on getting a test case, and I'll add it here if I managed to create one. I do have a fairly isolated example of 5 classes ~1000 lines of code that can show the problem (the difficulty of making a small example lies in the fact that this is a TreeViewSkin in which it occurs).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jhendrikx John Hendrikx
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Imported: