From deffe8cc304de95204fa9192e8d1a12f4a1d26e1 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 25 Apr 2020 16:31:39 +0200 Subject: WIP: Make 1 pixel steps in line segments. --- plugingui/powerwidget.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc index c05e0eb..60c056d 100644 --- a/plugingui/powerwidget.cc +++ b/plugingui/powerwidget.cc @@ -210,9 +210,9 @@ void PowerWidget::Canvas::repaintEvent(GUI::RepaintEvent *repaintEvent) p.setColour(GUI::Colour(0.5f, 0.5f, 0.5f, 1.0f)); } - // draw 64 line segments across the region + // Draw very short line segments across the region std::pair old{}; - for(std::size_t x = 0; x < width(); x += width() / 64) + for(std::size_t x = 0; x < width(); ++x) { int y = power_map.map((float)x / width()) * height(); if(x > 0) -- cgit v1.2.3