Merge pull request #363 from Foaly/repeatedRenderTexture

Added repeating to sf::RenderTexture
This commit is contained in:
Laurent Gomila 2013-03-06 13:54:56 -08:00
commit f5b9c7e216
2 changed files with 37 additions and 0 deletions

View File

@ -108,6 +108,29 @@ public :
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool isSmooth() const; bool isSmooth() const;
////////////////////////////////////////////////////////////
/// \brief Enable or disable texture repeating
///
/// This function is similar to Texture::setRepeated.
/// This parameter is disabled by default.
///
/// \param repeated True to enable repeating, false to disable it
///
/// \see isRepeated
///
////////////////////////////////////////////////////////////
void setRepeated(bool repeated);
////////////////////////////////////////////////////////////
/// \brief Tell whether the texture is repeated or not
///
/// \return True if texture is repeated
///
/// \see setRepeated
///
////////////////////////////////////////////////////////////
bool isRepeated() const;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Activate of deactivate the render-texture for rendering /// \brief Activate of deactivate the render-texture for rendering
/// ///

View File

@ -99,6 +99,20 @@ bool RenderTexture::isSmooth() const
} }
////////////////////////////////////////////////////////////
void RenderTexture::setRepeated(bool repeated)
{
m_texture.setRepeated(repeated);
}
////////////////////////////////////////////////////////////
bool RenderTexture::isRepeated() const
{
return m_texture.isRepeated();
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool RenderTexture::setActive(bool active) bool RenderTexture::setActive(bool active)
{ {