Notes:
We call it a 'disk' rather than a 'circle', because technically, a circle is just the perimeter part of the shape, and ours can include both the inside and border of the shape. Not surprisingly, the engine needs a TNTPoint for the center, a real-valued radius, and a TNTColor for fill color (fcolr) and a TNTStroke for the border/stroke/perimeter of the disk.
Features and Usage:
| Primary Attributes: | 4 parameters:
center(TNTPoint), radius(double), fillColor(TNTColor), borderColor(TNTStroke)
Note: there is no TNTCircle: just make a TNTDisk with a 'null' fillColor |
|---|---|
| To Create: | An example: var aggieMaroon = new TNTColor(170, 0, 65, "aggieMaroon");
var aggieGray = new TNTColor(218, 217, 216, "aggieGray");
var aggieMaroonStroke = new TNTStroke(aggieMaroon, .5);
var center = new TNTPoint(6, 9);
var radius = 8;
var myDisk = new TNTDisk(center, radius, aggieGray, aggieMaroonStroke);
myDisk.showCenter = true; |
| To Draw: | myDisk.drawTNTDisk(context); |
| Comments: | To make a TNTDisk without a fill color, provide 'null' for the 'fcolr' parameter; If you do not want a border, provide 'null' for the stroke. |
| Even More: | Don't confuse fill colors with strokes. It's easy to do! Study the example above for clarity. |
