2016-06-08 55 views
1

如何四舍五入AS3的四个角?功能如何四舍五入AS3的四个角落?

drawRoundRect(0, 0, width, height, 16); 

四舍五入,但我只需要2个顶角或只有2个底角。

+1

解决方法:创建两个框。一个圆角,一个没有圆角。放置非圆形盒子,使其隐藏圆形盒子的圆角。另外,谷歌的类似功能的来源,并修改它为您的需要。 – DodgerThud

回答

3

drawRoundRectComplexmx.utils.GraphicsUtil允许您分别指定topLeftRadius,topRightRadius,bottomLeftRadius和bottomRightRadius。

实施例:

GraphicsUtil.drawRoundRectComplex(this.graphics,0,0,width,height,20,20,0,0);