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

Method HandleSizeChange

src/SFGUI/Canvas.cpp:283–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void Canvas::HandleSizeChange() {
284 auto allocation = GetAllocation();
285
286 m_custom_viewport->SetSize(
287 sf::Vector2f(
288 std::floor( allocation.size.x + .5f ),
289 std::floor( allocation.size.y + .5f )
290 )
291 );
292
293 if( m_render_texture ) {
294 m_resize = true;
295 }
296
297 Invalidate();
298}
299
300void Canvas::HandleAbsolutePositionChange() {
301 auto position = Widget::GetAbsolutePosition();

Callers

nothing calls this directly

Calls 1

SetSizeMethod · 0.80

Tested by

no test coverage detected