Replaced getWidth/getHeight with getSize in sfImage and sfTexture

This commit is contained in:
Laurent Gomila committed 2012-03-31 22:45:37 +02:00
1 parent 228a06ba64
commit ad8a1aade0
4 files changed
+24 -40

No files matched your search

+8 -7
View File
@@ -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;
}
+8 -7
View File
@@ -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;
}