fromPixmapAsImage added
This commit is contained in:
parent
10519ffee0
commit
6194f947b8
@ -1027,6 +1027,23 @@ QskGraphic QskGraphic::fromPixmap( const QPixmap& pixmap )
|
|||||||
return graphic;
|
return graphic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QskGraphic QskGraphic::fromPixmapAsImage( const QPixmap& pixmap )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Using QPainter::drawPixmap in the scene graph thread leads
|
||||||
|
to warnings about "not being safe". This is probably not critical
|
||||||
|
for Qt/Quick as the main thread is waiting, when updating the
|
||||||
|
scene graph nodes.
|
||||||
|
|
||||||
|
It needs to be checked, what is going on, when
|
||||||
|
using the X11 paint engine, where QPixmap/QImage are more different.
|
||||||
|
|
||||||
|
TODO ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
return fromImage( pixmap.toImage() );
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
|
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
@ -114,6 +114,7 @@ class QSK_EXPORT QskGraphic : public QPaintDevice
|
|||||||
|
|
||||||
static QskGraphic fromImage( const QImage& );
|
static QskGraphic fromImage( const QImage& );
|
||||||
static QskGraphic fromPixmap( const QPixmap& );
|
static QskGraphic fromPixmap( const QPixmap& );
|
||||||
|
static QskGraphic fromPixmapAsImage( const QPixmap& );
|
||||||
|
|
||||||
quint64 modificationId() const;
|
quint64 modificationId() const;
|
||||||
uint hash( uint seed ) const;
|
uint hash( uint seed ) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user