Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Oct 21, 2017 4:15 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Figureshape Fill does not work in Windows
PostPosted: Sat Jun 01, 2013 1:52 am 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Figureshape Fill does not work in Windows
PostPosted: Sat Jun 01, 2013 10:11 am 
Offline

Joined: Fri Sep 30, 2005 8:53 am
Posts: 1002
Set app.UseGDIPlus to true

- Karen


Top
 Profile  
Reply with quote  
 Post subject: Re: Figureshape Fill does not work in Windows
PostPosted: Sun Jun 02, 2013 1:22 am 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Figureshape Fill does not work in Windows
PostPosted: Sun Jun 02, 2013 2:08 am 
Offline

Joined: Sun Feb 19, 2006 4:00 pm
Posts: 1282
Location: Heidelberg, Germany
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group