summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Curtis <keithcu@gmail.com>2014-01-02 16:36:51 +0100
committerJan Holesovsky <kendy@collabora.com>2014-01-02 16:43:39 +0100
commitab56275f4622ade0286a580a5945600567c6b415 (patch)
tree762ce7deb139debbf9c779b5225f7ee38fc9e194
parent096ea63090b137ac52cb75bf4b53dcef31962d44 (diff)
hidpi: Really use BMP_SCALE_FAST when scaling the images.
It is not a problem of performance, but of the look - the images get too blurry in the case of icons; and the blurry look is worse than than the artifacts of the fast scaling. Revert "hidpi: Use the default scaling algorithm." This reverts commit e07097cce36f1220f5574a80dc22eeabb3005261. Change-Id: I8af2827758e02ec3c8b7dade1559c45bd9f0ef35
-rw-r--r--cui/source/tabpages/align.cxx2
-rw-r--r--cui/source/tabpages/border.cxx4
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx2
-rw-r--r--svx/source/stbctrls/modctrl.cxx2
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
-rw-r--r--svx/source/stbctrls/selctrl.cxx2
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx2
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx2
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx2
10 files changed, 12 insertions, 12 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 2418ff5a0c0d..5ba830af9521 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -329,7 +329,7 @@ void AlignmentTabPage::InitVsRefEgde()
{
OUString rImageName = aImageList.GetImageName(i);
BitmapEx b = aImageList.GetImage(rImageName).GetBitmapEx();
- b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
aImageList.ReplaceImage(rImageName, Image(b));
}
}
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 31bb80260c4b..0073a9ea59cd 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -134,7 +134,7 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs
{
OUString rImageName = aBorderImgLst.GetImageName(i);
BitmapEx b = aBorderImgLst.GetImage(rImageName).GetBitmapEx();
- b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
aBorderImgLst.ReplaceImage(rImageName, Image(b));
}
@@ -142,7 +142,7 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs
{
OUString rImageName = aShadowImgLst.GetImageName(i);
BitmapEx b = aShadowImgLst.GetImage(rImageName).GetBitmapEx();
- b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
aShadowImgLst.ReplaceImage(rImageName, Image(b));
}
}
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 55a91577c4a3..5abb05ca0f5e 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -651,7 +651,7 @@ void LayoutMenu::Fill (void)
BitmapEx aBmp(SdResId(pInfo->mnBmpResId));
if (GetDPIScaleFactor() > 1)
- aBmp.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ aBmp.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode))
aBmp.Mirror (BMP_MIRROR_HORZ);
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index 56890798b5bf..db94f49bad12 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -78,7 +78,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status
for (int i = 0; i < mpImpl->MODIFICATION_STATE_SIZE; i++)
{
BitmapEx b = mpImpl->maImages[i].GetBitmapEx();
- b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor());
+ b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
mpImpl->maImages[i] = Image(b);
}
}
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index bc2caa0443f8..733b8e7221a4 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -180,11 +180,11 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( sal_uInt16 _nSlotId,
if ( rStb.GetDPIScaleFactor() > 1)
{
BitmapEx b = pImp->aPosImage.GetBitmapEx();
- b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor());
+ b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
pImp->aPosImage = Image(b);
b = pImp->aSizeImage.GetBitmapEx();
- b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor());
+ b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
pImp->aSizeImage = Image(b);
}
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index dff5ab81dddd..9b77972d74de 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -83,7 +83,7 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId,
if ( GetStatusBar().GetDPIScaleFactor() > 1 )
{
BitmapEx b = maImage.GetBitmapEx();
- b.Scale(GetStatusBar().GetDPIScaleFactor(), GetStatusBar().GetDPIScaleFactor());
+ b.Scale(GetStatusBar().GetDPIScaleFactor(), GetStatusBar().GetDPIScaleFactor(), BMP_SCALE_FAST);
maImage = Image(b);
}
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index 266ff6f7098e..46ea35b8b167 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -68,7 +68,7 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( sal_uInt16 _nSlotId, sal_uInt16
for (int i = 0; i < 3; i++)
{
BitmapEx b = arr[i].GetBitmapEx();
- b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor());
+ b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
arr[i] = Image(b);
}
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index d07c7b120521..638a8505fb9a 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -178,7 +178,7 @@ SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nI
{
BitmapEx b = arr[i].GetBitmapEx();
//Use Lanczos scaling for the slider button because it does a better job with circles
- b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor(), BMP_SCALE_BESTQUALITY);
+ b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor(), i == 0 ? BMP_SCALE_LANCZOS : BMP_SCALE_FAST);
arr[i] = Image(b);
}
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index dfe492f04e0f..00d409e6c115 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -62,7 +62,7 @@ SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId,
{
BitmapEx b = arr[i].GetBitmapEx();
//Don't scale width, no space.
- b.Scale(1.0, rStb.GetDPIScaleFactor());
+ b.Scale(1.0, rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
arr[i] = Image(b);
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index b11a918dcb4b..fca0ce8b5971 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1359,7 +1359,7 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
// FIXME find out what that code is & fix accordingly
if (aBitmap.GetSizePixel().Width() < 32)
{
- aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
aImage = Image(aBitmap);
}
}