mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 19:05:59 -04:00
Added Color support for Surface
This commit is contained in:
parent
f9fa7a9d03
commit
ae24c0dd76
@ -147,8 +147,8 @@ SDL_BlendMode Surface::GetBlendMode() const {
|
||||
|
||||
Color Surface::GetColorAndAlphaMod() const {
|
||||
Color color;
|
||||
GetColorMod(color.r, color.g, color.b);
|
||||
color.a = GetAlphaMod();
|
||||
GetColorMod(color.r, color.g, color.b);
|
||||
color.SetAlpha(GetAlphaMod());
|
||||
return color;
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ Surface& Surface::SetColorMod(Uint8 r, Uint8 g, Uint8 b) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
Surface& Surface::SetColorAndAlphaMod(const Color& color) {
|
||||
Surface& Surface::SetColorAndAlphaMod(const Color color) {
|
||||
return SetColorMod(color.r, color.g, color.b).SetAlphaMod(color.a);
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,6 @@ public:
|
||||
///
|
||||
/// \throws SDL2pp::Exception
|
||||
///
|
||||
/// \see http://wiki.libsdl.org/SDL_GetSurfaceAlphaMod
|
||||
/// \see http://wiki.libsdl.org/SDL_GetSurfaceColorMod
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
@ -500,11 +499,10 @@ public:
|
||||
///
|
||||
/// \throws SDL2pp::Exception
|
||||
///
|
||||
/// \see http://wiki.libsdl.org/SDL_SetSurfaceAlphaMod
|
||||
/// \see http://wiki.libsdl.org/SDL_SetSurfaceColorMod
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
Surface& SetColorAndAlphaMod(const Color& color);
|
||||
Surface& SetColorAndAlphaMod(const Color color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the RLE acceleration hint for a surface
|
||||
|
Loading…
x
Reference in New Issue
Block a user