mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Replaced getWidth/getHeight with getSize in sfImage and sfTexture
This commit is contained in:
1 parent
228a06ba64
commit
ad8a1aade0
4 files changed
+24
-40
No files matched your search
@@ -174,16 +174,17 @@ const sfUint8* sfImage_getPixelsPtr(const sfImage* image)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfImage_getWidth(const sfImage* image)
|
||||
sfVector2u sfImage_getSize(const sfImage* image)
|
||||
{
|
||||
CSFML_CALL_RETURN(image, getWidth(), 0);
|
||||
}
|
||||
sfVector2u size = {0, 0};
|
||||
CSFML_CHECK_RETURN(image, size);
|
||||
|
||||
sf::Vector2u sfmlSize = image->This.getSize();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfImage_getHeight(const sfImage* image)
|
||||
{
|
||||
CSFML_CALL_RETURN(image, getHeight(), 0);
|
||||
size.x = sfmlSize.x;
|
||||
size.y = sfmlSize.y;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -147,16 +147,17 @@ void sfTexture_destroy(sfTexture* texture)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfTexture_getWidth(const sfTexture* texture)
|
||||
sfVector2u sfTexture_getSize(const sfTexture* texture)
|
||||
{
|
||||
CSFML_CALL_PTR_RETURN(texture, getWidth(), 0);
|
||||
}
|
||||
sfVector2u size = {0, 0};
|
||||
CSFML_CHECK_RETURN(texture, size);
|
||||
|
||||
sf::Vector2u sfmlSize = texture->This->getSize();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfTexture_getHeight(const sfTexture* texture)
|
||||
{
|
||||
CSFML_CALL_PTR_RETURN(texture, getHeight(), 0);
|
||||
size.x = sfmlSize.x;
|
||||
size.y = sfmlSize.y;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user