Kaydet (Commit) c3f13f0c authored tarafından Noel Grandin's avatar Noel Grandin

Bitmap->BitmapEx in BitmapFactory

Change-Id: I7f88333a74f7c523030ab55b896c316b3aa73cce
Reviewed-on: https://gerrit.libreoffice.org/55282Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 874f2d84
......@@ -46,7 +46,7 @@ BitmapFactory::~BitmapFactory()
{
}
Bitmap BitmapFactory::CreateBitmap (
BitmapEx BitmapFactory::CreateBitmap (
const SdPage& rPage,
const Size& rPixelSize,
const bool bDoSuperSampling)
......@@ -60,11 +60,11 @@ Bitmap BitmapFactory::CreateBitmap (
aSize.setHeight( aSize.Height() * aSuperSamplingFactor );
}
Bitmap aPreview (maRenderer.RenderPage (
BitmapEx aPreview (maRenderer.RenderPage (
&rPage,
aSize,
true,
false).GetBitmapEx().GetBitmap());
false).GetBitmapEx());
if (bDoSuperSampling)
{
aPreview.Scale(rPixelSize, BmpScaleFlag::BestQuality);
......
......@@ -37,7 +37,7 @@ public:
BitmapFactory();
~BitmapFactory();
Bitmap CreateBitmap (
BitmapEx CreateBitmap (
const SdPage& rPage,
const Size& rPixelSize,
const bool bDoSuperSampling);
......
......@@ -78,13 +78,7 @@ void FramePainter::AdaptColor (
// Get the source color.
if (maCenter.maBitmap.IsEmpty())
return;
Bitmap aBitmap = maCenter.maBitmap.GetBitmap();
Bitmap::ScopedReadAccess pReadAccess(aBitmap);
if (!pReadAccess)
return;
const BitmapColor aBmpSourceColor = pReadAccess->GetColor(0,0);
const Color aSourceColor = aBmpSourceColor.GetColor();
pReadAccess.reset();
const Color aSourceColor = maCenter.maBitmap.GetPixelColor(0,0);
// Erase the center bitmap.
maCenter.maBitmap.SetEmpty();
......
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