• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mouse position from NSEvent starts at (0, 1) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse position from NSEvent starts at (0, 1) ?


  • Subject: Re: Mouse position from NSEvent starts at (0, 1) ?
  • From: "Joshua Pennington" <email@hidden>
  • Date: Fri, 18 May 2007 15:10:31 -0500

I took a look at your code.

When drawing the cross, if you create a path instead of drawing rects,
the cross is properly aligned. Like so:

NSBezierPath *cross = [NSBezierPath bezierPath];

NSPoint startVerticalLine = {x, y - 100};
NSPoint endVerticalLine = {x, y + 100};

[cross moveToPoint:startVerticalLine];
[cross lineToPoint:endVerticalLine];

NSPoint startHorizontalLine = {x - 100, y};
NSPoint endHorizontalLine = {x + 100, y};

[cross moveToPoint:startHorizontalLine];
[cross lineToPoint:endHorizontalLine];

[cross stroke];

On 5/18/07, Mathieu Coursolle <email@hidden> wrote:
The crosshair's hot point is defined as the intersection of the cross,
but my drawing
is offset by one pixel in the Y direction.

My application is available at:
www.rogue-research.com/vtk/TestCursor.zip
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Mouse position from NSEvent starts at (0, 1) ?
      • From: "Mathieu Coursolle" <email@hidden>
References: 
 >Mouse position from NSEvent starts at (0, 1) ? (From: "Mathieu Coursolle" <email@hidden>)
 >Re: Mouse position from NSEvent starts at (0, 1) ? (From: Uli Kusterer <email@hidden>)
 >Re: Mouse position from NSEvent starts at (0, 1) ? (From: "Mathieu Coursolle" <email@hidden>)

  • Prev by Date: Re: Core Data application types
  • Next by Date: Re: Mouse position from NSEvent starts at (0, 1) ?
  • Previous by thread: Re: Mouse position from NSEvent starts at (0, 1) ?
  • Next by thread: Re: Mouse position from NSEvent starts at (0, 1) ?
  • Index(es):
    • Date
    • Thread