javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/imageimpl.h
changeset 80 d6dafc5d983f
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
       
     1 /*******************************************************************************
       
     2  * Copyright (c) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved. This program and the accompanying materials
       
     4  * are made available under the terms of the Eclipse Public License v1.0
       
     5  * which accompanies this distribution, and is available at
       
     6  * http://www.eclipse.org/legal/epl-v10.html
       
     7  *
       
     8  * Contributors:
       
     9  *     Nokia Corporation - initial API and implementation
       
    10  *******************************************************************************/
       
    11 #ifndef IMAGEIMPL_H_
       
    12 #define IMAGEIMPL_H_
       
    13 
       
    14 #include <QImage>
       
    15 #include "imagebase.h"
       
    16 
       
    17 namespace Java { namespace GFX {
       
    18 
       
    19 class ImageImpl: public ImageBase
       
    20     {
       
    21 public:
       
    22     /**
       
    23       * Ctor
       
    24       */
       
    25     ImageImpl();
       
    26     
       
    27     /**
       
    28      * Dtor
       
    29      */    
       
    30     virtual ~ImageImpl();
       
    31     
       
    32     /**
       
    33      * from Image
       
    34      * @see Image
       
    35      */
       
    36     virtual void createBySize(int aWidth, int aHeight, int aFillColor, TImageFormat aFormat);
       
    37     virtual void createFromQImage(const QImage& aImage);
       
    38     virtual void createFromQPixmap(const QPixmap& aPixmap);
       
    39     virtual void createFromImage(Image* aImage, int aX, int aY, int aWidth, int aHeight);
       
    40     virtual void createFromImageData(ImageDataWrapper* aData);
       
    41     virtual void createFromRGB(int* aRgbdata, int aWidth, int aHeight, bool aHasAlpha);
       
    42     virtual void dispose();
       
    43     virtual QPaintDevice* getBindable();
       
    44     virtual TImageFormat getFormat();
       
    45     virtual int getHeight();
       
    46     virtual const QImage* getConstImage();
       
    47     virtual QImage* getImage();
       
    48     virtual const QPixmap* getConstPixmap();
       
    49     virtual QPixmap* getPixmap();
       
    50     virtual void getRgb(int* aRgbdata, int aOffset, int aScanlength, int aX, int aY, int aWidth, int aHeight);
       
    51     virtual void getRgb(char* aRgbdata, char* aTransparencyMask,int aOffset, int aScanlength, int aX, int aY, int aWidth, int aHeight, int aFormat);
       
    52     virtual void getRgb(short* aRgbdata, int aOffset, int aScanlength, int aX, int aY, int aWidth, int aHeight, int aFormat);
       
    53     virtual int getWidth();
       
    54     virtual const QImage toConstImage();
       
    55     virtual QImage toImage();
       
    56     virtual QPixmap toPixmap();
       
    57     virtual void transform(TTransform aTransform);
       
    58     virtual TImageType type();
       
    59     virtual bool hasAlphaChannel();
       
    60     
       
    61 private:
       
    62     QImage   mImage;
       
    63     };
       
    64 
       
    65 } // namespace GFX
       
    66 } // namespace Java
       
    67 
       
    68 #endif /* IMAGEIMPL_H_ */