Hi, I’ve run into a pretty strange bug when using g.setFillType(fillType)
in conjunction with fillType
’s transform
member.
In certain DAWs, applying a certain AffineTransform
s to FillType::transform
and then using that FillType
for a Graphics
context results in the fill being placed incorrectly. It seems to vary based on the position of the component being drawn into - it always draws correctly if the component is at 0,0
, but not anywhere else.
I’ve observed the bug in Live and Pro Tools. It does not occur in a standlone app, nor in Reaper, Cubase, and Studio One. Weirdly, changing the Display Scaling on my machine (100% up through 200%) doesn’t change the result in the misbehaving DAWs.
Here’s a screenshot of what I expect to see when using a gradient for the FillType
, taken in Cubase (with a scale()
transform applied to stretch the x-axis and squish the y-axis of the fill):
And here’s what happens in e.g. Live:
This only happens when using the Direct2D renderer on Window - no issue on Mac, nor when forcing the plugin to use the software renderer on Windows. FillType
s containing Image
and ColourGradient
are affected.
Perhaps one clue is that the “Hello World” is rendered much crisper in the “behaving” instance (seemingly HiDPI), whereas it’s fuzzier in the “misbehaving” instance (seemingly not HiDPI). So perhaps Direct2D is not accounting for some scale factor properly?
Here are the files for a minimal example:
RadialComp.h (1014 Bytes)
PluginEditor.h (750 Bytes)
PluginEditor.cpp (1.1 KB)