Kaydet (Commit) 80f5a837 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwFrm::PaintBackground: paint gradients in one go

Painting only the necessary regions works fine normal background color,
but not for gradients, as the result is obviously different in case of
gradients.

Change-Id: I624410ed08604c13a810f784d6226d592295c5d3
üst ac8aee92
...@@ -6181,12 +6181,13 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, ...@@ -6181,12 +6181,13 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
if ( pPage->GetSortedObjs() ) if ( pPage->GetSortedObjs() )
::lcl_SubtractFlys( this, pPage, aRect, aRegion ); ::lcl_SubtractFlys( this, pPage, aRect, aRegion );
/// OD 06.08.2002 #99657# - determine, if background transparency
/// have to be considered for drawing.
/// --> Status Quo: background transparency have to be
/// considered for fly frames
const sal_Bool bConsiderBackgroundTransparency = IsFlyFrm();
if (!pFillStyleItem || pFillStyleItem->GetValue() != XFILL_GRADIENT || !pFillGradientItem)
{ {
/// OD 06.08.2002 #99657# - determine, if background transparency
/// have to be considered for drawing.
/// --> Status Quo: background transparency have to be
/// considered for fly frames
const sal_Bool bConsiderBackgroundTransparency = IsFlyFrm();
for ( sal_uInt16 i = 0; i < aRegion.size(); ++i ) for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
{ {
if ( 1 < aRegion.size() ) if ( 1 < aRegion.size() )
...@@ -6204,6 +6205,11 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, ...@@ -6204,6 +6205,11 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
bConsiderBackgroundTransparency ); bConsiderBackgroundTransparency );
} }
} }
else
{
::DrawGraphic( pItem, pFillStyleItem, pFillGradientItem, pOut, aOrigBackRect, aRect, GRFNUM_NO,
bConsiderBackgroundTransparency );
}
if( pCol ) if( pCol )
delete pNewItem; delete pNewItem;
} }
......
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