mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-28 13:46:13 +01:00
Added the applyAlpha argument of sfImage_CopyImage
This commit is contained in:
1 parent
d734c9df5c
commit
f278ba2432
2 files changed
+4
-3
No files matched your search
@@ -140,9 +140,10 @@ CSFML_API void sfImage_CreateMaskFromColor(sfImage* image, sfColor colorKey, sfU
|
|||||||
/// \param destX : X coordinate of the destination position
|
/// \param destX : X coordinate of the destination position
|
||||||
/// \param destY : Y coordinate of the destination position
|
/// \param destY : Y coordinate of the destination position
|
||||||
/// \param sourceRect : Sub-rectangle of the source image to copy
|
/// \param sourceRect : Sub-rectangle of the source image to copy
|
||||||
|
/// \param applyAlpha : Should the copy take in account the source transparency?
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_API void sfImage_CopyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect);
|
CSFML_API void sfImage_CopyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// Change the color of a pixel of an image
|
/// Change the color of a pixel of an image
|
||||||
|
|||||||
@@ -153,11 +153,11 @@ void sfImage_CreateMaskFromColor(sfImage* image, sfColor colorKey, sfUint8 alpha
|
|||||||
/// This function does a slow pixel copy and should only
|
/// This function does a slow pixel copy and should only
|
||||||
/// be used at initialization time
|
/// be used at initialization time
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void sfImage_CopyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect)
|
void sfImage_CopyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha)
|
||||||
{
|
{
|
||||||
CSFML_CHECK(source);
|
CSFML_CHECK(source);
|
||||||
sf::IntRect SFMLRect(sourceRect.Left, sourceRect.Top, sourceRect.Width, sourceRect.Height);
|
sf::IntRect SFMLRect(sourceRect.Left, sourceRect.Top, sourceRect.Width, sourceRect.Height);
|
||||||
CSFML_CALL(image, Copy(source->This, destX, destY, SFMLRect));
|
CSFML_CALL(image, Copy(source->This, destX, destY, SFMLRect, applyAlpha == sfTrue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user