On Aug 10, 2007, at 05:13, Christiaan Hofman wrote:

> I'm still somewhat confused about window/screen coordinates. In my
> opinion the docs are inconsistent. So what are the coordinates of the
> window frame and window contentrect?
> 1. relative to the absolute coordinate screen
> 2. relative to the coordinates of the screen on which it is supposed
> to be drawn?
>
> In the docs it says that the frame and contentRect are both relative
> to "screen coordinates", what's that, 1 or 2? I would expect 2,
> otherwise I wouldn't even know how to move a window to another
> screen. Also this seems to be suggested by many sample codes (though
> never explicitly stated). However the initWithContentRect:...screen:
> method says that the contentRect is relative to the lower left corner
> of the screen. So that's 1.

I've always thought screen coordinates matched 1, because of this  
statement, and that window frame would have to be relative to 1.  The  
screen: parameter on initWithContentRect:styleMask:backing:defer:screen:
suggests that 2 is correct, though (and why isn't the method with more  
parameters documented as the designated init?).

> And how is screen resolution taken into account?

I have no idea.  These are probably good questions for a dev list,  
since the docs give you just enough rope to hang yourself.  I've also  
seen acknowledgments by Apple engineers on the xcode list that AppKit  
has bugs in switching displays and resolutions (or something like  
that), just to make life more interesting.

-- 
Adam


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
skim-app-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-develop

Reply via email to