--- a/svgtopt/SVG/SVGEngine/src/SVGEngineInterfaceImpl.cpp Tue May 11 17:02:26 2010 +0300
+++ b/svgtopt/SVG/SVGEngine/src/SVGEngineInterfaceImpl.cpp Tue Aug 31 16:06:58 2010 +0300
@@ -1055,67 +1055,36 @@
TInt aX,aY;
// Check in Left direction
aX = 1; aY = 0;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
+ //Coverity fixes
+ if ( bound.iX >= zero )
aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
- aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- left = EFalse;
- else
- left = ETrue;
+ left = ((aY)||(aX));
// Check in Right direction
aX = -1; aY = 0;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
+ if ( xmax <= clipWidth )
aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
- aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- right = EFalse;
- else
- right = ETrue;
+ right = ((aY)||(aX));
// Check in Up direction
aX = 0; aY = 1;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
- aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
+ if ( bound.iY >= zero )
aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- up = EFalse;
- else
- up = ETrue;
+ up = ((aY)||(aX));
// Check in down direction
aX = 0; aY = -1;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
- aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
+ if ( ymax <= clipHeight )
aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- down = EFalse;
- else
- down = ETrue;
+ down = ((aY)||(aX));
}
// --------------------------------------------------------------------------
@@ -1219,19 +1188,11 @@
{
bbSize.iWidth = ((TReal32)bbSize.iWidth) * percentWidth / 100.0;
}
- else
- {
- bbSize.iWidth = bbSize.iWidth;
- }
if( svgElement->iHeightInPercentage )
{
bbSize.iHeight = ((TReal32)bbSize.iHeight) * percentHeight / 100.0;
}
- else
- {
- bbSize.iHeight = bbSize.iHeight;
- }
return bbSize;
}
}
@@ -1538,6 +1499,13 @@
}
}
+EXPORT_C void CSvgEngineInterfaceImpl::GenerateMask(CSvgtBitmap* aMask, TInt aEngine )
+ {
+ if ( ChooseEngine( aEngine ) )
+ {
+ iSvgEngine->GenerateMask(aMask);
+ }
+ }
// --------------------------------------------------------------------------
// EXPORT_C void CSvgEngineInterfaceImpl::SetBackgroundColor(TUint32 aRGBA8888Color, CSvgEngineImpl* aEngine)
@@ -2504,6 +2472,19 @@
aEngine->SetGdiContextL( aFrameBuffer );
}
}
+
+// --------------------------------------------------------------------------
+// M2G: Overloaded SetGdiContextL() for CSvgtBitmap to enable rendering on target buffer.
+// ---------------------------------------------------------------------------
+EXPORT_C void CSvgEngineInterfaceImpl::SetGdiContextL( CSvgEngineImpl* aEngine, CSvgtBitmap* aFrameBuffer )
+ {
+ if( aEngine )
+ {
+ aEngine->EnableTargetRendering(ETrue);
+ aEngine->SetGdiContextL( aFrameBuffer );
+ }
+ }
+
// --------------------------------------------------------------------------
// EXPORT_C void CSvgEngineInterfaceImpl::SetDocument( CSvgEngineImpl* aEngine, CSvgDocumentImpl* aDocument )
// ---------------------------------------------------------------------------
@@ -3102,10 +3083,9 @@
TSvgFourPointRect fourPointRect;
//updates CTM from root
- aTextElementHandle->UpdateCTM();
-
if (aTextElementHandle)
{
+ aTextElementHandle->UpdateCTM();
aTextElementHandle->GetFourPointBBox(fourPointRect);
}