2

I'm using Canvas for drawing in my Android application. But the result has bad quality (see the picture)the result

scaled

So, canvas drawing don't draw additional pixels with more dark color between "stairs pixels" for smoothing. Like this smoothing

But I'm interesting how to do it. Are there some preferences or methods for smoothing the picture? Thanx!

Edited: I've founded here

Community
  • 1
  • 1

1 Answers1

5

Use the ANTI-ALIAS flag for drawing smooth edges.

Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
//or
Paint p = new Paint();
p.setAntiAlias(true);
williamj949
  • 11,166
  • 8
  • 37
  • 51