Hey all,
I do a lot with vector based graphics. Below is one of those, which is oddly wrong on Windows when using Direct2D. On mac, or on Windows using openGL or the software rendering engine, it renders correctly (the lower image).
In this case, an image is created and then flipped to form the bottom half of the waveform you see.
For whatever reason, the vertical flip doesn’t seem to work when using D2D.
The relevant code is below:
g.drawImageWithin(turntableImage, 0, 0, getWidth(), getHeight()/2, RectanglePlacement::stretchToFit);
g.addTransform(AffineTransform::verticalFlip(getHeight() / 2).translated(0, getHeight() / 2));
g.drawImageWithin(turntableImage, 0, 0, getWidth(), getHeight() / 2, RectanglePlacement::stretchToFit);
I should mention, I am using the latest release build (8.0.12).
reuk
January 20, 2026, 9:58pm
3
This is on our radar, I have a fix in progress at the moment.
1 Like
reuk
January 22, 2026, 10:41am
4
Thanks for reporting, a fix for this issue has been published:
committed 06:26PM - 21 Jan 26 UTC
Previously, drawing a mirrored image would produce incorrect results.
Scaling tr… ansforms were applied correctly, but mirroring was not. The
following code is an example of a drawing routine that previously
produced incorrect results.
g.fillAll (juce::Colours::grey);
juce::Image image { juce::Image::PixelFormat::ARGB, 512, 512, false };
{
juce::Graphics h { image };
h.setGradientFill (juce::ColourGradient { juce::Colours::cyan,
{},
juce::Colours::magenta,
{ 512, 512 },
false });
h.fillAll();
}
const auto cy = getHeight() / 2;
g.drawImageWithin (image,
0,
0,
getWidth(),
cy,
juce::RectanglePlacement::stretchToFit);
const auto transform = juce::AffineTransform::verticalFlip ((float) cy)
.translated (0, (float) cy);
g.addTransform (transform);
g.drawImageWithin (image,
0,
0,
getWidth(),
cy,
juce::RectanglePlacement::stretchToFit);
1 Like