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

Direct2D: Fix fillAlphaChannelWithCurrentBrush when the source position is non-zero

This commit is contained in:
attila 2025-04-11 20:05:55 +02:00 committed by Attila Szarvas
parent 087f915595
commit c786e6160c

View file

@ -1208,7 +1208,8 @@ void Direct2DGraphicsContext::clipToImageAlpha (const Image& sourceImage, const
// Make a transformed bitmap brush using the bitmap
// As usual, apply the current transform first *then* the transform parameter
ComSmartPtr<ID2D1BitmapBrush> brush;
auto matrix = D2DUtilities::transformToMatrix (brushTransform);
const auto pageTransform = AffineTransform::translation (pagesAndArea.area.getTopLeft()).inverted();
auto matrix = D2DUtilities::transformToMatrix (pageTransform.followedBy (brushTransform));
D2D1_BRUSH_PROPERTIES brushProps = { 1.0f, matrix };
auto bitmapBrushProps = D2D1::BitmapBrushProperties (D2D1_EXTEND_MODE_CLAMP, D2D1_EXTEND_MODE_CLAMP);