Skip to content

Commit 6e358fb

Browse files
authored
Merge pull request #2340 from ControlSystemStudio/CSSTUDIO-1721
CSSTUDIO-1721: If the Tank Widget Background Color is set to Transparent it does not display correctly
2 parents c101e59 + 594c403 commit 6e358fb

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)