From dceeab793a3d48e340554d26421d1dbff7e713e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 1 May 2020 17:31:36 +0200 Subject: Reintroduce rounding for the filled circles in the powerwidget. --- plugingui/powerwidget.cc | 12 ++++++------ 1 file 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); -- cgit v1.2.3