siteIcon

Tech Novice Tools

JS Grafix Sandbox

burgerIcon
spiral

JSGrafix Sandbox (JSGS)

TNT Point

Your browser does not support HTML5 Canvas

Notes:

An 'atomic' member of the JSGS family, TNTPoint is used in most other graphic elements. To create it, provide its x and y user coordinates. A call to the 'drawTNTPoint' function, as shown in the table, graphs it correctly in the canvas with the specified TNTColor (fcolr). To call it, say the object's name, followed by a period (aka the dot operator!) ending with 'drawTNTPoint' (with its parameters).

Features and Usage:

Primary Attributes: x and y coordinates, fcolr (a TNTColor, 'fill color')
To Create: var ptA = new TNTPoint(-15, 3);
To Draw: ptA.drawTNTPoint(myTNTCanvas, orange);
Comments: As shown in the tntGraphics specifications, TNTPoints may be translated, scaled, and their coordinates may be modified.
Even More: When drawing a TNTPoint, you have to provide both the canvas object (myTNTCanvas) as well as a fill color (a TNTColor). If you look at other shapes, it's enough to just supply the drawing function with a 'context'. TNTPoint is just a bit different from the others. Don't worry about it!