From b2ce4c9758b717be4f416507fb31d88855406171 Mon Sep 17 00:00:00 2001 From: Vasile Vilvoiu Date: Fri, 16 Jul 2021 23:21:19 +0300 Subject: Adaptive tick spacing, based on tick label width. Fixes #18. --- src/renderer.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/renderer.hpp') diff --git a/src/renderer.hpp b/src/renderer.hpp index 01ce397..f67596a 100644 --- a/src/renderer.hpp +++ b/src/renderer.hpp @@ -50,8 +50,8 @@ private: [[maybe_unused]] /* need for this method disappeared when fixing #9, might be useful in the future */ static std::list GetLinearTicks(double v_min, double v_max, const std::string& v_unit, unsigned int num_ticks); - static std::list GetNiceTicks(double v_min, double v_max, const std::string& v_unit, - unsigned int length_px, unsigned int est_tick_length_px); + std::list GetNiceTicks(double v_min, double v_max, const std::string& v_unit, + unsigned int length_px, unsigned int min_tick_length_px, bool rotated); void RenderAxis(sf::RenderTexture& texture, const sf::Transform& t, bool lhs, Orientation orientation, double length, -- cgit v1.2.3