ZKX's LAB

我想把一个基类窗体画成圆角矩形,然后让所有的继承窗体都是圆角矩形,要怎么做? canvas如何画圆角矩形

2021-04-24知识10

我想把一个基类窗体画成圆角矩形,然后让所有的继承窗体都是圆角矩形,要怎么做? to:lyxinfo()我把User中的Forms去掉就可以了我还想问一下,我在FormCreate中用下面的语句想画一条线出来,可是窗体上无任何显示procedure

用canvas画只有一个角是圆角的矩形,能画出来么? int x=10;int y=10;int width=300;int height=50;float[]outerR=new float[]{ 12,12,0,0,0,0,30,30 };RoundRectShape rectShape=new RoundRectShape(outerR,null,null);ShapeDrawable mDrawables=new ShapeDrawable(new RoundRectShape(outerR,null,null));mDrawables.getPaint().setColor(Color.RED);mDrawables.setBounds(x,y,x+width,y+height);mDrawables.draw(canvas);费了九牛二虎之力终于找到点踪迹了,基本上搞定 到eoeAndroid网站查看回答详情>;>;

怎么用canvas在bitmap上画个边框? Bitmapoutput=Bitmap.createBitmap(bitmap.getWidth(),bitmap.getHeight(),Config.ARGB_8888);Canvas canvas=new Canvas(output);final Paint paint=new Paint();final Rect rect=new Rect(0,0,bitmap.getWidth(),bitmap.getHeight());final RectF rectF=new RectF(rect);paint.setAntiAlias(true);canvas.drawARGB(0,0,0,0);canvas.drawRoundRect(rectF,20.0f,20.0f,paint);paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));canvas.drawBitmap(bitmap,rect,rect,paint);return output;

#canvas如何画圆角矩形

随机阅读

qrcode
访问手机版