Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Oct 17, 2017 1:52 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: My Retina Code Messes With My Windows Builds
PostPosted: Fri May 03, 2013 3:15 pm 
Offline

Joined: Sat Sep 30, 2006 7:05 am
Posts: 33
So, I added support for retina on the Macbook Pro. Text looks great.

I made icons double size and draw them at half size on canvas. This makes them look sharp on retina and fine on normal Macs with no conditional drawing needed. I use code like this in the Canvas.paint event:
g.DrawPicture currentPic, 0, 0, currentPic.Width *.5, currentPic.Height *.5, 0, 0, currentpic.Width, currentPic.Height


However, when running on Windows, my half size icons have unacceptable artifacts from the halving. I assume the Windows graphics renderer is not as spiffy.

Do I need to create 2 versions of all my icons or is there some trick I've missed?


Top
 Profile  
Reply with quote  
 Post subject: Re: My Retina Code Messes With My Windows Builds
PostPosted: Fri May 03, 2013 5:36 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Works/looks just fine for me on Windows 7. Maybe set App.UseGDIPlus to True.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: My Retina Code Messes With My Windows Builds
PostPosted: Sat May 04, 2013 3:52 pm 
Offline

Joined: Sat Sep 30, 2006 7:05 am
Posts: 33
Thanks. Alas, same dodgy result with App.UseGDIPlus

Same for me for Win 7 and Win XP.

Making the image even pixel dimensions helps but some images, like those with repeating straight lines, just don't scale.


Top
 Profile  
Reply with quote  
 Post subject: Re: My Retina Code Messes With My Windows Builds
PostPosted: Sat May 04, 2013 4:09 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
StephenD wrote:
Do I need to create 2 versions of all my icons or is there some trick I've missed?


I believe this will be your best best. I believe that even Apple recommends having 2 sizes of images, 1 for regular and 1 for Retina Display. Scaling doesn't work in all cases.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: My Retina Code Messes With My Windows Builds
PostPosted: Fri May 24, 2013 8:38 am 
Offline

Joined: Sat Sep 30, 2006 7:05 am
Posts: 33
Thanks Bob.

Anyone have suggestions on the best way to manage images?


Top
 Profile  
Reply with quote  
 Post subject: Re: My Retina Code Messes With My Windows Builds
PostPosted: Fri May 24, 2013 11:40 pm 
Offline
User avatar

Joined: Thu Jul 27, 2006 6:31 pm
Posts: 1698
Location: Monterey, CA
Are these images masked? If so, do non-masked images scale without aliasing?

I'm experiencing unacceptable aliasing when scaling masked images under Mac OS X Cocoa builds. However, if I pre-composite to a non-masked picture and scale that instead, I don't have this issue.


------
Edit: It seems Real Studio isn't setting the interpolation correctly on Cocoa. The solution is discussed at viewtopic.php?f=7&t=47968

_________________
ImagePlay Effects Library (40+ image effects in one open source module. No plugins, no dependencies, no restrictions.)
http://imageplay.sourceforge.net/


Last edited by tomis on Tue May 28, 2013 2:53 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: My Retina Code Messes With My Windows Builds
PostPosted: Tue May 28, 2013 6:36 am 
Offline

Joined: Sat Sep 30, 2006 7:05 am
Posts: 33
They're not masked. I'd hate to have to go back to masking my images.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group