Fixup coordinated of cursor hotpoint for MacOS-X compatibility.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25631 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-11-29 11:34:41 +00:00
parent 1906ff781f
commit f3b17f8ff7
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2007-11-29 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSCursor.m: ([-initWithImage:]) changed to use a hot point
at 0,0 rather than 0,15 for MacOS-X compatibility ... the coordinate
system of a cursor is flipped according to the MacOS-X docs.
2007-11-27 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (-replyToApplicationShouldTerminate:):

View file

@ -309,21 +309,23 @@ NSCursor *getStandardCursor(NSString *name, int style)
*/
- (id) init
{
return [self initWithImage: nil hotSpot: NSMakePoint(0,15)];
return [self initWithImage: nil hotSpot: NSMakePoint(0,0)];
}
/**<p>Initializes and returns a new NSCursor with a NSImage <var>newImage</var>
and a hot spot point with x=0 and y=15.</p>
and a hot spot point with x=0 and y=0 (top left corner).</p>
<p>See Also: -initWithImage:hotSpot:</p>
*/
- (id) initWithImage: (NSImage *)newImage
{
return [self initWithImage: newImage
hotSpot: NSMakePoint(0,15)];
hotSpot: NSZeroPoint];
}
/**<p>Initializes and returns a new NSCursor with a NSImage <var>newImage</var>
and the hot spot to <var>hotSpot</var>.</p>
<p>NB. The coordinate system of an NSCursor is flipped, so a hotSpot at
0,0 is in the top left corner of the cursor.</p>
<p>See Also: -initWithImage: -setImage:</p>
*/
- (id) initWithImage: (NSImage *)newImage hotSpot: (NSPoint)hotSpot
@ -360,7 +362,9 @@ backgroundColorHint:(NSColor *)bg
[super dealloc];
}
/**<p>Returns the hot spot point of the NSCursor</p>
/**<p>Returns the hot spot point of the NSCursor. This is in the
* cursor's coordinate system which is a flipped on (origin at the
* top left of the cursor).</p>
*/
- (NSPoint) hotSpot
{