siteIcon

Tech Novice Tools

JS Grafix Sandbox

burgerIcon
spiral

JSGrafix Sandbox (JSGS)

TNT TwoTonedDisk

Your browser does not support HTML5 Canvas

Notes:

Self descriptive, we hope. Made from a couple of TNTCircleSegments.

Features and Usage:

Primary Attributes:

7 parameters:
center(TNTPoint), radius(double), fill colors(2 TNTColor), 2 strokes(TNTStroke), and rotation(in degrees, rotn about the center)

To Create:

var center = new TNTPoint(1, -5);
var radius = 8;
var fcolr1 = yellow;
var fcolr2 = black;
goldStroke.lineWidth = 3;
var stroke1 = goldStroke;
var stroke2 = null;
var rotn = 45;
var myDisk = new TNTTwoTonedDisk(center, radius, fcolr1, fcolr2, stroke1, stroke2, rotn);

To Draw:

myDisk.drawTNTTwoTonedDisk(context);

Comments:

Interesting effects can be produced when these babies are tiled in the plane with the rotation angles tweaked based on their position or the number of disks tiling the canvas.