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

@@ -49,6 +49,7 @@ enum wxCompositionMode
// classic Porter-Duff compositions
// http://keithp.com/~keithp/porterduff/p253-porter.pdf
wxCOMPOSITION_INVALID = -1, /* indicates invalid/unsupported mode */
wxCOMPOSITION_CLEAR, /* R = 0 */
wxCOMPOSITION_SOURCE, /* R = S */
wxCOMPOSITION_OVER, /* R = S + D*(1 - Sa) */