tags:

views:

513

answers:

1

Hi,

How to draw filled polygon ?

Thanks in advance.

+2  A: 

You need to set the paint object to FILL

Paint paint = new Paint();
paint.setStyle(Paint.Style.FILL);

Then you can draw whatever you want, and it will be filled.

   canvas.drawCircle(20, 20, 15, paint);
   canvas.drawRectangle(60, 20, 15, paint);

etc.

For more complex shapes you need to use the PATH object.

Adrian Faciu