title: Android Canvas.drawLine not smooth, not consistent
body: <p>I am trying to use <code>Canvas.drawLine</code> method to draw a polygon</p>
  
  <p>Here's the code that I am using</p>
  
  <pre><code>Canvas canvas = new Canvas(cache);
  Paint paint = new Paint();
  paint.setStrokeWidth(16);
  paint.setColor(this.currentDrawing.getColor());
  paint.setFlags(Paint.ANTI_ALIAS_FLAG);
  systemCanvas.drawBitmap(cache, 0, 0, paint);
  paint.setStrokeCap(Cap.ROOUND);
  canvas.drawLine(from.getLeft(), from.getTop(), to.getLeft(), to.getTop(), paint);
  </code></pre>
  
  <p>And this is the output that I am getting:</p>
  
  <p><img src="https://i.stack.imgur.com/ohQYm.jpg" alt="enter image description here"></p>
  
  <p>Notice the way the lines render, they break on the round shapes and don't join smoothly.  I understand why is it happening but I don't know how to make it smooth and consistent.  </p>
  
  <p>Any help is appreciated.</p>