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:
parent
a4e03bdad1
commit
fc29df83b5
1 changed files with 10 additions and 12 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue