Skip to content

Commit

Permalink
Make the extra last line clearer in the rendering code flow
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Feb 29, 2016
1 parent ed77cb4 commit 8f4432c
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,13 @@ protected void drawDataSet(Canvas c, IRadarDataSet dataSet, int mostEntries) {
surface.lineTo(p.x, p.y);
}

// if this is the largest set, close it
if (dataSet.getEntryCount() >= mostEntries) {
surface.close();
} else {

// if this is not the largest set, draw a line to the center and then close it
if (dataSet.getEntryCount() > mostEntries) {
// if this is not the largest set, draw a line to the center before closing
surface.lineTo(center.x, center.y);
surface.close();
}

surface.close();

if(dataSet.isDrawFilledEnabled()) {

final Drawable drawable = dataSet.getFillDrawable();
Expand Down

0 comments on commit 8f4432c

Please sign in to comment.