javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/graphicsfactory.cpp
changeset 57 59b3b4473dc8
parent 35 85266cc22c7f
child 80 d6dafc5d983f
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/graphicsfactory.cpp	Fri Jul 23 12:27:20 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/graphicsfactory.cpp	Thu Aug 05 16:07:57 2010 +0300
@@ -78,6 +78,14 @@
     return static_cast<Image*>(pixmap);
 }
 
+/*static*/ Image* GraphicsFactory::createImage(const QPixmap& aPixmap)
+{
+    GFX_LOG_FUNC_CALL();
+    Pixmap* pixmap = new Pixmap();
+    pixmap->createFromQPixmap(aPixmap);
+    return static_cast<Image*>(pixmap);
+}
+
 /*static*/ Image* GraphicsFactory::createImage(int* aRgbData, int aWidth, int aHeight, bool aHasAlpha)
 {
     Pixmap* pixmap = new Pixmap();