equal
deleted
inserted
replaced
24 #include "VGRenderer.h" |
24 #include "VGRenderer.h" |
25 #include <SVGRendererId.h> |
25 #include <SVGRendererId.h> |
26 #include "VGSurface.h" |
26 #include "VGSurface.h" |
27 #include <VG/openvg.h> |
27 #include <VG/openvg.h> |
28 |
28 |
|
29 class CSvgtBitmap; |
|
30 |
29 const TUint8 KMediaAnimationVisible = 2; |
31 const TUint8 KMediaAnimationVisible = 2; |
30 |
32 |
31 /** |
33 /** |
32 * This class provides the interface create a graphics context. |
34 * This class provides the interface create a graphics context. |
33 * |
35 * |
45 * @param |
47 * @param |
46 * @return |
48 * @return |
47 */ |
49 */ |
48 static CGfx2dGcOpenVG* NewL( const TSize aBufferSize, TFontSpec& aFontSpec, CSvgBitmapFontProvider* aSvgBitmapFontProvider, TBool aIsMain = ETrue ); |
50 static CGfx2dGcOpenVG* NewL( const TSize aBufferSize, TFontSpec& aFontSpec, CSvgBitmapFontProvider* aSvgBitmapFontProvider, TBool aIsMain = ETrue ); |
49 |
51 |
50 static CGfx2dGcOpenVG* NewL( const TSize aBufferSize, TFontSpec& aFontSpec, CSvgBitmapFontProvider* aSvgBitmapFontProvider,SVGRendererId aRendererType,TBool aIsMain = ETrue ); |
52 static CGfx2dGcOpenVG* NewL( const TSize aBufferSize, TFontSpec& aFontSpec, CSvgBitmapFontProvider* aSvgBitmapFontProvider,SVGRendererId aRendererType,TBool aRenderOption = ETrue ); |
51 void GetFontScaled( TFloatFixPt aHeight, const TDesC& aTypefaceName, CFont*& aFont, TFontSpec& aFontSpec ); |
53 void GetFontScaled( TFloatFixPt aHeight, const TDesC& aTypefaceName, CFont*& aFont, TFontSpec& aFontSpec ); |
52 |
54 |
53 /** |
55 /** |
54 * Destructor |
56 * Destructor |
55 */ |
57 */ |
350 * @return |
352 * @return |
351 */ |
353 */ |
352 void UpdateFramebufferL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ); |
354 void UpdateFramebufferL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ); |
353 |
355 |
354 void UpdateFramebufferL( CFbsBitmap* aBitmap, CFbsBitmap* aMask,TSize BitmapSize,TDisplayMode aBitmapDspMode,TDisplayMode aMaskDspMode ); |
356 void UpdateFramebufferL( CFbsBitmap* aBitmap, CFbsBitmap* aMask,TSize BitmapSize,TDisplayMode aBitmapDspMode,TDisplayMode aMaskDspMode ); |
355 /** |
357 |
|
358 void UpdateFramebufferL( CSvgtBitmap* aBitmap, CSvgtBitmap* aMask ); |
|
359 void UpdateFramebufferL( CSvgtBitmap* aBitmap, CSvgtBitmap* aMask,TSize BitmapSize,TDisplayMode aBitmapDspMode,TDisplayMode aMaskDspMode ); |
|
360 /** |
356 * Blend aFrameBuffer with background buffer using the opacity value |
361 * Blend aFrameBuffer with background buffer using the opacity value |
357 * |
362 * |
358 * @since 1.0 |
363 * @since 1.0 |
359 * @param aFrameBuffer: Buffer to be blended with background |
364 * @param aFrameBuffer: Buffer to be blended with background |
360 * aOpacity: opacity value (0<=aOpacity<=1.0) |
365 * aOpacity: opacity value (0<=aOpacity<=1.0) |
368 * @since |
373 * @since |
369 * @param aMask: pointer to the mask |
374 * @param aMask: pointer to the mask |
370 * @return |
375 * @return |
371 */ |
376 */ |
372 void GenerateMask(CFbsBitmap* aMask); |
377 void GenerateMask(CFbsBitmap* aMask); |
373 |
378 void GenerateMask(CSvgtBitmap* aMask); |
|
379 |
374 /** |
380 /** |
375 * Set the fill opacity value |
381 * Set the fill opacity value |
376 * |
382 * |
377 * @since 1.0 |
383 * @since 1.0 |
378 * @param aFillOpacity : opacity value (0<=aFillOpacity<=1.0) |
384 * @param aFillOpacity : opacity value (0<=aFillOpacity<=1.0) |
508 private: |
514 private: |
509 // 32-bit buffer for OpenVG to draw to |
515 // 32-bit buffer for OpenVG to draw to |
510 // Color conversion/copy to Symbian bitmap is needed as final step |
516 // Color conversion/copy to Symbian bitmap is needed as final step |
511 TSize iColorBufferSize; |
517 TSize iColorBufferSize; |
512 |
518 |
|
519 TDisplayMode iDisplayMode; |
|
520 |
|
521 // M2G: Variable to specify the target rendering option (rendering onto bitmap or onto target) |
|
522 TBool iRenderOption; |
|
523 TBool iGraphicsContextCreated; |
|
524 |
513 TGfxRectangle2D iClip; |
525 TGfxRectangle2D iClip; |
514 MGfxPaint* iFillColor; |
526 MGfxPaint* iFillColor; |
515 TFloatFixPt iFillOpacity; |
527 TFloatFixPt iFillOpacity; |
516 TFloatFixPt iScale; |
528 TFloatFixPt iScale; |
517 TGfxStroke iStroke; |
529 TGfxStroke iStroke; |
533 // Flag used for using CFbsBitmap::DataAddress() instead of allocating |
545 // Flag used for using CFbsBitmap::DataAddress() instead of allocating |
534 // TInt32 array to draw shapes. |
546 // TInt32 array to draw shapes. |
535 TFontSpec iFontSpec; |
547 TFontSpec iFontSpec; |
536 //OpenVG stuff |
548 //OpenVG stuff |
537 |
549 |
538 TDisplayMode iDisplayMode; |
|
539 TBool iGraphicsContextCreated; |
|
540 TBool iIsMainContext; |
|
541 |
|
542 VGPaint iFillPaint; |
550 VGPaint iFillPaint; |
543 VGPaint iStrokePaint; |
551 VGPaint iStrokePaint; |
544 VGPath iPath; |
552 VGPath iPath; |
545 |
553 |
546 RArray<VGImage> iGroupOpacityImages; |
554 RArray<VGImage> iGroupOpacityImages; |