DrawPicture on Windows is rotating where on Mac it does not

Okay, so I’ll be as specific as I can while trying to maintain the secrecy of what I’m working on.

I’m drawing a vertical gradient, 1px wide with a variable height, but for the sake of this post we can set it at a static 20px.
It’s a vertical gradient, so stretching it sideways causes no defects, it’s a common technique on the web.

So on Mac, DrawPicture takes this gradient and stretches it sideways beautifully.
On Windows, it looks like DrawPicture is rotating it 90 degrees clockwise before stretching.

Unbelievable!
I’m hoping, so very much, that it’s my code.

g.DrawPicture(GradientPicture, 0, 6, me.width, 20, 0, 0, 1, 20)

(yes, I want it to be 6px down from the top)

What do you allthink?

Your code looks good to me

I’ve not seen it rotate on Windows
The IDE would be hugely impacted if this existed

Tim,
Is GDI+ enabled and is GradientPicture an Alpha Picture (i.e. created without a bit depth)?

[quote=261104:@William Yu]Tim,
Is GDI+ enabled and is GradientPicture an Alpha Picture (i.e. created without a bit depth)?[/quote]
Yes, GDI+ is on and the picture is created without a bit depth.
I do not use transparency in the picture though (if that’s useful data for you)

[quote=261102:@Norman Palardy]I’ve not seen it rotate on Windows
The IDE would be hugely impacted if this existed[/quote]
It’s a subtle gradient, it took me a few minutes to actually verify that it was sideways.
I’m sure my squinting face was quite comical >_>

as a test, have you tried

  • a not so subtle gradient…
  • an image more than 1 pixel wide

[quote=261116:@Tim Parnell]Yes, GDI+ is on and the picture is created without a bit depth.
I do not use transparency in the picture though (if that’s useful data for you)

It’s a subtle gradient, it took me a few minutes to actually verify that it was sideways.
I’m sure my squinting face was quite comical >_>[/quote]

Ah yes, I believe it’s related to this case feedback://showreport?report_id=43220. Unfortunately this fix did not make it into 2016r1.

Confirmed that is the issue I’m seeing.
Turned the gradient to red-blue per Dave’s suggestion and it was much more obvious.

Thank you all.