MCPcopy Create free account
hub / github.com/TankOs/SFGUI / CreateRect

Method CreateRect

src/SFGUI/Renderer.cpp:348–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348Primitive::Ptr Renderer::CreateRect( const sf::Vector2f& top_left, const sf::Vector2f& bottom_right, const sf::Color& color ) {
349 return CreateQuad(
350 sf::Vector2f( top_left.x, top_left.y ),
351 sf::Vector2f( top_left.x, bottom_right.y ),
352 sf::Vector2f( bottom_right.x, bottom_right.y ),
353 sf::Vector2f( bottom_right.x, top_left.y ),
354 color
355 );
356}
357
358Primitive::Ptr Renderer::CreateRect( const sf::FloatRect& rect, const sf::Color& color ) {
359 return CreateRect( rect.position, rect.position + rect.size, color );

Callers 8

CreateWindowDrawableMethod · 0.80
CreateScaleDrawableMethod · 0.80
CreateEntryDrawableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected