AndroidWM icon indicating copy to clipboard operation
AndroidWM copied to clipboard

我想设置下水印是文字加logo的支持吗,然后每个水印之间需要加上下左右的margin,可以升个版本支持下不

Open kangshifu opened this issue 4 years ago • 1 comments

kangshifu avatar Jan 17 '20 02:01 kangshifu

TextView textView = new TextView(getContext()); textView.setText("你好"); Drawable drawable = TBaseModuleApplication.getContext().getResources().getDrawable(R.drawable.water_mark_logo); textView.setCompoundDrawables(drawable,null,null,null); textView.setCompoundDrawablePadding(10); WatermarkText watermarkText = new WatermarkText(textView) .setPositionX(0.5) .setPositionY(0.5) .setTextColor(Color.WHITE) .setTextAlpha(98) .setRotation(-30) .setTextSize(14);

    Watermark waterMark = WatermarkBuilder.create(TBaseModuleApplication.getContext(), bitmap)
            .setTileMode(true)
            .loadWatermarkText(watermarkText)
            .getWatermark();

设置后drawable图片没有绘制出来

kangshifu avatar Jan 17 '20 03:01 kangshifu