454 // ----------------------------------------------------------------------------- |
454 // ----------------------------------------------------------------------------- |
455 void CMaskedBitmap::TileInBitmapRect( CFbsBitGc& gc, const TRect& bmpRect, const TPoint& srcPt ) |
455 void CMaskedBitmap::TileInBitmapRect( CFbsBitGc& gc, const TRect& bmpRect, const TPoint& srcPt ) |
456 { |
456 { |
457 if (!HasMask()) |
457 if (!HasMask()) |
458 { |
458 { |
459 gc.UseBrushPattern(iBitmap); |
459 TRAP_IGNORE( |
460 gc.SetBrushStyle(CGraphicsContext::EPatternedBrush); |
460 CFbsBitGc* copy = CFbsBitGc::NewL(); |
461 gc.SetBrushOrigin(srcPt); |
461 CleanupStack::PushL( copy ); |
462 gc.DrawRect(bmpRect); |
462 copy->Activate( (CFbsDevice*) gc.Device() ); |
463 gc.DiscardBrushPattern(); |
463 copy->CopySettings( gc ); |
|
464 copy->UseBrushPattern(iBitmap); |
|
465 copy->SetPenStyle(CGraphicsContext::ENullPen); |
|
466 copy->SetBrushStyle(CGraphicsContext::EPatternedBrush); |
|
467 copy->SetBrushOrigin(srcPt); |
|
468 copy->DrawRect(bmpRect); |
|
469 copy->DiscardBrushPattern(); |
|
470 CleanupStack::PopAndDestroy( copy ); |
|
471 ); |
464 } |
472 } |
465 else |
473 else |
466 { |
474 { |
467 gc.SetBrushStyle(CGraphicsContext::ENullBrush); |
475 gc.SetBrushStyle(CGraphicsContext::ENullBrush); |
468 TPoint off(srcPt.iX, srcPt.iY); |
476 TPoint off(srcPt.iX, srcPt.iY); |