Your browser does not support HTML5 Canvas

Notes:

Another inscribed shape: based on (a real 'positive'! (plus sign, wink!) -- remember our TNTPlusSign?) Note once more the variation you can achieve by toying with parameters. Always remember you can use 'null' for either stroke or fill color elements.

TNTInscribedPlusSign Features and Usage:
Primary Attributes:

6 Parameters:

  • circleCenter: TNTPoint
  • radius: a positive real number
  • plusStroke: a TNTStroke: to set the plus sign color and thickness
  • diskFillColor: TNTColor as fcolr
  • diskStroke: a TNTStroke: to set the disk border color
  • rotn: a 'double' that rotates the shape about its center. rotn > 0 ==> counter-clockwise; rotn < 0 ==> clockwise
To Create:

The examples above were created by:

var tangerine = new TNTColor(250, 50, 5, "tangerine");
var tangerineStroke = new TNTStroke(tangerine, 3);
var symbol = new TNTInscribedPlusSign(origin, 5, 
    tangerineStroke, yellow, null, 0);
symbol.drawTNTInscribedPlusSign(context);

var ptA = new TNTPoint(10, 10);
var symbol2 = new TNTInscribedPlusSign(ptA, 3, 
    blueStroke, null, blueStroke, 45);
symbol2.drawTNTInscribedPlusSign(context);

var ptB = new TNTPoint(-10, 10);
blackStroke.lineWidth = 5;
var symbol3 = new TNTInscribedPlusSign(ptB, 2, 
    blackStroke, orange, null, 30);
symbol3.drawTNTInscribedPlusSign(context);

var ptC = new TNTPoint(-10, -10);
greenStroke.lineWidth = 8.25;
var symbol4 = new TNTInscribedPlusSign(ptC, 5, 
    greenStroke, brown, null, 0);
symbol4.drawTNTInscribedPlusSign(context);
                                    
To Draw:
symbol.drawTNTInscribedPlusSign(context);