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

Direct2D: Fix an issue with excludeClipRectangle

Without this fix many of the component tests that appear in the
following commit will fail for the Direct2D renderer only.
This commit is contained in:
Anthony Nicholls 2025-11-18 17:27:53 +01:00 committed by Anthony Nicholls
parent a4e03bdad1
commit fc29df83b5

View file

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