diff options
Diffstat (limited to 'canvas/source/directx/dx_vcltools.cxx')
-rw-r--r-- | canvas/source/directx/dx_vcltools.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx index d29043070ef3..5ed07159aba8 100644 --- a/canvas/source/directx/dx_vcltools.cxx +++ b/canvas/source/directx/dx_vcltools.cxx @@ -214,7 +214,11 @@ namespace dxcanvas::tools *pCurrOutput++ = aCol.GetBlue(); *pCurrOutput++ = aCol.GetGreen(); *pCurrOutput++ = aCol.GetRed(); - *pCurrOutput++ = static_cast<BYTE>(*pAScan++); + + // our notion of alpha is + // different from the rest + // of the world's + *pCurrOutput++ = 255 - static_cast<BYTE>(*pAScan++); } } break; @@ -230,7 +234,11 @@ namespace dxcanvas::tools *pCurrOutput++ = *pScan++; *pCurrOutput++ = *pScan++; *pCurrOutput++ = *pScan++; - *pCurrOutput++ = static_cast<BYTE>(*pAScan++); + + // our notion of alpha is + // different from the rest + // of the world's + *pCurrOutput++ = 255 - static_cast<BYTE>(*pAScan++); } } break; @@ -253,7 +261,11 @@ namespace dxcanvas::tools *pCurrOutput++ = aCol.GetBlue(); *pCurrOutput++ = aCol.GetGreen(); *pCurrOutput++ = aCol.GetRed(); - *pCurrOutput++ = static_cast<BYTE>(*pAScan++); + + // our notion of alpha is + // different from the rest + // of the world's + *pCurrOutput++ = 255 - static_cast<BYTE>(*pAScan++); } } break; |