Render bug

Jeff Martin jeff at
Thu Aug 14 20:02:33 UTC 2014

Okay, here’s the jira:

	Render bug animating over node with lighting effect

I also simplified the example (happens with a Rectangle background as well as ImageView).


On Aug 13, 2014, at 3:20 PM, Chien Yang <chien.yang at> wrote:

> This looks like a bug in JavaFX when applying the lighting effect. I was able to reproduce the dirty rect rendering on my system. The bug went away if I commented  out the following line:
>       iview.setEffect(lighting);
> Can you please file a JIRA so that we will fix it?
> Thanks,
> - Chien
> On 8/13/2014 8:33 AM, Jeff Martin wrote:
>> I’m getting a rendering bug with a simple rotating path in front of an ImageView (with lighting effect) on Mac OS with 8u20:
>> Looks like some sort of dirty rect problem. Am I doing something wrong or should I file a bug?
>> The code is below. If anyone has an idea for a quick work around, let me know.
>> jeff

import javafx.animation.RotateTransition;
import javafx.application.Application;
import javafx.scene.*;
import javafx.scene.effect.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.*;
import javafx.stage.Stage;
import javafx.util.Duration;

public class DrawTurd extends Application {

public void start(Stage aStage)
    // Creat background rect with lighting effect
    Rectangle rect = new Rectangle(0,0,500,400); rect.setFill(Color.YELLOW);
    Light.Distant light = new Light.Distant(); light.setAzimuth(60); light.setElevation(120);
    Lighting lighting = new Lighting(); lighting.setLight(light); lighting.setSurfaceScale(10);
    // Create foreground path triangle with rotation transition animation
    Path path = new Path();
    path.getElements().add(new MoveTo(100,100)); path.getElements().add(new LineTo(180,180));
    path.getElements().add(new LineTo(260,100)); path.getElements().add(new ClosePath());
    path.setFill(Color.RED); path.setStroke(Color.BLACK);
    RotateTransition rt = new RotateTransition(Duration.millis(3000), path);
    rt.setByAngle(180); rt.setCycleCount(4); rt.setAutoReverse(true);;
    // Create group, add nodes, set scene root, show stage
    Group group = new Group(rect, path);
    aStage.setScene(new Scene(group));;


More information about the openjfx-dev mailing list