ganeswidgets/inc/hgvgimage.h
changeset 0 89c329efa980
child 1 e48454f237ca
equal deleted inserted replaced
-1:000000000000 0:89c329efa980
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HGVGIMAGE_H
       
    19 #define HGVGIMAGE_H
       
    20 
       
    21 #include <qstring>
       
    22 #include <qimage>
       
    23 #include <VG/openvg.h>
       
    24 #include "HgImage.h"
       
    25 
       
    26 class HgVgImagePool;
       
    27 class HgImageFader;
       
    28 class HgVgQuadRenderer;
       
    29 /**
       
    30  * Implements HgImage for HgVgQuadRenderer implementation.
       
    31  */
       
    32 class HgVgImage : public HgImage
       
    33 {
       
    34 public:
       
    35     HgVgImage(HgVgQuadRenderer* renderer);
       
    36     virtual ~HgVgImage();
       
    37 
       
    38     int width() const;
       
    39     int height() const;
       
    40     
       
    41     VGImage image() const;
       
    42     
       
    43     int mirrorImageWidth() const;
       
    44     int mirrorImageHeight() const;
       
    45     
       
    46     VGImage mirrorImage() const;
       
    47     
       
    48     void setImage(QImage& image);
       
    49     void releaseImage();
       
    50     
       
    51     void upload(bool mirror=false);
       
    52   
       
    53 private:    
       
    54     VGImage mVgImage;
       
    55     VGImage mMirrorImage;
       
    56     QSize mMirrorSize;
       
    57     QImage mQImage;
       
    58     HgVgQuadRenderer* mRenderer;
       
    59 private:
       
    60     Q_DISABLE_COPY(HgVgImage)
       
    61 };
       
    62 
       
    63 #endif