[SRADA-1008] Remove gradation at network chart
authorjaeyong lee <jae-yong.lee@samsung.com>
Thu, 11 Aug 2016 06:29:25 +0000 (15:29 +0900)
committergihun chang <gihun.chang@samsung.com>
Thu, 11 Aug 2016 08:06:45 +0000 (17:06 +0900)
Change-Id: I6a857ef5ca3315bb05fa2937563d0f44b9454094

org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DAChartRenderer.java

index 1965b6d..ac410fd 100644 (file)
@@ -853,7 +853,6 @@ public class DAChartRenderer {
                                gc.fillRectangle(pixelStartX, pixelStartY, barWidth, r.y + r.height
                                                - pixelStartY);
                                gc.setBackground(series.getColor());
-                               gc.setAlpha(250);
                        }
                        if (currentX > plot.getVisibleEndX()) {
                                break;
@@ -1105,6 +1104,9 @@ public class DAChartRenderer {
         * SERIES_AREA_END, SERIES_AREA_BAR.
         */
        private void drawStateAreaSeries(GC gc, DAChartSeries series, int seriesIndex, int seriesSize) {
+               int oldAlpha = gc.getAlpha();
+               gc.setAlpha((int) (255 * 0.8));
+               
                List<DAChartSeriesItem> seriesItems = series.getSeriesItemList();
                if (null == seriesItems) {
                        return;
@@ -1218,6 +1220,7 @@ public class DAChartRenderer {
                        int pixelStartX = plot.getXPixelFromX(barSeriesItem.getX(), r);
                        gc.fillRectangle(pixelStartX, pixelStartY, STATE_AREA_BAR_WIDTH, areaHeight);
                }
+               gc.setAlpha(oldAlpha);
        }
 
        private void drawStepSeries(GC gc, DAChartSeries series, boolean bEndVal) {
@@ -1404,6 +1407,9 @@ public class DAChartRenderer {
                gc.setBackground(color);
                gc.setForeground(ColorResources.BLACK);
                gc.setAntialias(SWT.ON);
+               
+               int oldAlpha = gc.getAlpha();
+               gc.setAlpha((int) (255 * 0.8));
 
                int index = series.getPrevIndexByXvalue(plot.getVisibleStartX());
                if (index < 0) {
@@ -1430,6 +1436,7 @@ public class DAChartRenderer {
                                break;
                        }
                }
+               gc.setAlpha(oldAlpha);
        }
 
        private void drawEventAreaSeries(GC gc, DAChartSeries series) {
@@ -1648,6 +1655,9 @@ public class DAChartRenderer {
                Color foreColor;
                gc.setBackground(color);
                gc.setAntialias(SWT.ON);
+               
+               int oldAlpha = gc.getAlpha();
+               gc.setAlpha((int) (255 * 0.8));
 
                int index = series.getPrevIndexByXvalue(plot.getVisibleStartX());
                if (index < 0) {
@@ -1716,13 +1726,7 @@ public class DAChartRenderer {
                                        oldStateContinueRectangle.width = barWidth;
                                        oldStateContinueRectangle.height = r.y + r.height - heightMargin * 2;
 
-                                       if (null != foreColor) {
-                                               gc.setForeground(foreColor);
-                                               gc.fillGradientRectangle(pixelStartX, r.y + heightMargin, barWidth, r.y
-                                                               + r.height - heightMargin * 2, true);
-                                       } else {
-                                               gc.fillRectangle(oldStateContinueRectangle);
-                                       }
+                                       gc.fillRectangle(oldStateContinueRectangle);
                                }
                                prevEndX = pixelStartX + barWidth;
                                break;
@@ -1751,13 +1755,7 @@ public class DAChartRenderer {
                                        oldStateConnectionRectangle.width = barWidth;
                                        oldStateConnectionRectangle.height = r.y + r.height - heightMargin * 2;
 
-                                       if (null != foreColor) {
-                                               gc.setForeground(foreColor);
-                                               gc.fillGradientRectangle(pixelStartX, r.y + heightMargin, barWidth, r.y
-                                                               + r.height - heightMargin * 2, true);
-                                       } else {
-                                               gc.fillRectangle(oldStateConnectionRectangle);
-                                       }
+                                       gc.fillRectangle(oldStateConnectionRectangle);
                                }
 
                                prevEndX = pixelStartX + barWidth;
@@ -1773,6 +1771,7 @@ public class DAChartRenderer {
                                break;
                        }
                }
+               gc.setAlpha(oldAlpha);
        }
        
        private void drawDotSeries(GC gc, DAChartSeries series) {