Rect
Creates a new rectangle with the specified position for the top-left corner, width and roundness. Line width specifies the width of the outline of the rectangle (See DrawOutline). Accuracy parameter specifies the accuracy of the corners of a rounded rectangle. Examples // Create a new rectangle with top-left corner at x = 200.0, y = 100.0 //
// and size of 300.0 x 400.0 // Rect myRectangle( 200.0, 100.0, 300.0, 400.0 ); // Render the rectangle to the drawing surface filled with white // myRectangle.Draw( Rgba::WHITE ); // You can also create the rectangle and render it in a single line: // Rect( 200.0, 100.0, 300.0, 400.0 ).Draw( Rgba::WHITE ); // Create a new rectangle by using vectors // Vec2D topleft( 200.0, 100.0 ); Vec2D size( 300.0, 400.0 ); Rect myRectangle( topleft, size ); // Or the above with only a single line: // Rect myRectangle( Vec2D( 200.0, 100.0 ), Vec2D( 300.0, 400.0 )); Member functions
Parent Class Questions about Rect? Click here. |