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

8 commits

Author SHA1 Message Date
reuk
641497918c
Direct2D: Always call SetTransform for gradient/image brushes
This partly reverts commit ad28684b10.
Prior to that change, getBrush() would always end up calling
SetTransform on gradient/image brushes. This is important because, when
drawing text, we combine the current brush transform with the text
transform. If we don't reset the brush transform each time, these
transforms end up accumulating across frames.
2025-09-09 11:32:00 +01:00
attila
ad28684b10 Tidying: Remove unused code 2025-08-19 16:51:15 +01:00
attila
35fe3ac714 Direct2D: Fix gradient fill when the brush is transformed with not just translation
The code contains a performance optimisation for cases where the world
transform is translation only. In this case instead of applying the
brush transformation first and then the world translation, the order is
reversed. The translation is applied first and then the brush
transformation.

Flipping the transformations however is only correct in the special case
when both transformations are translation only.
2025-08-19 16:51:15 +01:00
attila
bb5a9cbac9 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.
2025-08-19 16:51:15 +01:00
reuk
43c9f28d59 Direct2D: Move ScopedGeometryWithSink to Direct2DGraphicsContextImpl.cpp 2025-04-24 13:58:24 +01:00
reuk
2aed72d0d7 Direct2D: Move paintPrimitive implementation into Direct2DGraphicsContext 2025-04-24 13:58:24 +01:00
reuk
b061d5f5a4 Direct2D: Hide D2D SavedState in .cpp file 2025-04-24 13:58:24 +01:00
reuk
93d227b6af Direct2D: Split declaration and definition of Direct2DGraphicsContext::Pimpl 2025-04-24 13:58:24 +01:00