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