Your browser does not support HTML5 Canvas

Notes:

TNTRing: a 'washer' shape created from a TNTDisk with a hole it it. (Negative space).

TNTRing Features and Usage:
Primary Attributes:

4 Parameters:

  • center: TNTPoint
  • innerRadius: a decimal (known as a 'double' in code)
  • outerRadius: a decimal (known as a 'double' in code)
  • ringColor: a TNTStroke: Note! it's the TNTStroke (not a fill color, TNTColor) that provides the image color!
To Create:

The example above was created by:

//designer colors/strokes
//r, g, b (integers), colorName(String)
var aggieMaroon = new TNTColor(170, 0, 
    65, "aggieMaroon"); 

//color(TNTColor), thickness(double)
var aggieMaroonStroke = 
    new TNTStroke(aggieMaroon, .2); 
var center = origin;
var myRing = new TNTRing(center, 2, 
    10, aggieMaroonStroke);
myRing.drawTNTRing(context);
                                    
                                    
To Draw: myRing.drawTNTRing(context);
Comments:

Many students forget to use the idea of 'negative space' in their designs. Experiment with it!

Even More:

Don't confuse fill colors with strokes. It's easy to do! Study the example above for clarity.