Your browser does not support HTML5 Canvas

Notes:

A+ on this one, eh? You think it's just made from two TNTRectangles? Uh...that would be a no. It's actually a variant of a TNTWheel, if you gotta know.

It's just a wheel with 4 spokes, without a rim showing. This is a case where we are using existing software in a clever way in a new software engine. All you need for this baby is: a center (TNTPoint), a spoke size (s > 0), a stroke (TNTStroke), and a rotation (if wanted, in degrees).

If you'd like it placed inside a circle, we have a luscious TNTInscribedPlusSign for you!

TNTPlusSign Features and Usage:
Primary Attributes:

4 Parameters:

  • center: TNTPoint
  • radius: a decimal (known as a 'double' in code) for the horizontal/vertical dimensions
  • stroke: a TNTStroke: to set the border color as well as the thickness of the 'arms'
  • rotationDeg: a 'double' that rotates the shape about its center. rotn > 0 ==> counter-clockwise; rotn < 0 ==> clockwise
To Create:

The brown example above was created by:

var center = origin.translate(10, 10);
brownStroke.lineWidth = .8;
var plusSign = new TNTPlusSign(center, 3, brownStroke, 0);
                                    
To Draw:
plusSign.drawTNTPlusSign(context);
Comments:

Notice: there is no 'fill' color here; it's all done with a TNTStroke.

Even More: