diff --git a/src/graphic/QskGraphic.cpp b/src/graphic/QskGraphic.cpp index 3c84ff2c..e79f54ae 100644 --- a/src/graphic/QskGraphic.cpp +++ b/src/graphic/QskGraphic.cpp @@ -907,7 +907,12 @@ void QskGraphic::updateState( const QPaintEngineState& state ) { if ( !( m_data->commandTypes & QskGraphic::Transformation ) ) { - if ( !state.transform().isTranslating() ) + /* + QTransform::isScaling() returns true for all type + of transformations beside simple translations + even if it is f.e a rotation + */ + if ( state.transform().isScaling() ) m_data->commandTypes |= QskGraphic::Transformation; } } diff --git a/src/nodes/QskGraphicNode.cpp b/src/nodes/QskGraphicNode.cpp index fe4d5022..6000e016 100644 --- a/src/nodes/QskGraphicNode.cpp +++ b/src/nodes/QskGraphicNode.cpp @@ -53,9 +53,16 @@ void QskGraphicNode::setGraphic( QSize textureSize; - constexpr auto mask = QskGraphic::VectorData | QskGraphic::Transformation; - - if ( graphic.commandTypes() & mask ) + if ( graphic.commandTypes() == QskGraphic::RasterData ) + { + /* + simple raster data - usually a QImage/QPixmap only. + There is no benefit in rescaling it into the target rectangle + by the CPU and creating a new texture. + */ + textureSize = graphic.defaultSize().toSize(); + } + else { textureSize = rect.size().toSize(); @@ -66,15 +73,6 @@ void QskGraphicNode::setGraphic( ( rect.height() != static_cast< int >( oldRect.height() ) ); } } - else - { - /* - simple raster data - usually a QImage/QPixmap only. - There is no benefit in rescaling it into the target rectangle - by the CPU and creating a new texture. - */ - textureSize = graphic.defaultSize().toSize(); - } QskTextureNode::setRect( rect );