summaryrefslogtreecommitdiff
path: root/src/SFML/Graphics/Image.cpp
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@gmx.de>2010-04-07 22:00:13 +0200
committerChristoph Egger <Christoph.Egger@gmx.de>2010-04-07 22:00:13 +0200
commit46bf1cf82d855660c212ee3421dff3050ec8ffea (patch)
treef0fadfc004a86242ad096dee015ed7c20cc7f554 /src/SFML/Graphics/Image.cpp
parent25177f23f35afa0e6ebdd63d581003c298d3a7df (diff)
Imported Upstream version 1.6+repack1
Diffstat (limited to 'src/SFML/Graphics/Image.cpp')
-rwxr-xr-xsrc/SFML/Graphics/Image.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/SFML/Graphics/Image.cpp b/src/SFML/Graphics/Image.cpp
index f90673c..14346fb 100755
--- a/src/SFML/Graphics/Image.cpp
+++ b/src/SFML/Graphics/Image.cpp
@@ -542,25 +542,15 @@ bool Image::IsSmooth() const
/// Convert a subrect expressed in pixels, into float
/// texture coordinates
////////////////////////////////////////////////////////////
-FloatRect Image::GetTexCoords(const IntRect& Rect, bool Adjust) const
+FloatRect Image::GetTexCoords(const IntRect& Rect) const
{
float Width = static_cast<float>(myTextureWidth);
float Height = static_cast<float>(myTextureHeight);
- if (Adjust && myIsSmooth)
- {
- return FloatRect((Rect.Left + 0.5f) / Width,
- (Rect.Top + 0.5f) / Height,
- (Rect.Right - 0.5f) / Width,
- (Rect.Bottom - 0.5f) / Height);
- }
- else
- {
- return FloatRect(Rect.Left / Width,
- Rect.Top / Height,
- Rect.Right / Width,
- Rect.Bottom / Height);
- }
+ return FloatRect(Rect.Left / Width,
+ Rect.Top / Height,
+ Rect.Right / Width,
+ Rect.Bottom / Height);
}