summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-06-05 14:51:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-19 12:17:19 +0100
commitc96802f0e2e553bfbb3bd036df95ea34d2f5741a (patch)
treeb1d2319012880a417b84d705919f53e8ebef59b9 /svtools
parentfa2363344cbf85af17a80c4757b226ab43391af6 (diff)
Resolves: #i122418# Added workaround to not use GetBitmap on windows
(cherry picked from commit 136976efb17b8617a83c7f26601cd04031b51e7f) Conflicts: vcl/inc/vcl/bitmap.hxx vcl/inc/vcl/bitmapex.hxx vcl/source/gdi/bitmap4.cxx vcl/source/gdi/bitmapex.cxx Change-Id: I9c3aeae76c155c9050404f67adeb91106502c3f1
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx14
-rw-r--r--svtools/source/control/valueset.cxx14
2 files changed, 12 insertions, 16 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index dce1f9a73a45..e5bab367ccce 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -307,16 +307,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 9623b29f4d50..75a8d5374c54 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -341,16 +341,14 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem, Rectangle aRect )
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);
}
}
}