Skip to content

Commit

Permalink
Fixed cubic line "leak" on first point.
Browse files Browse the repository at this point in the history
Since lately we've done many fixes to the calculation for first/last
  points in cubic drawing - we not do not need that first "add curve".

Related issue: ChartsOrg/Charts#683
  • Loading branch information
danielgindi committed Mar 17, 2016
1 parent b9995b7 commit 1eb4e0d
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 1eb4e0d

Please sign in to comment.