Fix issue #1546 of UILayout (#1549)

This commit is contained in:
aismann 2023-12-27 12:20:27 +01:00 committed by GitHub
parent 29504d102c
commit 54daf354cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -447,14 +447,8 @@ void Layout::setStencilClippingSize(const Vec2& /*size*/)
{
if (_clippingEnabled && _clippingType == ClippingType::STENCIL)
{
Vec2 rect[4];
// rect[0].setZero(); Zero default
rect[1].set(_contentSize.width, 0.0f);
rect[2].set(_contentSize.width, _contentSize.height);
rect[3].set(0.0f, _contentSize.height);
Color4F green(0.0f, 1.0f, 0.0f, 1.0f);
_clippingStencil->clear();
_clippingStencil->drawPolygon(rect, 4, green, 0, green);
_clippingStencil->drawSolidRect(Vec2::ZERO, _contentSize, Color4F::GREEN); // Fix issue #1546
}
}