Line
Create a new line with starting point of (x1, y1) and ending point (x2, y2).
Vec2D end - The end point of the line See the examples of how to simply render a line to the screen by using a temporary object. 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.0, 30.0, 200.0, 100.0 ); // Draw that line to the screen in black // myLine.Draw( Rgba::BLACK ); // Do the same as above but with a single code line // Line( 50.0, 30.0, 200.0, 100.0 ).Draw( Rgba::BLACK ); // Or maybe you wish to store or specify the start and ending points as vectors // Line( Vec2D( 50.0, 30.0 ), Vec2D( 200.0, 100.0 )).Draw( Rgba::BLACK ); Member functions
Parent Class Questions about Line? Click here. |