Shape::setOutlineThickness now allows negative values

This commit is contained in:
Laurent Gomila 2012-07-15 13:47:14 +02:00
parent e3261f0430
commit 26d5620817
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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);