siteIcon

Tech Novice Tools

JS Grafix Sandbox

burgerIcon
spiral

JSGrafix Sandbox (JSGS)

TNT PlusSign

Your browser does not support HTML5 Canvas

Notes:

A+ on this one, eh? 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).

Features and Usage:

Primary Attributes:

4 Parameters:
center(TNTPoint), radius(double), stroke(TNTStroke), rotation(double, degrees)

To Create:

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.