Your browser does not support HTML5 Canvas

Notes:

Feeling the 'luck of the Irish' now?! We used to use TNTClover when doing St.Patrick's Day art, but NOW we have a real shamrock!

TNTClub Features and Usage:
Primary Attributes:

7 Parameters:

  • center: TNTPoint; located at the center of the shamrock
  • radius: decimals (known as a 'double' in code);
    the distance from the center of the shamrock to a petal extremity
  • fillColor: TNTColor (can be null for a framework image)
  • borderColor: a TNTStroke: to set the border color as well as the thickness of the sides
  • rotationDeg: a 'double' that rotates the shape about its center.
    rotn > 0 ==> counter clockwise; rotn < 0 ==> clockwise
  • shouldShowStem: a 'boolean' that allows you to turn on/off the stem
  • stemOrientation: an integer constant that places the stem relative to the leaves:
    0, random; 1, right; 2, left; 3 fixed
To Create:

The example above was created by:

blackStroke.lineWidth = .1;
shouldShowStem = true;
stemOrientation = 0; //0, random; 1, right; 2, left; 3 fixed
var myShamrock = new TNTShamrock(new TNTPoint(0,0), 7, darkGreen, 
    blackStroke, 15, shouldShowStem, stemOrientation);
myShamrock.drawTNTShamrock(context);
                                    
To Draw: myShamrock.drawTNTShamrock(context);
Comments: We found this online resource that provided the mathematical support we needed to make the shape