MCPcopy Create free account
hub / github.com/ZDoom/Raze / Paint

Method Paint

libraries/ZWidget/src/core/widget.cpp:298–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298void Widget::Paint(Canvas* canvas)
299{
300 Point oldOrigin = canvas->getOrigin();
301 canvas->pushClip(FrameGeometry);
302 canvas->setOrigin(oldOrigin + FrameGeometry.topLeft());
303 OnPaintFrame(canvas);
304 canvas->setOrigin(oldOrigin);
305 canvas->popClip();
306
307 canvas->pushClip(ContentGeometry);
308 canvas->setOrigin(oldOrigin + ContentGeometry.topLeft());
309 OnPaint(canvas);
310 for (Widget* w = FirstChild(); w != nullptr; w = w->NextSibling())
311 {
312 if (w->Type == WidgetType::Child && !w->HiddenFlag)
313 w->Paint(canvas);
314 }
315 canvas->setOrigin(oldOrigin);
316 canvas->popClip();
317}
318
319bool Widget::GetKeyState(EInputKey key)
320{

Callers 1

RepaintMethod · 0.80

Calls 6

getOriginMethod · 0.80
pushClipMethod · 0.80
setOriginMethod · 0.80
topLeftMethod · 0.80
popClipMethod · 0.80
NextSiblingMethod · 0.80

Tested by

no test coverage detected