嗨,一个正在开发的绘图 android 应用程序。在那我想在位图中添加一个贴纸(图像)然后我可以保存图像..
请任何人知道这件事请ping我。提前致谢..
嗨,一个正在开发的绘图 android 应用程序。在那我想在位图中添加一个贴纸(图像)然后我可以保存图像..
请任何人知道这件事请ping我。提前致谢..
类似的东西?将位图绘制到画布并绘制文本然后保存?
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);