MCPcopy Create free account
hub / github.com/VCVRack/Rack / drawLight

Method drawLight

include/componentlibrary.hpp:239–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237 }
238
239 void drawLight(const widget::Widget::DrawArgs& args) override {
240 // Derived from LightWidget::drawLight()
241
242 // Foreground
243 if (this->color.a > 0.0) {
244 nvgBeginPath(args.vg);
245 nvgRect(args.vg, 0, 0, this->box.size.x, this->box.size.y);
246
247 nvgFillColor(args.vg, this->color);
248 nvgFill(args.vg);
249 }
250 }
251};
252
253/** A light for displaying on top of VCVBezel. Must add a color by subclassing or templating. */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected