Added the missing adjustToNewSize parameter of Sprite::SetImage in CSFML
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1346 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
273cba055c
commit
6c44a1d33a
6 changed files with 8 additions and 7 deletions
|
@ -303,11 +303,12 @@ CSFML_API void sfSprite_TransformToGlobal(const sfSprite* sprite, float pointX,
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Change the image of a sprite
|
||||
///
|
||||
/// \param Sprite : Sprite to modify
|
||||
/// \param image : New image
|
||||
/// \param sprite : Sprite to modify
|
||||
/// \param image : New image
|
||||
/// \param adjustToNewSize : If true, the SubRect of the sprite will be adjusted to the size of the new image
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSprite_SetImage(sfSprite* sprite, const sfImage* image);
|
||||
CSFML_API void sfSprite_SetImage(sfSprite* sprite, const sfImage* image, sfBool adjustToNewSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the sub-rectangle of a sprite inside the source image
|
||||
|
|
|
@ -304,11 +304,11 @@ void sfSprite_TransformToGlobal(const sfSprite* sprite, float pointX, float poin
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Change the image of a sprite
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSprite_SetImage(sfSprite* sprite, const sfImage* image)
|
||||
void sfSprite_SetImage(sfSprite* sprite, const sfImage* image, sfBool adjustToNewSize)
|
||||
{
|
||||
if (image)
|
||||
{
|
||||
CSFML_CALL(sprite, SetImage(*image->This))
|
||||
CSFML_CALL(sprite, SetImage(*image->This, adjustToNewSize == sfTrue))
|
||||
sprite->Image = image;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue