| 217 | template <typename TBase> |
| 218 | struct RectangleLight : TBase { |
| 219 | void drawBackground(const widget::Widget::DrawArgs& args) override { |
| 220 | // Derived from LightWidget::drawBackground() |
| 221 | |
| 222 | nvgBeginPath(args.vg); |
| 223 | nvgRect(args.vg, 0, 0, this->box.size.x, this->box.size.y); |
| 224 | |
| 225 | // Background |
| 226 | if (this->bgColor.a > 0.0) { |
| 227 | nvgFillColor(args.vg, this->bgColor); |
| 228 | nvgFill(args.vg); |
| 229 | } |
| 230 | |
| 231 | // Border |
| 232 | if (this->borderColor.a > 0.0) { |
| 233 | nvgStrokeWidth(args.vg, 0.5); |
| 234 | nvgStrokeColor(args.vg, this->borderColor); |
| 235 | nvgStroke(args.vg); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | void drawLight(const widget::Widget::DrawArgs& args) override { |
| 240 | // Derived from LightWidget::drawLight() |
nothing calls this directly
no outgoing calls
no test coverage detected