Views
9 months ago

## 9. Shapes and Animation

9. Shapes and Animation Arc Arc represents an arc object defined by a center, start angle, angular extent (length of the arc in degrees), and an arc type ( OPEN , CHORD , or ROUND ) (Figure 9.2) arc { centerX = 200.0 centerY = 200.0 radiusX = 50.0 radiusY = 50.0 startAngle = 45.0 length = 250.0 type = ArcType.ROUND } Figure 9.2 Circle Circle represents a circle with the specified radius and center . circle { centerX = 100.0 centerY = 100.0 radius = 50.0 } 134

9. Shapes and Animation CubicCurve CubicCurve represents a cubic Bézier parametric curve segment in (x,y) coordinate space. Drawing a curve that intersects both the specified coordinates ( startX , startY ) and ( endX , enfY ), using the specified points ( controlX1 , controlY1 ) and ( controlX2 , controlY2 ) as Bézier control points. cubiccurve { startX = 0.0 startY = 50.0 controlX1 = 25.0 controlY1 = 0.0 controlX2 = 75.0 controlY2 = 100.0 endX = 150.0 endY = 50.0 fill = Color.GREEN } 135

GUIDE
Guide
GUIDE
A GUIDE
guide
Guide
GUIDE
GUIDE
GUIDE
GUIDE
Guide
Guide
GUIDE
Guide
GUIDE
GUIDE
Guide
GUIDE
Guide
Guide
Guide