[英]How to create a velodrome shape?
An ellipse is easy to create. 椭圆很容易创建。 So is a rectangle with rounded corners.
具有圆角的矩形也是如此。 But how do I create a velodrome shape?
但是,如何创建赛车场形状?
That is, half a circle to the left + rectangle in the middle + half circle to the right. 也就是说,左侧为半圈+中间为矩形+右侧为半圈。 Like a straight sausage, if you want.
如果需要的话,像直香肠一样。
I want this as an XML
drawable to be used as background for a TextView
. 我希望将其作为
XML
绘制用作TextView
背景。
What you're describing is a rectangle with rounded corners, just a specific class of one. 您要描述的是一个带有圆角的矩形,只是一个特定的类。 Simply increase the radius of your corners to half the height of your rectangle.
只需将角的半径增加到矩形高度的一半即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.