Compare commits
2 Commits
9057500da8
...
291d112d11
Author | SHA1 | Date |
---|---|---|
karlis | 291d112d11 | |
karlis | fff1ce3424 |
|
@ -114,7 +114,7 @@ void SimpleElement::paint(QPainter* painter, QTransform transform, const LayerSt
|
|||
else
|
||||
maxScale = std::max(fabs(transform.m12() / sin(angle)), fabs(transform.m21() / sin(angle)));
|
||||
double pixelRatio = maxScale * QGuiApplication::primaryScreen()->devicePixelRatio();
|
||||
if (painterPath == painterPathPrev && styles.getHash() == stylesHashValue)
|
||||
if (painterPath == painterPathPrev && styles.getHash() == stylesHashValue && pixelRatio == pixelRatioPrev)
|
||||
{
|
||||
transform.translate(movPrev.x(), movPrev.y());
|
||||
painter->setTransform(transform.scale(1 / pixelRatio, 1 / pixelRatio));
|
||||
|
@ -130,6 +130,7 @@ void SimpleElement::paint(QPainter* painter, QTransform transform, const LayerSt
|
|||
painterPathPrev = painterPath;
|
||||
imagePrev = img;
|
||||
movPrev = mov;
|
||||
pixelRatioPrev = pixelRatio;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ public:
|
|||
QPainterPath painterPathPrev;
|
||||
QPointF movPrev;
|
||||
QImage imagePrev;
|
||||
double pixelRatioPrev;
|
||||
int index;
|
||||
// TODO: 改为BitmapPath
|
||||
virtual QJsonObject toJson() const = 0;
|
||||
|
|
Loading…
Reference in New Issue