mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Direct2D: Fix wrong brush transform calculation
This change is practically a no-op, because if the affected branch is taken, then the world transform was not applied, so transform is a unity matrix. But if transform was non-unity, then the wrong ordering would cause an observable error. Logically the brush transformation is nested inside the world transformation so the right order is applying the brush transform first followed by the world transform.
This commit is contained in:
parent
270063ac31
commit
bb5a9cbac9
1 changed files with 2 additions and 2 deletions
|
|
@ -480,7 +480,7 @@ public:
|
|||
if (fillType.transform.isOnlyTranslation())
|
||||
translation += Point (fillType.transform.getTranslationX(), fillType.transform.getTranslationY());
|
||||
else
|
||||
transform = transform.followedBy (fillType.transform);
|
||||
transform = fillType.transform.followedBy (transform);
|
||||
}
|
||||
|
||||
if ((flags & BrushTransformFlags::applyInverseWorldTransform) != 0)
|
||||
|
|
@ -513,7 +513,7 @@ public:
|
|||
transform = currentTransform.getTransform();
|
||||
|
||||
if ((flags & BrushTransformFlags::applyFillTypeTransform) != 0)
|
||||
transform = transform.followedBy (fillType.transform);
|
||||
transform = fillType.transform.followedBy (transform);
|
||||
|
||||
if ((flags & BrushTransformFlags::applyInverseWorldTransform) != 0)
|
||||
transform = transform.followedBy (currentTransform.getTransform().inverted());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue