summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2020-05-01 17:31:36 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2020-05-01 17:31:36 +0200
commitdceeab793a3d48e340554d26421d1dbff7e713e0 (patch)
tree969ac62aa3efd171ae37890f4a5d3048efe89174 /plugingui
parentd9b10f103ab2d86072ee1dd66bcb79ae140576f0 (diff)
Reintroduce rounding for the filled circles in the powerwidget.
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/powerwidget.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc
index e618d16..3ea787c 100644
--- a/plugingui/powerwidget.cc
+++ b/plugingui/powerwidget.cc
@@ -187,20 +187,20 @@ void PowerWidget::Canvas::repaintEvent(GUI::RepaintEvent *repaintEvent)
// draw the fixed nodes of the spline
float rad = radius * width();
p.setColour(GUI::Colour{0.0f, 1.0f, 0.0f, 0.7f});
- p.drawFilledCircle(x0 + settings.powermap_fixed0_x.load() * width0,
- y0 + height0 - settings.powermap_fixed0_y.load() * height0, rad);
+ p.drawFilledCircle(x0 + std::round(settings.powermap_fixed0_x.load() * width0),
+ y0 + height0 - std::round(settings.powermap_fixed0_y.load() * height0), rad);
p.drawCircle(x0 + std::round(power_map.getFixed0().in * width0),
y0 + height0 - std::round(power_map.getFixed0().out * height0), rad + 1);
p.setColour(GUI::Colour{1.0f, 1.0f, 0.0f, 0.7f});
- p.drawFilledCircle(x0 + settings.powermap_fixed1_x.load() * width0,
- y0 + height0 - settings.powermap_fixed1_y.load() * height0, rad);
+ p.drawFilledCircle(x0 + std::round(settings.powermap_fixed1_x.load() * width0),
+ y0 + height0 - std::round(settings.powermap_fixed1_y.load() * height0), rad);
p.drawCircle(x0 + std::round(power_map.getFixed1().in * width0),
y0 + height0 - std::round(power_map.getFixed1().out * height0), rad + 1);
p.setColour(GUI::Colour{1.0f, 0.0f, 0.0f, 0.7f});
- p.drawFilledCircle(x0 + settings.powermap_fixed2_x.load() * width0,
- y0 + height0 - settings.powermap_fixed2_y.load() * height0, rad);
+ p.drawFilledCircle(x0 + std::round(settings.powermap_fixed2_x.load() * width0),
+ y0 + height0 - std::round(settings.powermap_fixed2_y.load() * height0), rad);
p.drawCircle(x0 + std::round(power_map.getFixed2().in * width0),
y0 + height0 - std::round(power_map.getFixed2().out * height0), rad + 1);