src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h
changeset 28 b7da29130b0e
parent 23 e6ad4ef83b23
equal deleted inserted replaced
23:e6ad4ef83b23 28:b7da29130b0e
    34 
    34 
    35 // Note: Cases of the following two directory names intentionally differ to
    35 // Note: Cases of the following two directory names intentionally differ to
    36 //       match the cases of the corresponding directories in Symbian 4.
    36 //       match the cases of the corresponding directories in Symbian 4.
    37 #include <VG/openvg.h>
    37 #include <VG/openvg.h>
    38 #include <vg/vgcontext_symbian.h>
    38 #include <vg/vgcontext_symbian.h>
       
    39 #include "hbnvgrasterizer_p.h"
    39 #endif //HB_NVG_CS_ICON
    40 #endif //HB_NVG_CS_ICON
    40 
    41 
    41 QT_BEGIN_NAMESPACE
    42 QT_BEGIN_NAMESPACE
    42 class QSvgRenderer;
    43 class QSvgRenderer;
    43 class QPicture;
    44 class QPicture;
    44 class QPixmap;
    45 class QPixmap;
    45 QT_END_NAMESPACE
    46 QT_END_NAMESPACE
    46 
    47 
    47 class HbThemeServerSymbian;
    48 class HbThemeServerSymbian;
    48 
       
    49 #if defined (HB_NVG_CS_ICON)
       
    50 struct HbNvgAspectRatioSettings
       
    51 {
       
    52     TNvgAlignStatusType nvgAlignStatusAndAspectRatio;
       
    53     TNvgMeetOrSliceType type;
       
    54 };
       
    55 #endif //HB_NVG_CS_ICON
       
    56 
    49 
    57 class HbPixmapIconProcessor : public HbIconProcessor
    50 class HbPixmapIconProcessor : public HbIconProcessor
    58 {
    51 {
    59 public :
    52 public :
    60     HbPixmapIconProcessor(
    53     HbPixmapIconProcessor(
    70     void setPixmap(const QPixmap & pixmap);
    63     void setPixmap(const QPixmap & pixmap);
    71     bool createMultiPieceIconData(const QVector<HbSharedIconInfo> &multiPieceIconInfo,
    64     bool createMultiPieceIconData(const QVector<HbSharedIconInfo> &multiPieceIconInfo,
    72                                   HbMultiIconParams &multiPieceIconParams);
    65                                   HbMultiIconParams &multiPieceIconParams);
    73 
    66 
    74 private :
    67 private :
       
    68 #if defined (HB_NVG_CS_ICON)
       
    69     bool renderNvgToPixmap(const QString& iconPath);
       
    70 #endif
    75     bool renderSvgToPixmap(const QString& iconPath);
    71     bool renderSvgToPixmap(const QString& iconPath);
    76     bool renderPicToPixmap(const QString& iconPath);
    72     bool renderPicToPixmap(const QString& iconPath);
    77     bool renderOtherFormatsToPixmap(const QString& iconPath);
    73     bool renderOtherFormatsToPixmap(const QString& iconPath);
    78 
    74 
    79 #if defined (HB_NVG_CS_ICON)
       
    80     VGIColorBufferFormat mapToVgiDisplayFormat(QImage::Format imageFormat) const;
       
    81     bool renderNvgToPixmap(const QString& iconPath);
       
    82     bool pixmapFromByteArray(const QByteArray &byteArray, const QSize iconSize, Qt::AspectRatioMode aspectRatioMode);
       
    83     HbNvgAspectRatioSettings mapKeyAspectRatioToNvgAspectRatio(
       
    84                                                     Qt::AspectRatioMode aspectRatio) const;
       
    85 #endif //HB_NVG_CS_ICON
       
    86 private:
    75 private:
       
    76     mutable HbSharedIconInfo data;
    87     QPixmap pixmap;
    77     QPixmap pixmap;
    88 };
    78 };
    89 
    79 
    90 #endif // end of HBPIXMAPICONPROCESSOR_P_H
    80 #endif // end of HBPIXMAPICONPROCESSOR_P_H