Kaydet (Commit) 997654c2 authored tarafından Caolán McNamara's avatar Caolán McNamara

make SvpSalGraphics::getBitmap more readable

Change-Id: I4eb896813d6cec49bf5f1c8ac2ee8fafc06fbf52
üst 662f88b0
...@@ -651,18 +651,21 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rPosAry, ...@@ -651,18 +651,21 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rPosAry,
SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight ) SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
{ {
basebmp::BitmapDeviceSharedPtr aCopy; SvpSalBitmap* pBitmap = new SvpSalBitmap();
if (m_aDevice) if (m_aDevice)
{
basebmp::BitmapDeviceSharedPtr aCopy;
aCopy = cloneBitmapDevice(basegfx::B2IVector(nWidth, nHeight), aCopy = cloneBitmapDevice(basegfx::B2IVector(nWidth, nHeight),
m_aDevice); m_aDevice);
basegfx::B2IBox aSrcRect( nX, nY, nX+nWidth, nY+nHeight ); basegfx::B2IBox aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
basegfx::B2IBox aDestRect( 0, 0, nWidth, nHeight ); basegfx::B2IBox aDestRect( 0, 0, nWidth, nHeight );
if (aCopy)
aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, basebmp::DrawMode_PAINT ); aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, basebmp::DrawMode_PAINT );
SvpSalBitmap* pBitmap = new SvpSalBitmap(); pBitmap->setBitmap( aCopy );
pBitmap->setBitmap( aCopy ); }
return pBitmap; return pBitmap;
} }
......
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