From 26d562081787a0b1ed48a4c484d9656336d56739 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Sun, 15 Jul 2012 13:47:14 +0200 Subject: [PATCH] Shape::setOutlineThickness now allows negative values --- include/SFML/Graphics/Shape.hpp | 5 +++-- src/SFML/Graphics/Shape.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index a481b85ff..fad8b8b79 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -120,8 +120,9 @@ public : //////////////////////////////////////////////////////////// /// \brief Set the thickness of the shape's outline /// - /// This number cannot be negative. Using zero disables - /// the outline. + /// Note that negative values are allowed (so that the outline + /// expands towards the center of the shape), and using zero + /// disables the outline. /// By default, the outline thickness is 0. /// /// \param thickness New outline thickness diff --git a/src/SFML/Graphics/Shape.cpp b/src/SFML/Graphics/Shape.cpp index 39152ab8a..cf18ebb99 100644 --- a/src/SFML/Graphics/Shape.cpp +++ b/src/SFML/Graphics/Shape.cpp @@ -213,7 +213,7 @@ void Shape::draw(RenderTarget& target, RenderStates states) const } // Render the outline - if ((m_outlineColor.a > 0) && (m_outlineThickness > 0)) + if ((m_outlineColor.a > 0) && (m_outlineThickness != 0)) { states.texture = NULL; target.draw(m_outlineVertices, states);