diff options
author | Armin Le Grand <alg@apache.org> | 2013-06-05 14:51:49 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-06-05 14:51:49 +0000 |
commit | 136976efb17b8617a83c7f26601cd04031b51e7f (patch) | |
tree | bf03f9cb3add49720107f352170cb7a5b07ac7cf /svtools | |
parent | 79824393b320ecb277763a1fd7c2b9b770a83534 (diff) |
i122418 Added workaround to not use GetBitmap on windows
Notes
Notes:
merged as: c96802f0e2e553bfbb3bd036df95ea34d2f5741a
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 14 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 14 |
2 files changed, 12 insertions, 16 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 6e17dc13f161..537e4e6c9d80 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -232,16 +232,14 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt ) if(nEdgeBlendingPercent) { - Bitmap aBitmap(rUDEvt.GetDevice()->GetBitmap(aRect.TopLeft(), aRect.GetSize())); + const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); + const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); + const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); + const BitmapEx aBlendFrame(createBlendFrame(aRect.GetSize(), nAlpha, rTopLeft, rBottomRight)); - if(!aBitmap.IsEmpty()) + if(!aBlendFrame.IsEmpty()) { - const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); - const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); - const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); - - aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight); - rUDEvt.GetDevice()->DrawBitmap(aRect.TopLeft(), aBitmap); + rUDEvt.GetDevice()->DrawBitmapEx(aRect.TopLeft(), aBlendFrame); } } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index eb0d2d160be7..819bcb5346e2 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -330,16 +330,14 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem ) if(nEdgeBlendingPercent) { - Bitmap aBitmap(maVirDev.GetBitmap(aRect.TopLeft(), aRect.GetSize())); + const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); + const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); + const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); + const BitmapEx aBlendFrame(createBlendFrame(aRect.GetSize(), nAlpha, rTopLeft, rBottomRight)); - if(!aBitmap.IsEmpty()) + if(!aBlendFrame.IsEmpty()) { - const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); - const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); - const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); - - aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight); - maVirDev.DrawBitmap(aRect.TopLeft(), aBitmap); + maVirDev.DrawBitmapEx(aRect.TopLeft(), aBlendFrame); } } } |