如何使用borderWidth = 3和borderColor = black绘制空矩形,并且矩形内的部分没有内容或颜色.Canvas中使用哪个功能
void drawRect(float left, float top, float right, float bottom, Paint paint)
void drawRect(RectF rect, Paint paint)
void drawRect(Rect r, Paint paint)
Run Code Online (Sandbox Code Playgroud)
谢谢.
我试试这个例子
Paint myPaint = new Paint();
myPaint.setColor(Color.rgb(0, 0, 0));
myPaint.setStrokeWidth(10);
c.drawRect(100, 100, 200, 200, myPaint);
Run Code Online (Sandbox Code Playgroud)
它绘制矩形并用黑色填充它但我只想像这个图像一样"框架":
