File tree Expand file tree Collapse file tree
app/rtplot/src/main/java/org/csstudio/javafx/rtplot Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ public RTTank()
119119 widthProperty ().addListener (resize_listener );
120120 heightProperty ().addListener (resize_listener );
121121
122- // 50Hz default throttle
122+ // 20Hz default throttle
123123 update_throttle = new UpdateThrottle (50 , TimeUnit .MILLISECONDS , () ->
124124 {
125125 if (needUpdate .getAndSet (false )){
126- plot_image = updateImageBuffer ();
126+ plot_image = updateImageBuffer (); // This will return null if image buffer instantiation times out
127127 if (plot_image != null ){
128128 redrawSafely ();
129129 }
@@ -253,7 +253,7 @@ protected Image updateImageBuffer()
253253 if (buffer == null )
254254 return null ;
255255 final BufferedImage image = buffer .getImage ();
256- final Graphics2D gc = image . createGraphics ();
256+ final Graphics2D gc = buffer . getGraphics ();
257257
258258 gc .setRenderingHint (RenderingHints .KEY_ANTIALIASING , RenderingHints .VALUE_ANTIALIAS_ON );
259259 gc .setRenderingHint (RenderingHints .KEY_ALPHA_INTERPOLATION , RenderingHints .VALUE_ALPHA_INTERPOLATION_SPEED );
You can’t perform that action at this time.
0 commit comments