mirror of
https://github.com/SFML/SFML.git
synced 2025-01-31 21:55:13 +08:00
Fixed wrong texture coordinates when displaying a part of a render-image with a sprite
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1529 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
c87c0d7d25
commit
028c4d5a96
@ -523,7 +523,7 @@ FloatRect Image::GetTexCoords(const IntRect& rect) const
|
|||||||
if (myPixelsFlipped)
|
if (myPixelsFlipped)
|
||||||
{
|
{
|
||||||
return FloatRect( rect.Left / width,
|
return FloatRect( rect.Left / width,
|
||||||
(rect.Top + rect.Height) / height,
|
(myWidth - rect.Top) / height,
|
||||||
rect.Width / width,
|
rect.Width / width,
|
||||||
-rect.Height / height);
|
-rect.Height / height);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user