From d904450096834953eb5fda9646a95eca439feb41 Mon Sep 17 00:00:00 2001 From: Hapaxia Date: Mon, 12 Feb 2024 22:56:30 +0000 Subject: [PATCH] Spline - update to v1.7.1 (patch) patch update to fix non-thick splines not taking into account individual vertex colours. --- src/SelbaWard/Spline.cpp | 3 +++ src/SelbaWard/Spline.hpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SelbaWard/Spline.cpp b/src/SelbaWard/Spline.cpp index 29354a0..13c5a2e 100644 --- a/src/SelbaWard/Spline.cpp +++ b/src/SelbaWard/Spline.cpp @@ -1015,6 +1015,9 @@ void Spline::priv_updateOutputVertices() else if (m_isClosed) nextVertex = m_vertices.begin(); + const sf::Color color{ m_color * linearInterpolation(currentVertex->color, nextVertex->color, vertexRatio) }; + m_outputVertices[outputIndex].color = color; + sf::Vector2f tangentUnit{ *(m_interpolatedVerticesUnitTangents.begin() + (it - begin)) }; if (m_isClosed || it != last) { diff --git a/src/SelbaWard/Spline.hpp b/src/SelbaWard/Spline.hpp index 97cfe13..add7fd3 100644 --- a/src/SelbaWard/Spline.hpp +++ b/src/SelbaWard/Spline.hpp @@ -38,7 +38,7 @@ namespace selbaward { -// SW Spline v1.7.0 +// SW Spline v1.7.1 class Spline : public sf::Drawable { public: