mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
The rectangle argument in sfTexture_Load... functions is no longer ignored
This commit is contained in:
1 parent
a5d6bdb4f9
commit
17e5d60619
1 file changed
+3
-3
@@ -58,7 +58,7 @@ sfTexture* sfTexture_CreateFromFile(const char* filename, const sfIntRect* area)
|
|||||||
if (area)
|
if (area)
|
||||||
rect = sf::IntRect(area->Left, area->Top, area->Width, area->Height);
|
rect = sf::IntRect(area->Left, area->Top, area->Width, area->Height);
|
||||||
|
|
||||||
if (!texture->This->LoadFromFile(filename))
|
if (!texture->This->LoadFromFile(filename, rect))
|
||||||
{
|
{
|
||||||
delete texture;
|
delete texture;
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
@@ -77,7 +77,7 @@ sfTexture* sfTexture_CreateFromMemory(const void* data, size_t sizeInBytes, cons
|
|||||||
if (area)
|
if (area)
|
||||||
rect = sf::IntRect(area->Left, area->Top, area->Width, area->Height);
|
rect = sf::IntRect(area->Left, area->Top, area->Width, area->Height);
|
||||||
|
|
||||||
if (!texture->This->LoadFromMemory(data, sizeInBytes))
|
if (!texture->This->LoadFromMemory(data, sizeInBytes, rect))
|
||||||
{
|
{
|
||||||
delete texture;
|
delete texture;
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
@@ -99,7 +99,7 @@ sfTexture* sfTexture_CreateFromStream(sfInputStream* stream, const sfIntRect* ar
|
|||||||
rect = sf::IntRect(area->Left, area->Top, area->Width, area->Height);
|
rect = sf::IntRect(area->Left, area->Top, area->Width, area->Height);
|
||||||
|
|
||||||
CallbackStream sfmlStream(stream);
|
CallbackStream sfmlStream(stream);
|
||||||
if (!texture->This->LoadFromStream(sfmlStream))
|
if (!texture->This->LoadFromStream(sfmlStream, rect))
|
||||||
{
|
{
|
||||||
delete texture;
|
delete texture;
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
|
|||||||
Reference in new issue
Block a user