Browse Source

Re-fix LightWidget drawing

tags/v0.6.0
Andrew Belt 7 years ago
parent
commit
077c179a1e
1 changed files with 7 additions and 10 deletions
  1. +7
    -10
      src/app/LightWidget.cpp

+ 7
- 10
src/app/LightWidget.cpp View File

@@ -14,7 +14,6 @@ void LightWidget::draw(NVGcontext *vg) {
drawHalo(vg);
}


void LightWidget::drawLight(NVGcontext *vg) {
float radius = box.size.x / 2.0;

@@ -25,19 +24,19 @@ void LightWidget::drawLight(NVGcontext *vg) {
nvgFillColor(vg, bgColor);
nvgFill(vg);

// // Border
// nvgStrokeWidth(vg, 1.0);
// NVGcolor borderColor = bgColor;
// borderColor.a *= 0.5;
// nvgStrokeColor(vg, borderColor);
// nvgStroke(vg);
// Border
nvgStrokeWidth(vg, 1.0);
NVGcolor borderColor = bgColor;
borderColor.a *= 0.5;
nvgStrokeColor(vg, borderColor);
nvgStroke(vg);

// Inner glow
nvgFillColor(vg, color);
nvgGlobalCompositeOperation(vg, NVG_LIGHTER);
nvgFill(vg);
}


void LightWidget::drawHalo(NVGcontext *vg) {
float radius = box.size.x / 2.0;
float oradius = radius + 15.0;
@@ -57,6 +56,4 @@ void LightWidget::drawHalo(NVGcontext *vg) {
}




} // namespace rack

Loading…
Cancel
Save