2016-06-08 45 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);