Kaydet (Commit) 6f221adc authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Improve quality of page previews in Impress/Draw with supersampling

Change-Id: I9c5b28fc32b73b2147162f74919b21d99401b501
üst 1e6985da
......@@ -41,10 +41,6 @@
#include <vcl/bmpacc.hxx>
#include <vcl/pngwrite.hxx>
const static sal_Int32 gnSuperSampleFactor (2);
const static bool gbAllowSuperSampling (false);
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
class PageObjectViewObjectContact;
......@@ -73,10 +69,12 @@ Bitmap BitmapFactory::CreateBitmap (
const bool bDoSuperSampling)
{
Size aSize (rPixelSize);
if (bDoSuperSampling && gbAllowSuperSampling)
if (bDoSuperSampling)
{
aSize.Width() *= gnSuperSampleFactor;
aSize.Height() *= gnSuperSampleFactor;
// Supersampling factor
int aSuperSamplingFactor = 2;
aSize.Width() *= aSuperSamplingFactor;
aSize.Height() *= aSuperSamplingFactor;
}
Bitmap aPreview (maRenderer.RenderPage (
......@@ -85,7 +83,7 @@ Bitmap BitmapFactory::CreateBitmap (
String(),
true,
false).GetBitmapEx().GetBitmap());
if (bDoSuperSampling && gbAllowSuperSampling)
if (bDoSuperSampling)
{
aPreview.Scale(rPixelSize, BMP_SCALE_BEST);
}
......
......@@ -147,7 +147,7 @@ Bitmap GenericPageCache::GetPreviewBitmap (
// i.e. the bitmap is not empty.
if (bResize && aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
{
aPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
aPreview.Scale(maPreviewSize);
}
bMayBeUpToDate = false;
}
......@@ -184,7 +184,7 @@ Bitmap GenericPageCache::GetMarkedPreviewBitmap (
// i.e. the bitmap is not empty.
if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
{
aMarkedPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
aMarkedPreview.Scale(maPreviewSize);
}
}
......
......@@ -819,7 +819,7 @@ void SlideSorterView::ConfigurationChanged (
mpPreviewCache.reset(
new cache::PageCache(
mpLayouter->GetPageObjectSize(),
false,
true,
cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter))));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment