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