From 3096fb90c2a07e43cf49a86c6245aabd3761ef90 Mon Sep 17 00:00:00 2001 From: Zachary Kemp <9057532+zac-k@users.noreply.github.com> Date: Thu, 9 Jul 2020 18:25:26 +1000 Subject: [PATCH] Update myLookAndFeel.cpp Works for non-zero skew factor. --- Source/myLookAndFeel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/myLookAndFeel.cpp b/Source/myLookAndFeel.cpp index e378bb4..7a4fcd9 100644 --- a/Source/myLookAndFeel.cpp +++ b/Source/myLookAndFeel.cpp @@ -25,10 +25,10 @@ void myLookAndFeelV1::drawRotarySlider(Graphics& g, if (img1.isValid()) { - const double rotation = (slider.getValue() + const double rotation = std::pow((slider.getValue() - slider.getMinimum()) / (slider.getMaximum() - - slider.getMinimum()); + - slider.getMinimum()), slider.getSkewFactor()); const int frames = img1.getHeight() / img1.getWidth(); const int frameId = (int)ceil(rotation * ((double)frames - 1.0));