Real Software Forums
http://forums.realsoftware.com/

Figureshape Fill does not work in Windows
http://forums.realsoftware.com/viewtopic.php?f=1&t=48032
Page 1 of 1

Author:  kermit [ Sat Jun 01, 2013 1:52 am ]
Post subject:  Figureshape Fill does not work in Windows

Using 2012R2
Windows Home Prem 7


In the paint event of a canvas, I create a figureshape by adding an array of points

I set the color to &cFF0000
I add the points
I set the .Fill to 50
Then g.drawshape thefigureshape

And it is solid, not transparent.
Any value lower than 50, its invisible, over 50 it is solid.


The same code on the Mac gives me a properly transparent shape.
ANyone know why that might be?

Author:  Karen [ Sat Jun 01, 2013 10:11 am ]
Post subject:  Re: Figureshape Fill does not work in Windows

Set app.UseGDIPlus to true

- Karen

Author:  kermit [ Sun Jun 02, 2013 1:22 am ]
Post subject:  Re: Figureshape Fill does not work in Windows

Thanks Karen.
Seems odd to have to resort to that, but it got me there.

It works now.


Couple of interesting points that make me still think this is a bug:

a) In another part of the application, I have identical code on another canvs, and it work perfectly without GDIPlus (yes, checked very carefully)
b) I tried GDIPlus around my code at one point and it didnt make any difference.

What I have now, (and it didn't work until I did things this way, I could start removing things until it stops working again, but I wasted a day on this already)

in the Paint event of my canvas, I

create a new picture of the same size as the canvas.
Set app.GDIPlus to true
Draw all my painting on the new picture
g.drawpicture my new picture to the graphics contaxt of the paint event
GDIPlus = false
exit sub

Author:  Markus Winter [ Sun Jun 02, 2013 2:08 am ]
Post subject:  Re: Figureshape Fill does not work in Windows

kermit wrote:
Seems odd to have to resort to that, but it got me there.

Windows did not support true transparency, you had to fake it. That changed with GDIplus. So it's not odd but was a limitation of Windows.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/