摘要:
private void init(){ paint = new Paint(Paint.ANTI_ALIAS_FLAG); roundRect = new RectF(0, 0, getWidth() , getHeight()); radius = 40; mPorterDuffXfermode = new PorterDuffXfermode(PorterDuff.Mode.SRC_IN) ; }继承ImageView,在构造方法中调用,初始化Paint和Xfermode。 protected void onD... 阅读全文