pass/rect: fix bounding box

This commit is contained in:
Vaxry
2025-01-23 22:59:06 +00:00
parent bb099e5733
commit d075d1cab9

View File

@@ -24,9 +24,9 @@ bool CRectPassElement::needsPrecomputeBlur() {
}
std::optional<CBox> CRectPassElement::boundingBox() {
return data.box.copy().expand(-data.round);
return data.box;
}
CRegion CRectPassElement::opaqueRegion() {
return data.color.a >= 1.F ? *boundingBox() : CRegion{};
return data.color.a >= 1.F ? boundingBox()->expand(-data.round) : CRegion{};
}