Draw

void Draw(
Rgba color ) const

Draws the circle to the screen filled with a color.

void Draw(
const Rgba &startColor, const Rgba &endColor ) const

Draws the line with the color smoothly changing from start of the line to the end

Examples

// Create a new line between x = 50.0, y = 30.0 //
// and x = 200.0, y = 100.0 ( and line width of 1.0 ) //
Line myLine( 50.030.0200.0100.0 );

// Draw that line to the screen in black //
myLine.DrawRgba::BLACK ); 

// Draw that line to the screen in light yellow //
myLine.DrawRgba1.01.00.7 ));

// Do the same as above but with a single code line //
Line50.030.0200.0100.0 ).DrawRgba1.01.00.7 )); 

// Render a gradient-filled line with the color changing from red to yellow //
myLine.DrawRgba::RED, Rgba::YELLOW );


Other functions of the class Line
Draw
Draws the line to the screen filled with a color
GetIntersectionPoint
Returns the intersection point between two lines
Collides
Tests if the two line segments collide
GetNormal
Returns the normal of the line


Questions about Draw? Click here.