[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-workspace/plasma/sreich/qml2-system-monitors] plasma/generic/applets/system-monitor/plotter/pri
From:       Shaun Reich <shaun.reich () kdemail ! net>
Date:       2012-02-17 3:03:26
Message-ID: 20120217030326.77FA4A60BE () git ! kde ! org
[Download RAW message or body]

Git commit 78dc12b1f3a6248f8516137d24ebbcdbb4d01406 by Shaun Reich.
Committed on 17/02/2012 at 04:03.
Pushed by sreich into branch 'plasma/sreich/qml2-system-monitors'.

use a bezier curve to help make it look cleaner

M  +8    -2    plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js


http://commits.kde.org/kde-workspace/78dc12b1f3a6248f8516137d24ebbcdbb4d01406

diff --git a/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js \
b/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js index \
                5f8b5c2..ac6fb07 100644
--- a/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js
+++ b/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js
@@ -375,12 +375,18 @@ function drawLines()
 
             context.fillStyle = points[i][j].fillColor;
             context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x + 5, y);
+
             if (j < points[i].length - 1) {
-              context.lineTo(points[i][j + 1].x, points[i][j + 1].scaledY);
+                x = points[i][j + 1].x;
+                cp1x = x - 5;
+                cp2x = x;
+                y = points[i][j + 1].scaledY;
+                cp1y = y;
+                cp2y = y - 10;
+              context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x + 5, y);
             } else {
               context.lineTo(points[i][j].x, height - graphPadding);
             }
-//            context.lineTo(points[i][j].x + graphPadding, height - graphPadding);
         }
 
         context.lineTo(graphPadding, height - graphPadding);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic