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 ( !( 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;
|
m_data->commandTypes |= QskGraphic::Transformation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,16 @@ void QskGraphicNode::setGraphic(
|
|||||||
|
|
||||||
QSize textureSize;
|
QSize textureSize;
|
||||||
|
|
||||||
constexpr auto mask = QskGraphic::VectorData | QskGraphic::Transformation;
|
if ( graphic.commandTypes() == QskGraphic::RasterData )
|
||||||
|
{
|
||||||
if ( graphic.commandTypes() & mask )
|
/*
|
||||||
|
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();
|
textureSize = rect.size().toSize();
|
||||||
|
|
||||||
@ -66,15 +73,6 @@ void QskGraphicNode::setGraphic(
|
|||||||
( rect.height() != static_cast< int >( oldRect.height() ) );
|
( 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 );
|
QskTextureNode::setRect( rect );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user