1
我的代碼對imageview的添加一個位圖添加markerwater Android中使用滑翔
public Bitmap applyWaterMarkEffect(Bitmap src, String watermark, int x, int y, int color, int alpha, int size, boolean underline) {
int w = src.getWidth();
int h = src.getHeight();
Bitmap result = Bitmap.createBitmap(w, h, src.getConfig());
Canvas canvas = new Canvas(result);
canvas.drawBitmap(src, 0, 0, null);
Paint paint = new Paint();
paint.setColor(color);
paint.setAlpha(alpha);
paint.setTextSize(size);
paint.setAntiAlias(true);
paint.setUnderlineText(underline);
canvas.drawText(watermark, x, y, paint);
return result;
}
的問題是,我不知道如何將它們結合在一起展示一切。我應該讓圖像(位圖)作爲參數傳遞它嗎?在那種情況下,我如何得到它?
謝謝!
非常感謝您!有用! – ZottoSL