svgtopt/SVGEngineJI/src/SvgJavaInterfaceImpl.cpp
changeset 26 796196dd6e68
parent 19 df65ec4f2d28
--- a/svgtopt/SVGEngineJI/src/SvgJavaInterfaceImpl.cpp	Fri May 14 16:45:42 2010 +0300
+++ b/svgtopt/SVGEngineJI/src/SvgJavaInterfaceImpl.cpp	Wed Jun 09 11:15:09 2010 +0300
@@ -241,6 +241,34 @@
 	*/
 }
 
+/*
+ * M2G: SvgEngineRenderDocument() overloaded to pass the CSvgtBitmap object to SvgEngine
+ */
+EXPORT_C void CSvgJavaInterfaceImpl::SvgEngineRenderDocument( 
+    SvgEngineHandle aEngineHandle, SvgDocumentHandle aDocumentHandle, 
+    SvgtBitmapHandle aSurfaceHandle, SvgtBitmapHandle aSurfaceMaskHandle, 
+    TReal32 aCurrentTime ) 
+    {
+    CSvgEngineInterfaceImpl::iFileIsLoaded = ETrue;
+
+    SetDocument( (CSvgEngineImpl*)aEngineHandle, (CSvgDocumentImpl*)aDocumentHandle );
+
+    // GfxContext creation
+    TRAPD(error, SetGdiContextL( (CSvgEngineImpl*)aEngineHandle, (CSvgtBitmap*)aSurfaceHandle ) );
+    if ( error != KErrNone )
+       {
+       // ignore trap error
+       }
+
+    //this udpates things like Viewport with whatever preserveAspectRatio and widths are set
+    //InitializeEngine((CSvgEngineImpl*)aEngineHandle);
+
+    if ( ((CSvgtBitmap*)aSurfaceMaskHandle) != NULL)
+    GenerateMask((CSvgtBitmap*)aSurfaceMaskHandle);
+
+    RenderFrame( (CSvgEngineImpl*)aEngineHandle, (TUint)(aCurrentTime * 1000) );
+    }
+
 /**
  *
  */
@@ -2688,8 +2716,8 @@
     default: 
         attribVal = KErrNotFound;
     
+    }
     return attribVal;
-    }
 }
 /**
 * This maps the Enumeration from SVG to JSR.