New topic: 

Drawing Bug XP 2K?

<http://forums.realsoftware.com/viewtopic.php?t=9348>

       Page 1 of 1
   [ 6 posts ]                 Previous topic | Next topic         Author  
Message       Karen           Post subject: Drawing Bug XP 2K?Posted: Fri Nov 
24, 2006 3:49 pm                        
Joined: Fri Sep 30, 2005 8:53 am
Posts: 691              I'm running on VPC so could someone confirm this on a 
real PC?... it's a subtle but potentially important visual bug that can 
particularly bite Mac Xplatform developers because it's easy not to notice when 
doing a quick check of  your app on a PC. 
 
If you create a picture and set transparent = 1 (white areas are transparent - 
this is so you don't need to make a mask - very convenient and I do it often), 
on a Mac it works perfectly - for g.drawpicture, for menu Icons and bevelbutton 
icons... 
 
In R4 in XP and 2K (at least on VPC) that is broken and white shows up as white 
 That is true for for g.drawpicture, for menu Icons and bevelbutton icons... 
 
"For XPlatform that just works" that is bad... 
 
All I did was put a bevelButton on the default window and give ita property P 
as picture and in Window.Open: 
Code:
P = New Picture(16,16,32)
P.Graphics.DrawRect(0,0,16,16)
P.Transparent = 1
EditCopy.Icon = P
EditCut.Icon = P
Self.Backdrop = P
BevelButton1.Icon = P

 
 
And Enabled EditCopy (so I could see enabled and disabled menu items) 
 
 
So can someone confirm? 
 
 
Thanks, 
- Karen   
                            Top               Karen           Post subject: 
Posted: Fri Nov 24, 2006 4:46 pm                        
Joined: Fri Sep 30, 2005 8:53 am
Posts: 691              
http://www.realsoftware.com/feedback/viewreport.php?reportid=nbwywbuo[/url]   
                            Top               piMaster           Post subject: 
Posted: Fri Nov 24, 2006 4:49 pm                               
Joined: Fri Sep 30, 2005 9:12 am
Posts: 672
Location: Rockford, IL              I can confirm that the code you posted 
doesn't work as expected. 
 
However, I have a big program that uses the transparent property and it does 
work. My big project simply loads the image from the hard drive and then sets 
the transparent property. When I wrote a small project (using the same image 
and process), the transparent property doesn't seem to be working.     
_________________
RB2009r4 Pro on Win XP  
                            Top               piMaster           Post subject: 
Posted: Fri Nov 24, 2006 5:13 pm                               
Joined: Fri Sep 30, 2005 9:12 am
Posts: 672
Location: Rockford, IL              I've been doing some experimenting, and 
found that the transparent property works until you assign the picture to a 
menuitem. After that, it doesn't seem to recognize the transparent property. 
 
Try the following in the window open event: 
Code:dim p as Picture
p=NewPicture(50,50,32)
p.Graphics.ForeColor=&cffffff
p.Graphics.FillRect(0,0,50,50)
p.Graphics.ForeColor=&c0000ff
p.Graphics.FillOval(0,0,40,40)
p.Transparent=1
BevelButton1.Icon=p
//EditCopy.Icon=p
 
Run it and it works fine. Uncomment the last line and it doesn't work.     
_________________
RB2009r4 Pro on Win XP  
                            Top               Karen           Post subject: 
Posted: Fri Nov 24, 2006 5:21 pm                        
Joined: Fri Sep 30, 2005 8:53 am
Posts: 691              So the MenuItem Class is the problem! 
 
Thanks, 
- Karen   
                            Top               Razieltje           Post subject: 
Re: Drawing Bug XP 2K?Posted: Wed Oct 28, 2009 9:57 am                        
Joined: Thu Dec 18, 2008 4:18 am
Posts: 5
Location: Belgium - Bruges              i seem to be having the same problem in 
my current app

If I use an icon and place it in the menuItem, it gets a white background. 
If I load it in the bevelbutton, it works.

This code is in the action event of a bevelbutton
Code:
Dim mi As New MenuItem
Dim mii As New MenuItem
Dim pic As Picture

mii.Text = "Test"
pic = GetIcon(ICONBULLET_ADD, 16, 16) 'This returns a transparent icon
me.Icon = pic
mii.Icon = pic
mi.Append mii

mii = mi.PopUp()



Result shows the small icon in the button, w/o background, and with a white bg 
in the menuitem. To increase the problem, running this same code on a XP does 
result in a correct view.


Information
RB 2009r4 (Professional Edition)
Windows Vista Business   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 6 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to