javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/pixmap.cpp
changeset 57 59b3b4473dc8
parent 49 35baca0e7a2e
child 80 d6dafc5d983f
equal deleted inserted replaced
56:abc41079b313 57:59b3b4473dc8
    58     {
    58     {
    59         throw GfxException(EGfxErrorNoMemory, "Image (Pixmap) creation failed");
    59         throw GfxException(EGfxErrorNoMemory, "Image (Pixmap) creation failed");
    60     }
    60     }
    61 }
    61 }
    62 
    62 
       
    63 void Pixmap::createFromQPixmap(const QPixmap& aPixmap)
       
    64 {
       
    65     GFX_LOG_FUNC_CALL();
       
    66     Q_ASSERT(mPixmap.isNull());
       
    67 
       
    68     mPixmap = QPixmap(aPixmap);
       
    69 
       
    70     // Validate allocation
       
    71     if(mPixmap.isNull())
       
    72     {
       
    73         throw GfxException(EGfxErrorNoMemory, "Image (Pixmap) creation failed");
       
    74     }
       
    75 }
    63 
    76 
    64 void Pixmap::createFromImage(Image* aImage, int aX, int aY, int aWidth, int aHeight)
    77 void Pixmap::createFromImage(Image* aImage, int aX, int aY, int aWidth, int aHeight)
    65 {
    78 {
    66     GFX_LOG_FUNC_CALL();
    79     GFX_LOG_FUNC_CALL();
    67     Q_ASSERT(mPixmap.isNull());
    80     Q_ASSERT(mPixmap.isNull());