To set the rendering style for corners, we use lineStyle( )'s joints parameter.
package{
import flash.display.*;
public class Main extends Sprite{
public function Main(){
var triangle:Shape = new Shape( );
triangle.graphics.lineStyle(20, 0, 1, false, LineScaleMode.NORMAL,
CapsStyle.ROUND, JointStyle.MITER);
triangle.graphics.beginFill(0xFF0000, 1);
triangle.graphics.lineStyle(20);
triangle.graphics.lineTo(125, 125); // Draw a line down and right
triangle.graphics.lineTo(250, 0); // Draw a line up and right
triangle.graphics.lineTo(0, 0); // Draw a line left
triangle.graphics.endFill( );
addChild(triangle);
}
}
}
Related examples in the same category