mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Added SetSmooth / IsSmooth to sf::RenderImage
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1299 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
10296333be
commit
4418469d97
@ -72,6 +72,23 @@ public :
|
||||
////////////////////////////////////////////////////////////
|
||||
bool Create(unsigned int width, unsigned int height, bool depthBuffer = false);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Enable or disable image smooth filter.
|
||||
/// This parameter is enabled by default
|
||||
///
|
||||
/// \param smooth : True to enable smoothing filter, false to disable it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void SetSmooth(bool smooth);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tells whether the smooth filtering is enabled or not
|
||||
///
|
||||
/// \return True if image smoothing is enabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
bool IsSmooth() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate of deactivate the render-image as the current target
|
||||
/// for rendering
|
||||
|
@ -72,8 +72,8 @@ bool RenderImage::Create(unsigned int width, unsigned int height, bool depthBuff
|
||||
return false;
|
||||
}
|
||||
|
||||
// Disable smoothing -- we don't want to alter the original rendering
|
||||
myImage.SetSmooth(false);
|
||||
// We disable smoothing by default for render images
|
||||
SetSmooth(false);
|
||||
|
||||
// Create the implementation
|
||||
delete myRenderImage;
|
||||
@ -99,6 +99,24 @@ bool RenderImage::Create(unsigned int width, unsigned int height, bool depthBuff
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Enable or disable image smoothing filter
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderImage::SetSmooth(bool smooth)
|
||||
{
|
||||
myImage.SetSmooth(smooth);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tells whether the smooth filtering is enabled or not
|
||||
////////////////////////////////////////////////////////////
|
||||
bool RenderImage::IsSmooth() const
|
||||
{
|
||||
return myImage.IsSmooth();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate of deactivate the render-image as the current target
|
||||
/// for rendering
|
||||
|
Loading…
Reference in New Issue
Block a user