Your browser does not support HTML5 Canvas

Notes:

Incribed elements and the Harry Potter craze inspired one of our students to create this image based on a TNTPolygon, a TNTDisk and a TNTLine. It's good to realize you can create shapes with 'negative space' such as the smaller image shown above. By matching the disk color to that of the canvas background, you can create the illusion (reality?) of holes in shapes. The vertical line can be optional as well.

TNTDeathlyHallows Features and Usage:
Primary Attributes:

7 Parameters:

  • circleCenter: TNTPoint
  • sideLength: a positive real number
  • triangleFillColor: TNTColor as fcolr
  • diskFillColor: TNTColor as fcolr
  • borderStroke: a TNTStroke: to set the triangle and vertical line strokes
  • rotn: a 'double' that rotates the shape about its center. rotn > 0 ==> counter-clockwise; rotn < 0 ==> clockwise
  • showLine: a 'boolean' trigger to 'show' the vertical line: (true or false)
To Create:

The examples above were created by:

maroonStroke.lineWidth = 1;
var dh = new TNTDeathlyHallows(origin, 15, 
    yellow, red, maroonStroke, 0, true);
dh.drawTNTDeathlyHallows(context);

var ptA = new TNTPoint(-10, -15);
dh = new TNTDeathlyHallows(ptA, 5, 
    maroon, offWhite, null, 180, false);
dh.drawTNTDeathlyHallows(context);
                                    
To Draw:
dh.drawTNTDeathlyHallows(context);