Skip to content

Commit

Permalink
Merge pull request PhilJay#1594 from danielgindi/cubic-leak-fix
Browse files Browse the repository at this point in the history
Fixed cubic line "leak" on first point.
  • Loading branch information
PhilJay committed Mar 17, 2016
2 parents fc622ce + 1eb4e0d commit 5715549
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,6 @@ protected void drawCubic(Canvas c, ILineDataSet dataSet) {
// let the spline start
cubicPath.moveTo(cur.getXIndex(), cur.getVal() * phaseY);

prevDx = (cur.getXIndex() - prev.getXIndex()) * intensity;
prevDy = (cur.getVal() - prev.getVal()) * intensity;

curDx = (next.getXIndex() - cur.getXIndex()) * intensity;
curDy = (next.getVal() - cur.getVal()) * intensity;

// the first cubic
cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY,
cur.getXIndex() - curDx,
(cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);

for (int j = minx + 1, count = Math.min(size, entryCount - 1); j < count; j++) {

prevPrev = dataSet.getEntryForIndex(j == 1 ? 0 : j - 2);
Expand Down

0 comments on commit 5715549

Please sign in to comment.