0

Hi an developing drawing android application. in that i want to add a sticker(image) to bitmap then i can save the images..

please anyone knows about this please ping me. thanks in advance..

Quick learner
  • 699
  • 4
  • 22
  • 39

1 Answers1

2

Something along the lines of this? Draw the bitmap to canvas and draw text then save?

drawingCache = Bitmap.createBitmap(300, 400, Bitmap.Config.ARGB_8888);

Canvas canvas = new Canvas(drawingCache);
Paint paint = new Paint();

// Draw your bitmap to the canvas
canvas.drawBitmap(bitmap, 0, 0, paint);

Paint watermarkPaint = new Paint();
watermarkPaint.setColor(Color.WHITE);
watermarkPaint.setAlpha(150);
watermarkPaint.setTextSize(30);
watermarkPaint.setTextAlign(Paint.Align.LEFT);
watermarkPaint.setFlags(Paint.ANTI_ALIAS_FLAG);

canvas.drawText("Watermark", 100, 100, watermarkPaint);
Broak
  • 4,161
  • 4
  • 31
  • 54
  • my question is with onclick i got some sticker(image) when i touch anywhere on bitmap it has to paste over there depends on not of touches done on bitmap.. – Quick learner Apr 09 '12 at 12:47