uifw/ganes/src/HgVgHelper.cpp
branchRCL_3
changeset 72 a5e7a4f63858
parent 64 85902f042028
equal deleted inserted replaced
64:85902f042028 72:a5e7a4f63858
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 
    19 
    20 #include "HgVgHelper.h"
    20 #include "HgVgHelper.h"
    21 #include "HgVgDrawBuffer.h"
    21 #include "HgVgDrawBuffer.h"
    22 #include "HgVgImageCreator.h"
    22 #include "HgVgImageCreator.h"
    23 #include "HgVgEGL.h"
       
    24 
    23 
    25 #include <e32math.h>
    24 #include <e32math.h>
    26 #include <gulicon.h>
    25 #include <gulicon.h>
    27 #include <fbs.h>
    26 #include <fbs.h>
    28 #include <nvg.h>
    27 #include <nvg.h>
   106 // HgVgHelper::CreateVgImageFromIconL()
   105 // HgVgHelper::CreateVgImageFromIconL()
   107 // ---------------------------------------------------------------------------
   106 // ---------------------------------------------------------------------------
   108 //     
   107 //     
   109 VGImage CreateVgImageFromIconL(const CGulIcon& aIcon)
   108 VGImage CreateVgImageFromIconL(const CGulIcon& aIcon)
   110     {
   109     {
   111     // If egl has not been initialized we aren't allowed to create vgimages.
   110         
   112     if (!CHgVgEGL::EglInitialized()) return VG_INVALID_HANDLE;
       
   113     
       
   114     CFbsBitmap* bitmap = aIcon.Bitmap();
   111     CFbsBitmap* bitmap = aIcon.Bitmap();
   115     User::LeaveIfNull(bitmap);
   112     User::LeaveIfNull(bitmap);
   116     CFbsBitmap* mask = aIcon.Mask();
   113     CFbsBitmap* mask = aIcon.Mask();
   117     
   114     
   118     // if this is NVG image, rasterize it using 
   115     // if this is NVG image, rasterize it using