Re: Image Sizing

2015-01-01 Thread Uli Kusterer
On 31 Dec 2014, at 14:04, Charles Jenkins cejw...@gmail.com wrote:
 I have a non-retina Mac and no experience knowing what happens to graphics 
 when used on a retina screen. I bought PixelCut's PaintCode as a Christmas 
 present to myself so that my images could be made resolution-independent, but 
 I'm having quite a bit more difficulty getting good results than I imagined, 
 partly because of Cocoa issues.  

 You’re aware that you can usually try out Retina on a non-Retina Mac, right? 
As long as you have a sufficiently large screen, you can use Quartz Debug.app 
to turn on Retina sizes for your screen, then choose a Retina resolution in the 
Displays System Preference (Resolution: Scaled, then you get a list of 
resolutions).

 It’s a bit annoying because if you switch a 2560x1440 screen to 2x, you get 
all applications thinking they’re 1280x720, which is just a tad too small to 
pass for a MacBook Air 11” (1366x768), so some stuff is cut off, but all 
rendering in your app will be Retina, so you can see what happens, if at a 
magnified size.

 You might also be able to run AirDisplay or something equivalent on your iPad 
to add a (slow) second Retina display to your Mac, it’s been ages since I even 
considered that option.

 First, am I right that there is no way to ask an NSToolbar or NSToolbarImage 
 what size its graphic should be? In searching the documentation, I found it 
 seems to say toolbar images come in two sizes, 32x32 or 24x24, and if they 
 need to be different, the toolbar will pick the closest provided one and 
 scale it. I hate hard-coding sizes like this, but am I right there's no other 
 option?

 All images on Retina essentially work like icons. You provide 1x (32x32px and 
24x24px) variants of your images, and also add 2x variants (which would be 
64x64px and 48x48px, so still 32x32pt and 24x24pt). You can just add 
multi-representation TIFFs that contain all the sizes, and NSImage will pick 
the best one for where it’s drawn. PaintCode should be able to generate such 
multi-resolution TIFFs for you (Opacity certainly does, and has presets for the 
various icon types that export all required sizes).

 Second, what about images in a Source View? Mine appear at 17x17 in the NIB. 
 Are they always that size, even on a retina screen, or do I need to learn how 
 to deal with the possibility of a changing size? I haven't yet been able to 
 find any documentation on this at all, but that may only mean I used the 
 wrong search keywords.

 You can probably assume the *point* size will stay this way, but you still 
need to provide 2x representations.

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Image Sizing

2015-01-01 Thread Gleb Dolgich
Duet adds a connected iPad as a second display which you can set to use Retina 
resolution. I just tried it and it seems to work pretty well with only a slight 
lag. I bought Duet with the main purpose of testing my apps at the Retina 
resolution without having to switch the main display to one.

http://www.duetdisplay.com

-- 
Gleb


 On 1 Jan 2015, at 14:55, Uli Kusterer witness.of.teacht...@gmx.net wrote:
 
 You might also be able to run AirDisplay or something equivalent on your iPad 
 to add a (slow) second Retina display to your Mac, it’s been ages since I 
 even considered that option.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Image Sizing

2015-01-01 Thread Charles Jenkins
Thank you all for that good information. :-)  

I once had AirDisplay for my iPad, so I need to re-download it and see what I 
need to do to get it going with Yosemite.

—

Charles Jenkins

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Image Sizing

2014-12-31 Thread Charles Jenkins
I have a non-retina Mac and no experience knowing what happens to graphics when 
used on a retina screen. I bought PixelCut's PaintCode as a Christmas present 
to myself so that my images could be made resolution-independent, but I'm 
having quite a bit more difficulty getting good results than I imagined, partly 
because of Cocoa issues.  

First, am I right that there is no way to ask an NSToolbar or NSToolbarImage 
what size its graphic should be? In searching the documentation, I found it 
seems to say toolbar images come in two sizes, 32x32 or 24x24, and if they need 
to be different, the toolbar will pick the closest provided one and scale it. I 
hate hard-coding sizes like this, but am I right there's no other option?

Second, what about images in a Source View? Mine appear at 17x17 in the NIB. 
Are they always that size, even on a retina screen, or do I need to learn how 
to deal with the possibility of a changing size? I haven't yet been able to 
find any documentation on this at all, but that may only mean I used the wrong 
search keywords.  

Finally, I asked the folks at PixelCut to add an option to have stroke drawn 
inside a path instead of centered on it. The advantage would be that your 
graphic and the frame that contains it could then be the same size. Right now 
the graphics need to be somewhat smaller than their frames, which can introduce 
problems when you make the graphics scalable. Someone from PixelCut responded 
that they are considering an inner-stroke option. If you happen to use 
PaintCode and think an inner stroke would be a good idea, please consider 
contacting their support department and adding your vote for the feature.

—  

Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Image Sizing

2014-12-31 Thread Ken Thomases
On Dec 31, 2014, at 7:04 AM, Charles Jenkins cejw...@gmail.com wrote:

 First, am I right that there is no way to ask an NSToolbar or NSToolbarImage 
 what size its graphic should be? In searching the documentation, I found it 
 seems to say toolbar images come in two sizes, 32x32 or 24x24, and if they 
 need to be different, the toolbar will pick the closest provided one and 
 scale it. I hate hard-coding sizes like this, but am I right there's no other 
 option?

Here are Apple's guidelines for designing graphics for toolbar items:
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/ToolbarIcons.html

Note that there are two types of toolbar items, image items and view items, and 
they have different design requirements.  The two types are further explained 
elsewhere in the HIG:
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowTitleBarToolbar.html
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/ControlsAll.html#//apple_ref/doc/uid/2957-CH46-SW2


 Second, what about images in a Source View? Mine appear at 17x17 in the NIB. 
 Are they always that size, even on a retina screen, or do I need to learn how 
 to deal with the possibility of a changing size? I haven't yet been able to 
 find any documentation on this at all, but that may only mean I used the 
 wrong search keywords.  

In the AppKit release notes for 10.7, in the section on NSTableView and 
NSOutlineView 
https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKitOlderNotes/#10_7TableView,
 under the header Implementing Sidebar Source Lists with NSOutlineView it 
says:

There is no direct way to know the image size for the icons. If you use 
NSTableCellView in a View Based NSOutlineView, then the cell will automatically 
be setup with the correct sizes when the rowSizeStyle is set. If this is not 
sufficient, then you can make the assumption for the following sizes: 
NSTableViewRowSizeStyleSmall = 16x16, NSTableViewRowSizeStyleMedium = 18x18, 
and NSTableViewRowSizeStyleLarge=32x32.

Don't forget to test your source view at each of the possible settings for 
Sidebar icon size in the General pane of System Preferences.

 Are they always that size, even on a retina screen, or do I need to learn how 
 to deal with the possibility of a changing size?

Sizes of screens, windows, views, and images are generally measured in points, 
not pixels.  Same with all of the drawing primitives.  Points are a virtualized 
coordinate system.  Things don't change their size in points when displayed in 
high-resolution.

Regards,
Ken


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com