Notes:
Need a square? We're on it! Just tell us it's center (a TNTPoint), it's side-length, s, a fill color (fcolr, TNTColor) and a stroke (TNTStroke) and we'll dish one up. We can even give it a rotation (rotn in degrees) if you'd like!
TNTSquare Features and Usage:
| Primary Attributes: |
5 Parameters:
|
|---|---|
| To Create: |
The example above was created by:
var theCenter = new TNTPoint(2, 5);
var side = 10;
var mySquare = new TNTSquare(theCenter, side, medGreen, blackStroke, -20);
mySquare.showCenter = true;
mySquare.showPoints = true;
|
| To Draw: | mySquare.drawTNTSquare(context); |
| Comments: | TNTSquares sport two attributes: showCenter and showPoints. When true, those points will appear along with the TNTSquare. |
| Even More: | The TNTSquare has a cousin: TNTTwoTonedSquare Want a challenge? Check out the Warped Square Illusion Challenge and see how you could pull it off. When tiled in a plane, TNTSquares can create some interesting optical illusions. |
