update blobs

This commit is contained in:
2026-05-19 04:04:32 +02:00
parent 3d2fc0a3b1
commit 8fba953f52
+15 -15
View File
@@ -166,22 +166,22 @@ void BlobShape::updatePolish() {
if (isExcluded(other)) if (isExcluded(other))
continue; continue;
const QPointF otherScene = other->mapToScene(QPointF(0, 0)); const QPointF otherScene = other->mapToScene(QPointF(0, 0));
const float otherHW = static_cast<float>(other->width()) * 0.5f;
const float otherHH = static_cast<float>(other->height()) * 0.5f;
const float otherPad = pad + deformPadding(other->m_deformMatrix, otherHW, otherHH);
const QRectF otherPadded(otherScene.x() - static_cast<double>(otherPad),
otherScene.y() - static_cast<double>(otherPad), other->width() + 2.0 * static_cast<double>(otherPad),
other->height() + 2.0 * static_cast<double>(otherPad));
bool include = false; bool include = false;
if (isInvertedRect()) { if (isInvertedRect()) {
include = true; include = true;
} else if (m_hasExpandedRect) { } else if (m_hasExpandedRect) {
include = m_expandedRect.intersects(otherPadded); include = m_expandedRect.intersects(otherPadded);
} else { } else {
const float otherHW = static_cast<float>(other->width()) * 0.5f; include = myPadded.intersects(otherPadded);
const float otherHH = static_cast<float>(other->height()) * 0.5f; }
const float otherPad = pad + deformPadding(other->m_deformMatrix, otherHW, otherHH);
const QRectF otherPadded(otherScene.x() - static_cast<double>(otherPad),
otherScene.y() - static_cast<double>(otherPad), other->width() + 2.0 * static_cast<double>(otherPad),
other->height() + 2.0 * static_cast<double>(otherPad));
include = myPadded.intersects(otherPadded);
}
if (include) { if (include) {
if (other == this) if (other == this)