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

Method Canvas

src/SFGUI/Canvas.cpp:223–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221namespace sfg {
222
223Canvas::Canvas( bool depth ) :
224 m_custom_draw_callback( std::make_shared<Signal>() ),
225 m_depth( depth ),
226 m_resize( false )
227{
228 m_custom_viewport = Renderer::Get().CreateViewport();
229 SetViewport( m_custom_viewport );
230
231 m_custom_draw_callback->Connect( [this] { DrawRenderTexture(); } );
232
233 static auto checked = false;
234
235 if( !checked ) {
236 non_legacy_supported = NonLegacyRenderer::IsAvailable();
237
238 checked = true;
239 }
240}
241
242Canvas::~Canvas() {
243 sf::Context context;

Callers

nothing calls this directly

Calls 2

CreateViewportMethod · 0.80
ConnectMethod · 0.80

Tested by

no test coverage detected