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