addCommand introduced to be able to manipulate calls by overloading
This commit is contained in:
parent
0042791483
commit
baac1a762b
|
@ -907,7 +907,7 @@ void QskGraphic::drawPath( const QPainterPath& path )
|
|||
if ( painter == nullptr )
|
||||
return;
|
||||
|
||||
m_data->addCommand( QskPainterCommand( path ) );
|
||||
addCommand( QskPainterCommand( path ) );
|
||||
m_data->commandTypes |= QskGraphic::VectorData;
|
||||
|
||||
if ( !path.isEmpty() )
|
||||
|
@ -938,7 +938,7 @@ void QskGraphic::drawPixmap( const QRectF& rect,
|
|||
if ( painter == nullptr )
|
||||
return;
|
||||
|
||||
m_data->addCommand( QskPainterCommand( rect, pixmap, subRect ) );
|
||||
addCommand( QskPainterCommand( rect, pixmap, subRect ) );
|
||||
m_data->commandTypes |= QskGraphic::RasterData;
|
||||
|
||||
const QRectF r = painter->transform().mapRect( rect );
|
||||
|
@ -953,7 +953,7 @@ void QskGraphic::drawImage( const QRectF& rect, const QImage& image,
|
|||
if ( painter == nullptr )
|
||||
return;
|
||||
|
||||
m_data->addCommand( QskPainterCommand( rect, image, subRect, flags ) );
|
||||
addCommand( QskPainterCommand( rect, image, subRect, flags ) );
|
||||
m_data->commandTypes |= QskGraphic::RasterData;
|
||||
|
||||
const QRectF r = painter->transform().mapRect( rect );
|
||||
|
@ -964,7 +964,7 @@ void QskGraphic::drawImage( const QRectF& rect, const QImage& image,
|
|||
|
||||
void QskGraphic::updateState( const QPaintEngineState& state )
|
||||
{
|
||||
m_data->addCommand( QskPainterCommand( state ) );
|
||||
addCommand( QskPainterCommand( state ) );
|
||||
|
||||
if ( state.state() & QPaintEngine::DirtyTransform )
|
||||
{
|
||||
|
@ -981,6 +981,11 @@ void QskGraphic::updateState( const QPaintEngineState& state )
|
|||
}
|
||||
}
|
||||
|
||||
void QskGraphic::addCommand( const QskPainterCommand& command )
|
||||
{
|
||||
m_data->addCommand( command );
|
||||
}
|
||||
|
||||
void QskGraphic::updateBoundingRect( const QRectF& rect )
|
||||
{
|
||||
QRectF br = rect;
|
||||
|
|
|
@ -146,7 +146,9 @@ class QSK_EXPORT QskGraphic : public QPaintDevice
|
|||
virtual void drawImage( const QRectF&,
|
||||
const QImage&, const QRectF&, Qt::ImageConversionFlags );
|
||||
|
||||
virtual void updateState( const QPaintEngineState& state );
|
||||
virtual void updateState( const QPaintEngineState& );
|
||||
|
||||
virtual void addCommand( const QskPainterCommand& );
|
||||
|
||||
private:
|
||||
void updateBoundingRect( const QRectF& );
|
||||
|
|
Loading…
Reference in New Issue