svgtopt/SVGEngineJI/src/SvgJavaInterfaceImpl.cpp
changeset 32 5cc7cc9a1c87
parent 19 df65ec4f2d28
equal deleted inserted replaced
21:4c62338e03c8 32:5cc7cc9a1c87
   238 	myText.Copy(_L("Andrew's Test Bitmap"));
   238 	myText.Copy(_L("Andrew's Test Bitmap"));
   239 
   239 
   240 	ConvertBitmapToFileL((CFbsBitmap*)aSurfaceHandle, myText);
   240 	ConvertBitmapToFileL((CFbsBitmap*)aSurfaceHandle, myText);
   241 	*/
   241 	*/
   242 }
   242 }
       
   243 
       
   244 /*
       
   245  * M2G: SvgEngineRenderDocument() overloaded to pass the CSvgtBitmap object to SvgEngine
       
   246  */
       
   247 EXPORT_C void CSvgJavaInterfaceImpl::SvgEngineRenderDocument( 
       
   248     SvgEngineHandle aEngineHandle, SvgDocumentHandle aDocumentHandle, 
       
   249     SvgtBitmapHandle aSurfaceHandle, SvgtBitmapHandle aSurfaceMaskHandle, 
       
   250     TReal32 aCurrentTime ) 
       
   251     {
       
   252     CSvgEngineInterfaceImpl::iFileIsLoaded = ETrue;
       
   253 
       
   254     SetDocument( (CSvgEngineImpl*)aEngineHandle, (CSvgDocumentImpl*)aDocumentHandle );
       
   255 
       
   256     // GfxContext creation
       
   257     TRAPD(error, SetGdiContextL( (CSvgEngineImpl*)aEngineHandle, (CSvgtBitmap*)aSurfaceHandle ) );
       
   258     if ( error != KErrNone )
       
   259        {
       
   260        // ignore trap error
       
   261        }
       
   262 
       
   263     //this udpates things like Viewport with whatever preserveAspectRatio and widths are set
       
   264     //InitializeEngine((CSvgEngineImpl*)aEngineHandle);
       
   265 
       
   266     if ( ((CSvgtBitmap*)aSurfaceMaskHandle) != NULL)
       
   267     GenerateMask((CSvgtBitmap*)aSurfaceMaskHandle);
       
   268 
       
   269     RenderFrame( (CSvgEngineImpl*)aEngineHandle, (TUint)(aCurrentTime * 1000) );
       
   270     }
   243 
   271 
   244 /**
   272 /**
   245  *
   273  *
   246  */
   274  */
   247 EXPORT_C void CSvgJavaInterfaceImpl::SvgEngineRenderDocumentL( 
   275 EXPORT_C void CSvgJavaInterfaceImpl::SvgEngineRenderDocumentL( 
  2686             }
  2714             }
  2687             break;
  2715             break;
  2688     default: 
  2716     default: 
  2689         attribVal = KErrNotFound;
  2717         attribVal = KErrNotFound;
  2690     
  2718     
       
  2719     }
  2691     return attribVal;
  2720     return attribVal;
  2692     }
       
  2693 }
  2721 }
  2694 /**
  2722 /**
  2695 * This maps the Enumeration from SVG to JSR.
  2723 * This maps the Enumeration from SVG to JSR.
  2696 */
  2724 */
  2697 TInt  CSvgJavaInterfaceImpl::SvgEnumerationMappingSVGtoJSR(const TInt aAttributeId, TInt32 aSvgEnumValue)
  2725 TInt  CSvgJavaInterfaceImpl::SvgEnumerationMappingSVGtoJSR(const TInt aAttributeId, TInt32 aSvgEnumValue)