summaryrefslogtreecommitdiffhomepage
path: root/spline-widget/spline-widget.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-10-29 23:12:33 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-10-29 23:21:37 +0200
commitf7e622e4f1fea8a49fc1555d446cc76f78d5592c (patch)
treeff24de10d4032bfaf1398a15c465188fed16a8b7 /spline-widget/spline-widget.hpp
parentcea0ec20e60e31b998c08cbae96c4601758f101f (diff)
spline-widget: remove aliasing artifacts
We're using QPainterPath and its bezier curves. However, we supply it a plethora of intermediate values to mitigate different results in interpolation.
Diffstat (limited to 'spline-widget/spline-widget.hpp')
-rw-r--r--spline-widget/spline-widget.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/spline-widget/spline-widget.hpp b/spline-widget/spline-widget.hpp
index 8886016c..d52e249c 100644
--- a/spline-widget/spline-widget.hpp
+++ b/spline-widget/spline-widget.hpp
@@ -72,7 +72,9 @@ private:
bool is_on_pt(const QPoint& pos, int* pt = nullptr);
void update_range();
QPointF pixel_coord_to_point(const QPoint& point);
- QPointF point_to_pixel(const QPointF& point);
+
+ QPointF point_to_pixel_(const QPointF& point);
+ QPoint point_to_pixel(const QPointF& point);
QPointF c;
spline* _config;
@@ -90,6 +92,5 @@ private:
int moving_control_point_idx;
bool _draw_function, _preview_only;
- static constexpr int line_length_pixels = 3;
static constexpr int point_size = 4;
};