Your browser does not support HTML5 Canvas

Notes:

Another student-inspired shape!

TNTPokeball Features and Usage:
Primary Attributes:

9 Parameters:

  • circleCenter: TNTPoint
  • ballRadius: a positive real number
  • innerCircleRadius: a positive real number
  • dotRadius: a positive real number
  • topFillColor: TNTColor as fcolr
  • bottomFillColor: TNTColor as fcolr
  • dotFillColor: TNTColor as fcolr
  • borderStroke: a TNTStroke: to set the circle border color as well as the thickness of the perimeter
  • rotn: a 'double' that rotates the shape about its center. rotn > 0 ==> counter-clockwise; rotn < 0 ==> clockwise
To Create:

The example above was created by:

blackStroke.lineWidth = .8;
var pokeball = new TNTPokeball(origin, 15, 5, 2, red, white, yellow, blackStroke, 0);
pokeball.drawTNTPokeball(context);
                                    
To Draw:
pokeball.drawTNTPokeball(context);