tmf.ui: add support for transparency in timegraph
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Sat, 29 Apr 2017 15:04:12 +0000 (11:04 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 19 May 2017 16:50:22 +0000 (12:50 -0400)
Change-Id: Ib3800b5ae78970005512690c265ae8786984f0e7
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/96080
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java

index 09e0549c97e0559049bdcacf2b57a3221f060d70..ddf87f8a7556d76913de7798c664f9fc460b1989 100644 (file)
@@ -2465,7 +2465,11 @@ public class TimeGraphControl extends TimeGraphBaseControl
         // fill all rect area
         gc.setBackground(stateColor);
         if (visible) {
+            int prevAlpha = gc.getAlpha();
+            int alpha = ((int) styleMap.getOrDefault(ITimeEventStyleStrings.fillColor(), 0xff)) & 0xff;
+            gc.setAlpha(alpha);
             gc.fillRectangle(drawRect);
+            gc.setAlpha(prevAlpha);
         } else if (fBlendSubPixelEvents) {
             gc.setAlpha(128);
             gc.fillRectangle(drawRect);
This page took 0.025833 seconds and 5 git commands to generate.