Lines 52-57
Link Here
|
52 |
#include <vcl/image.h> |
52 |
#include <vcl/image.h> |
53 |
#include <vcl/image.hxx> |
53 |
#include <vcl/image.hxx> |
54 |
#include <vcl/bmpfast.hxx> |
54 |
#include <vcl/bmpfast.hxx> |
|
|
55 |
#include <tools/debug.hxx> |
55 |
|
56 |
|
56 |
#define BAND_MAX_SIZE 512000 |
57 |
#define BAND_MAX_SIZE 512000 |
57 |
|
58 |
|
Lines 387-392
Link Here
|
387 |
|
388 |
|
388 |
// ------------------------------------------------------------------ |
389 |
// ------------------------------------------------------------------ |
389 |
|
390 |
|
|
|
391 |
void OutputDevice::DrawOutDevMasked( const Point& rDstPt, const Size& rDstSize, |
392 |
const Point& rSrcPt, const Size& rSrcSize, |
393 |
const OutputDevice& rSrcOutDev, |
394 |
const OutputDevice& rMaskOutDev ) |
395 |
{ |
396 |
DBG_TRACE( "OutputDevice::DrawOutDev()" ); |
397 |
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); |
398 |
DBG_CHKOBJ( &rSrcOutDev, OutputDevice, ImplDbgCheckOutputDevice ); |
399 |
DBG_CHKOBJ( &rMaskOutDev, OutputDevice, ImplDbgCheckOutputDevice ); |
400 |
DBG_ASSERT( rDstSize == rSrcSize, "DrawOutDevMasked() only matched sizes implemented"); // not implemented |
401 |
DBG_ASSERT( !IsMapModeEnabled(), "DrawOutDevMasked() only pixel mapmode supported"); |
402 |
DBG_ASSERT( !rSrcOutDev.IsMapModeEnabled(), "DrawOutDevMasked() only pixel mapmode supported"); |
403 |
DBG_ASSERT( !rMaskOutDev.IsMapModeEnabled(), "DrawOutDevMasked() only pixel mapmode supported"); |
404 |
|
405 |
OUTDEV_INIT(); |
406 |
|
407 |
bool bDrawn = false; |
408 |
|
409 |
// #i112730# try fast SalGraphics method first |
410 |
if( !rSrcOutDev.mpGraphics ) |
411 |
rSrcOutDev.ImplGetGraphics(); |
412 |
if( !rMaskOutDev.mpGraphics ) |
413 |
rMaskOutDev.ImplGetGraphics(); |
414 |
if( !mpMetaFile |
415 |
&& (meRasterOp == ROP_OVERPAINT) |
416 |
&& (mpGraphics && rSrcOutDev.mpGraphics && rMaskOutDev.mpGraphics) ) |
417 |
{ |
418 |
SalTwoRect aPosAry; |
419 |
aPosAry.mnSrcX = rSrcOutDev.ImplLogicXToDevicePixel( rSrcPt.X() ); |
420 |
aPosAry.mnSrcY = rSrcOutDev.ImplLogicYToDevicePixel( rSrcPt.Y() ); |
421 |
aPosAry.mnSrcWidth = rSrcOutDev.ImplLogicWidthToDevicePixel( rSrcSize.Width() ); |
422 |
aPosAry.mnSrcHeight = rSrcOutDev.ImplLogicHeightToDevicePixel( rSrcSize.Height() ); |
423 |
aPosAry.mnDestX = ImplLogicXToDevicePixel( rDstPt.X() ); |
424 |
aPosAry.mnDestY = ImplLogicYToDevicePixel( rDstPt.Y() ); |
425 |
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDstSize.Width() ); |
426 |
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDstSize.Height() ); |
427 |
|
428 |
bDrawn = mpGraphics->BlendBits( aPosAry, *rSrcOutDev.mpGraphics, *rMaskOutDev.mpGraphics, |
429 |
this, &rSrcOutDev, &rMaskOutDev ); |
430 |
} |
431 |
|
432 |
if( !bDrawn ) // fallback to canonical method if needed |
433 |
{ |
434 |
const Bitmap aSourceBmp = rSrcOutDev.GetBitmap( rSrcPt, rSrcSize ); |
435 |
const AlphaMask aAlphaMask = rMaskOutDev.GetBitmap( rSrcPt, rSrcSize ); |
436 |
const BitmapEx aBlendedBmp( aSourceBmp, aAlphaMask ); |
437 |
DrawBitmapEx( rDstPt, aBlendedBmp ); |
438 |
} |
439 |
} |
440 |
|
441 |
// ------------------------------------------------------------------ |
442 |
|
390 |
void OutputDevice::CopyArea( const Point& rDestPt, |
443 |
void OutputDevice::CopyArea( const Point& rDestPt, |
391 |
const Point& rSrcPt, const Size& rSrcSize, |
444 |
const Point& rSrcPt, const Size& rSrcSize, |
392 |
USHORT nFlags ) |
445 |
USHORT nFlags ) |