开发者

Android - Draw a rectangle

开发者 https://www.devze.com 2023-01-27 17:38 出处:网络
How can I draw rectangle at start and end points but still maintain the same width? ie 10 pixels width.

How can I draw rectangle at start and end points but still maintain the same width? ie 10 pixels width.

R开发者_JAVA技巧ect simplr = new Rect();

simplr.set(start.x, start.y, end.x, end.y);

thank you


Thickness is normally something you set in the Paint, not in the Rect.

See http://developer.android.com/reference/android/graphics/Paint.html#setStrokeWidth(float)

0

精彩评论

暂无评论...
验证码 换一张
取 消