1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Direct2D: Slightly shrink excluded clip regions in order to draw transformed opaque components without border artefacts

This commit is contained in:
reuk 2024-05-13 17:59:31 +01:00
parent e11b8f5ccb
commit 06137fb7f5
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -912,7 +912,7 @@ void Direct2DGraphicsContext::excludeClipRectangle (const Rectangle<int>& userSp
if (transform.isOnlyTranslated)
{
// Just a translation; pre-translate the exclusion area
auto translatedR = transform.translated (userSpaceExcludedRectangle.toFloat());
auto translatedR = transform.translated (userSpaceExcludedRectangle.toFloat()).getLargestIntegerWithin().toFloat();
if (! translatedR.contains (frameSize))
{
@ -923,7 +923,7 @@ void Direct2DGraphicsContext::excludeClipRectangle (const Rectangle<int>& userSp
else if (currentState->isCurrentTransformAxisAligned())
{
// Just a scale + translation; pre-transform the exclusion area
auto transformedR = transform.boundsAfterTransform (userSpaceExcludedRectangle.toFloat());
auto transformedR = transform.boundsAfterTransform (userSpaceExcludedRectangle.toFloat()).getLargestIntegerWithin().toFloat();
if (! transformedR.contains (frameSize))
{