Kaydet (Commit) 1c217968 authored tarafından Caolán McNamara's avatar Caolán McNamara

always copying the full bitmap, not just a portion of it

Change-Id: Ib3e10d188c3f0d1bde40653d783f98ebfaed423c
üst 1e2bcb31
This diff is collapsed.
......@@ -118,23 +118,9 @@ public:
/** Draw another bitmap into this device
@param rSrcBitmap
Bitmap to render into this one. It is permitted that source
and destination bitmap are the same.
@param rSrcRect
Rectangle within the source bitmap to take the pixel from.
@param rDstRect
Rectangle in the destination bitmap to put the pixel
into. Source and destination rectangle are permitted to have
differing sizes; this method will scale the source pixel
accordingly. Please note that both source and destination
rectangle are interpreted excluding the rightmost pixel column
and the bottommost pixel row
Bitmap to render into this one.
*/
void drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
const basegfx::B2IBox& rSrcRect,
const basegfx::B2IBox& rDstRect );
void copyBitmap( const BitmapDeviceSharedPtr& rSrcBitmap );
protected:
BASEBMP_DLLPRIVATE BitmapDevice( const basegfx::B2IBox& rBounds,
......@@ -155,10 +141,7 @@ private:
BASEBMP_DLLPRIVATE virtual sal_uInt32 getPixelData_i( const basegfx::B2IPoint& rPt ) = 0;
// must work with *this == rSrcBitmap!
BASEBMP_DLLPRIVATE virtual void drawBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
const basegfx::B2IBox& rSrcRect,
const basegfx::B2IBox& rDstRect ) = 0;
BASEBMP_DLLPRIVATE virtual void copyBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap ) = 0;
BitmapDeviceSharedPtr getGenericRenderer() const;
......
......@@ -79,8 +79,7 @@ bool SvpSalBitmap::Create( const SalBitmap& rSalBmp )
{
B2IVector aSize = rSrcBmp->getSize();
m_aBitmap = cloneBitmapDevice( aSize, rSrcBmp );
B2IBox aRect( 0, 0, aSize.getX(), aSize.getY() );
m_aBitmap->drawBitmap(rSrcBmp, aRect, aRect);
m_aBitmap->copyBitmap(rSrcBmp);
}
else
m_aBitmap.reset();
......
......@@ -130,9 +130,8 @@ namespace
Size aSize = rSourceBitmap.GetSize();
aTmpBmp.Create(aSize, 0, BitmapPalette());
assert(aTmpBmp.GetBitCount() == 32);
basegfx::B2IBox aRect(0, 0, aSize.Width(), aSize.Height());
const basebmp::BitmapDeviceSharedPtr& rTmpSrc = aTmpBmp.getBitmap();
rTmpSrc->drawBitmap(rSrcBmp, aRect, aRect);
rTmpSrc->copyBitmap(rSrcBmp);
source = SvpSalGraphics::createCairoSurface(rTmpSrc);
}
else
......
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