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

Blend Effect Clipping and/or Truncating when attached to Polygons

XMLWordPrintable

      The Blend Effect:
          BlendMode - SRC_ATOP
          TopInput - ImageInput or PerspectiveTransform (with Input set to ImageInput )
          BottomInput - null, or left unspecified, i. e. graphic of polygon attaching the Blend Effect


      To illustrate the clipping/truncation 2 executable jars are attached of a simple demo javafx app BlendTestEA.jar (8u20 compiled) and BlendTest.jar (7u65 compiled) both also contain the identical source files, "BendTest.java , n49.png" under folder "src/blendtest". The jdk7 jar exhibits the correct behavior under jdk7 and both jars exhibit erroneous behavior under jdk8 versions.

      The app consists of 5 buttons and a grouped set of 2 polygons: a 200x200 Square and an isosceles Triangle base = height = 200, both polygons have outside stroke, width=4. Underlying each polygon is an identical copy set with a different fill color, yellow in this case, to distinguish it from top polygon, with the correct behavior this copy is never seen. There are 2 configurations for the polygons and copies, 1) horizontal linear showing the stroke borders, and 2) vertical where each polygon shares a common side, the Triangle is rotated for a dihedral angle of 135 degrees between the polygons and the stroke color is transparent.
      The Scene is set with a Perspective Camera and the polygon group has X and Y axes of rotation.

      The buttons are as follows:
      Start/Stop Rotation: starts and stops rotations about both X and Y axes
      Set/Clear Effects: sets and clears the PerspectiveTransform image blend, where the dimensions is based on the polygon bounds.
      Set/Clear Image: sets and clears the ImageInput image blend, where the image is a 200X200 Writable Image
      Full/Clear Image: sets and clears the ImageInput image blend, using the original 450x450 image
      Alt/Reset Config: switches between the horizontal and vertical configurations.

      Note: the blend effect is only applied to the top polygons and the app opens in the horizontal configuration with the blend effects cleared.

      When the app is run under jdk8 the clipping/truncation can be easily seen as revealed by the appearance of the underlying yellow polygons, this is particularly evident when rotations are active or when setting or clearing the Blend Effect.

      Also for the vertical configuration a very fine line appears between the Square and the Triangle which is surmised to be the background bleeding through, this is most evident when the blend effects are cleared. This is not the case when compiled and run under jdk7, which is the correct behavior and it should be noted that for more complicated polygon configurations other than shown in this demo app it is an issue.

      Last in the case of the Full image under both jdk 7 and 8, when selected it observably changes the X and Y layout of the polygon group, I'm not aware of any documentation regarding this type of behavior so I assume it's a problem and the above issue is not affected by setting prism.dirtyopts=false.

        1. BlendTest.jar
          633 kB
        2. BlendTestEA.jar
          633 kB
        3. n49.png
          n49.png
          299 kB

            flar Jim Graham
            ttaylorjfx Terry Taylor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: