MCPcopy Create free account
hub / github.com/DISTRHO/DPF / onDisplay

Function onDisplay

tests/widgets/ExampleColorWidget.hpp:108–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 void onDisplay() override
109 {
110 const GraphicsContext& context(BaseWidget::getGraphicsContext());
111
112 // paint bg color (in full size)
113 Color(r, g, b).setFor(context);
114 bgFull.draw(context);
115
116 // paint inverted color (in 2/3 size)
117 Color(100-r, 100-g, 100-b).setFor(context);
118 bgSmall.draw(context);
119 }
120
121 void onResize(const Widget::ResizeEvent& ev) override
122 {

Callers 1

Calls 2

setForMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected