0

My drawing app, I need a fill shapes in the "*" I think... to fill color into shapes after drawing

My code is much bigger, like the touch metod and more, but this will be ok.

If not I can add the rest.

This code have the drawing shapes options:

@Override
protected void onDraw(Canvas canvas) {
    if(z==true) {
       *            
      }
      else
    switch (pick) {

        case 1:
            drawPaint.setStyle(Paint.Style.STROKE);
            canvas.drawBitmap(canvasBitmap, 0, 0, drawPaint);
            drawCanvas.drawCircle(x,y,brushSize,drawPaint);
            break;
        case 2:
            drawPaint.setStyle(Paint.Style.STROKE);
            canvas.drawBitmap(canvasBitmap, 0, 0, drawPaint);
            drawCanvas.drawLine(x, y, brushSize, brushSize, drawPaint);
            break;
        case 3:
            drawPaint.setStyle(Paint.Style.STROKE);
            canvas.drawBitmap(canvasBitmap, 0, 0, drawPaint);
            drawCanvas.drawRect(x,brushSize,y,brushSize,drawPaint);
            break;
        default:
            drawPaint.setStyle(Paint.Style.STROKE);
            canvas.drawBitmap(canvasBitmap, 0, 0, drawPaint);
            canvas.drawPath(drawPath,drawPaint);


    }

}
Joe's Morgue
  • 173
  • 2
  • 8
dor
  • 23
  • 3
  • @Bryan I don't think it is. The issues are different. Though this question doesn't show any research effort – Vendetta8247 May 05 '16 at 00:11
  • @Vendetta8247 As I mentioned in my answer, your question does not seem very clear. Could you edit your question with a more descriptive body? Or at least show how `Paint.Sytle.FILL` does not solve your issue? – Bryan May 05 '16 at 12:28

2 Answers2

1

Im not sure I understand your question, but I think drawPaint.setStyle(Paint.Style.FILL); should do it.

Bryan
  • 14,756
  • 10
  • 70
  • 125
0

There are no changes "after drawing". If you want to change what you drew you need to "draw over" it (just draw that region again with the settings you want).

As others have suggested, Paint.Style.FILL gives the effect you want.

C. Ross
  • 31,137
  • 42
  • 147
  • 238