title: Android Draw Circle Pixel by Pixel
body: <p>I am trying to draw a circle on my bitmap, pixel by pixel, using this code:</p>
  
  <pre><code>for(int j = ((int)x - 20); j &lt; ((int)x + 20); j++){
      for(int k = ((int)y - 20); k &lt; ((int)y + 20); k++){
  
          int colorX = bitmap.getPixel((int)j, (int)k);
  
          if(Color.red(colorX) == 0 &amp;&amp; Color.green(colorX) == 0 &amp;&amp; Color.blue(colorX) == 0){
  
              if(Math.sqrt(((j - (( int ) x )) ^ 2 ) + ((k - (( int ) y )) ^ 2) ) &lt;= 20)
                  bitmap.setPixel(j, k, Color.YELLOW);
          }
      }
  
  }
  </code></pre>
  
  <p>But there is a problem, this is not drawing a circle.. it looks like a triangle..</p>
  
  <p>Can someone help me?</p>
  
  <p>Thanks alot in advance ;)</p>