Add wxCOMPOSITION_INVALID mode and use it to simplify the code.

Having an invalid element in wxCompositionMode enum allows to directly return
it from TranslateRasterOp() function instead of needing a separate bool
parameter to indicate that a ROP couldn't be translated.

This also incidentally fixes warnings about possibly uninitialized variables
in optimized g++ builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-02 10:29:11 +00:00
parent 749f13d4a2
commit fec4e45897
3 changed files with 26 additions and 18 deletions

View File

@@ -241,6 +241,14 @@ enum wxInterpolationQuality
*/
enum wxCompositionMode
{
/**
Indicates invalid or unsupported composition mode.
This value can't be passed to wxGraphicsContext::SetCompositionMode().
@since 2.9.2
*/
wxCOMPOSITION_INVALID = -1,
wxCOMPOSITION_CLEAR, /**< @e R = 0 */
wxCOMPOSITION_SOURCE, /**< @e R = S */
wxCOMPOSITION_OVER, /**< @e R = @e S + @e D*(1 - @e Sa) */