QskGraphic::fraomGraphic introduced
This commit is contained in:
parent
080fcdb69f
commit
f06e47613a
@ -1068,6 +1068,21 @@ QskGraphic QskGraphic::fromPixmapAsImage( const QPixmap& pixmap )
|
||||
return fromImage( pixmap.toImage() );
|
||||
}
|
||||
|
||||
QskGraphic QskGraphic::fromGraphic(
|
||||
const QskGraphic& graphic, const QskColorFilter& colorFilter )
|
||||
{
|
||||
if ( colorFilter.isIdentity() )
|
||||
return graphic;
|
||||
|
||||
QskGraphic recoloredGraphic;
|
||||
|
||||
QPainter painter( &recoloredGraphic );
|
||||
graphic.render( &painter, colorFilter );
|
||||
painter.end();
|
||||
|
||||
return recoloredGraphic;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
|
||||
#include <qdebug.h>
|
||||
|
@ -125,6 +125,7 @@ class QSK_EXPORT QskGraphic : public QPaintDevice
|
||||
static QskGraphic fromImage( const QImage& );
|
||||
static QskGraphic fromPixmap( const QPixmap& );
|
||||
static QskGraphic fromPixmapAsImage( const QPixmap& );
|
||||
static QskGraphic fromGraphic( const QskGraphic&, const QskColorFilter& );
|
||||
|
||||
quint64 modificationId() const;
|
||||
QskHashValue hash( QskHashValue seed ) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user