Added the applyAlpha argument of sfImage_CopyImage

This commit is contained in:
Laurent Gomila committed 2011-09-02 22:15:53 +02:00
1 parent d734c9df5c
commit f278ba2432
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -140,9 +140,10 @@ CSFML_API void sfImage_CreateMaskFromColor(sfImage* image, sfColor colorKey, sfU
/// \param destX : X coordinate of the destination position
/// \param destY : Y coordinate of the destination position
/// \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
+2 -2
View File
@@ -153,11 +153,11 @@ void sfImage_CreateMaskFromColor(sfImage* image, sfColor colorKey, sfUint8 alpha
/// This function does a slow pixel copy and should only
/// 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);
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));
}