detection of non-translating transformations fixed
This commit is contained in:
parent
06959dfc86
commit
8fccc35156
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user