Skip to content

Commit 594c403

Browse files
fix: tank widget looks mangled when background is set transparent, due to how transparent pixels blend over opaque pixels
1 parent ed884d2 commit 594c403

File tree

1 file changed

+3
-0
lines changed
  • app/rtplot/src/main/java/org/csstudio/javafx/rtplot

1 file changed

+3
-0
lines changed

app/rtplot/src/main/java/org/csstudio/javafx/rtplot/RTTank.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public void refreshPlotPart(final PlotPart plotPart)
9292
if (image != null)
9393
synchronized (image)
9494
{
95+
// Clear the canvas for e.g. transparent pixels (otherwise image appears drawn over previous)
96+
gc.clearRect(0, 0, gc.getCanvas().getWidth(), gc.getCanvas().getHeight());
97+
// Draw the updated image
9598
gc.drawImage(image, 0, 0);
9699
}
97100
};

0 commit comments

Comments
 (0)