Issue
I want to draw a background rectangle for a view in Android . Here is my code
rectBox= new RectF(0, 0, 200,
200);
Paint paint= new Paint();
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(2);
paint.setColor(Color.BLACK);
canvas.drawRoundRect(rectBox, 0, 0, paint);
I am getting the output
I want this output. I want to remove the part of segments in the edges of a rectangle
Please give an idea how to do this?
Solution
Just draw lines (or rectangles) with background color over that segments.
Update
Draw just necessary parts using drawLine() and drawArc().
Answered By - Andrii Omelchenko


0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.