Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Sep 21, 2017 1:42 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Retina support (RS2012r1), where is it?
PostPosted: Sun Nov 25, 2012 4:07 am 
Offline
User avatar

Joined: Thu Jul 27, 2006 6:31 pm
Posts: 1698
Location: Monterey, CA
I'm on Real Studio 2012 r1, where is retina support? I create a new project, compile as Cocoa, run the app, and it's not retina. The IDE isn't even retina!

The following blog post claims this release would support retina:
http://www.realsoftwareblog.com/2012/06 ... pport.html

If it supports it, where is it? Is there a hidden build setting I need to enable? Something I'm overlooking? What gives?

Thank you.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Sun Nov 25, 2012 5:34 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Change the info.plist so that your app is marked to support retina. Than draw picture buffers with double resolution.

Please google for details.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Sun Nov 25, 2012 7:42 am 
Offline

Joined: Mon Apr 10, 2006 3:02 am
Posts: 52
tomis wrote:
I'm on Real Studio 2012 r1, where is retina support? I create a new project, compile as Cocoa, run the app, and it's not retina. The IDE isn't even retina!

The following blog post claims this release would support retina:
http://www.realsoftwareblog.com/2012/06 ... pport.html

If it supports it, where is it? Is there a hidden build setting I need to enable? Something I'm overlooking? What gives?

Thank you.


Hi,

You have missed the example

http://www.realsoftwareblog.com/2012/10 ... plays.html


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Wed Mar 27, 2013 1:41 pm 
Offline
User avatar

Joined: Sat Feb 27, 2010 8:45 pm
Posts: 39
MonkeybreadSoftware wrote:
Change the info.plist so that your app is marked to support retina. Then draw picture buffers with double resolution.

Please google for details.

Greetings
Christian


it's always a bad sign for a forum to point to google when "realstudio retina support" brings you back here :). That's a search recursion (sort of :P). Don't get me wrong but the best resource to get information is this forum and the OP is totally right (still is!).

Realstudio 2012 r2.1 still doesn't support retina displays as of today. And with "support" I mean the IDE itself and the apps you create with it. The IDE looks like crap on a retina display. All text in the IDE looks crippled and sort of magnified; even the window decoration looks magnified compared to other apps. I feel the need to get new glasses. It's in a state where I'd say "unusable". I wanted to renew my old license because I really liked and used realstudio in the past (2010) but the current version is just unusable with a retina display.

In the blog RS tells you to add the following to your Info.plist just before the last closing dict element:
<key>NSHighResolutionCapable</key>
<string>true</string>


I tried that for the realstudio IDE but it simply doesn't work. This key is already included in the Info.plist for the IDE. For my own apps this works perfectly but I still have this fugly IDE that's far away from "good" now. The IDE also doesn't support the "new" fullscreen mode which is useful for me.

It's also bad to debug your newly created app because build automation is only available in the enterprise edition and with the professional edition you are stuck with the non-retina app (or you edit the Info.plist file each time you "build and run" the app). Awesome.

What a pita. A single checkbox like "enable retina display support" and it would add this entry in the Info.plist itself each time you build your app but no.

I'm a bit angry as you might have noticed but that's because I loved realstudio in the past. It was an exception in the software world and now it's unusable for me.

Phew :(.


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Wed Mar 27, 2013 2:23 pm 
Offline

Joined: Mon Aug 15, 2011 10:25 pm
Posts: 293
I believe the IDE is still a Carbon app, so there may be issues with Retina that will not be addressed as RealStudio is moving to Cocoa.. Here is some further info from an Apple mailing list.. You may also require OS X 10.7 and greater for the Retina support..

http://web.archiveorange.com/archive/v/ ... EAJ4nJjyTG
http://www.realsoftwareblog.com/2012/10 ... plays.html

_________________
Real Studio 2012r1.1 | MacBook Pro i5, 10.6.8 | Windows 7


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Wed Mar 27, 2013 9:03 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
There is a couple of things that you need to understand in order to get your application Retina Ready, and it's possible with RS2012r2.1 (download the demo of Shine from http://www.ohanaware.com/shine) to see a Retina Ready Real Studio application.

#1 The current IDE is still a Carbon based application, while there are things that you can do to make a Carbon application Retina Ready, I have not tried as Cocoa is the way forward (not to mention that there are Sandboxing bugs with Carbon apps). So the IDE as it stands is NOT Retina Ready.

#2 The Cocoa Framework is Retina Ready, but it may still require extra work on your behalf.

#3 Adding the plist key to a Cocoa made application via an IDE Script of wrapping tool (such as App Wrapper), will tell the OS to use Retina when available.

All system supplied controls draw in Retina. If you are using a custom control based on a Canvas, as long as you use the graphics functions in the paint event, it will draw in Retina. If you are drawing images in your canvas, you need to draw a double sized image down. So if you're drawing a 32x23 image, it needs to be 64x64. For most things, this works well, however icons and such may not draw quite so elegantly and in which case you should figure out if you _need_ to draw the high resolution image in the first place. This can be done by using a declare and some structures.
Declare function CGContextConvertRectToDeviceSpace lib kLibrary (context as integer, inRect as CGRect ) as CGRect
Dim CGContextRef as integer = g.handle( graphics.HandleTypeCGContextRef )
Dim userRect as CGRect = CGRectMake( 0, 0, regular.width, regular.Height )
Dim deviceRect as CGRect = CGContextConvertRectToDeviceSpace( CGContextRef, userRect )

if deviceRect.area.Width = regular.Width then
g.drawPicture regular, X, y, w, h, 0, 0, regular.Width, regular.Height
else
g.drawPicture hiDPIVersion, x, y, w, h, 0, 0, hidpIVersion.Width, hidPIVersion.height
end if


You'll need to create a structure with 4 singles, called CGRect.

ToolBars:
If you are using toolbars, you can pass them 64x64 images as the icons.

ListBoxes:
RowPicture is not retina ready, to get retina icons in a listbox, you need to override the cellTextPaint event and include code for drawing the icon and then text.

Menus:
This one is tricker, I found the solution was to use the MBS plug-in (There's an example included with the plugin), where it intercepts the menu creation, extracts the NSImage and set's the size on the NSImage. I think you might even be able to do this with the MacOSLib, as basically you're registering to receive a Notification via the NSNotificationCenter "NSMenuDidAddItemNotification", then acting upon it.

This should be enough to get you started, if you are using your own declare library for drawing graphics, then double check what functions you use, as Apple warn not all APIs are Retina Ready.

The best solution for drawing images:
Is to use either the MBS or MacOSLib or your own declares to get a NSImages, as the OS will then pick the correct version for you, with no extra work on your behalf.

I'm thinking of writing this all up into a guide to help others get their apps Retina Ready. If you have any questions then please feel free to ask.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Wed Mar 27, 2013 11:02 pm 
Offline
Real Software Engineer

Joined: Fri Jan 28, 2011 5:24 pm
Posts: 145
rowlands wrote:
This one is tricker, I found the solution was to use the MBS plug-in (There's an example included with the plugin), where it intercepts the menu creation, extracts the NSImage and set's the size on the NSImage. I think you might even be able to do this with the MacOSLib, as basically you're registering to receive a Notification via the NSNotificationCenter "NSMenuDidAddItemNotification", then acting upon it.


This isn't guaranteed to work going forward. The notification will still be sent, but it's possible the image could be altered after. If you do go down this route and it happens to keep working, you should at least copy the NSImage, set the size of that, and then assign it back to the NSMenuItem.

_________________
Joe Ranieri
Mac Frameworks & Compiler
REAL Software, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Retina support (RS2012r1), where is it?
PostPosted: Wed Mar 27, 2013 11:11 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
jranieri wrote:
rowlands wrote:
This one is tricker, I found the solution was to use the MBS plug-in (There's an example included with the plugin), where it intercepts the menu creation, extracts the NSImage and set's the size on the NSImage. I think you might even be able to do this with the MacOSLib, as basically you're registering to receive a Notification via the NSNotificationCenter "NSMenuDidAddItemNotification", then acting upon it.


This isn't guaranteed to work going forward. The notification will still be sent, but it's possible the image could be altered after. If you do go down this route and it happens to keep working, you should at least copy the NSImage, set the size of that, and then assign it back to the NSMenuItem.


Thanks for the tip Joe.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 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