Skip to content

Commit

Permalink
Spline - update to v1.7.1 (patch)
Browse files Browse the repository at this point in the history
patch update to fix non-thick splines not taking into account individual vertex colours.
  • Loading branch information
Hapaxia committed Feb 12, 2024
1 parent a688724 commit d904450
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/SelbaWard/Spline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SelbaWard/Spline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
namespace selbaward
{

// SW Spline v1.7.0
// SW Spline v1.7.1
class Spline : public sf::Drawable
{
public:
Expand Down

0 comments on commit d904450

Please sign in to comment.