• 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: Canvas View really large?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Canvas View really large?


  • Subject: Re: Canvas View really large?
  • From: "email@hidden" <email@hidden>
  • Date: Wed, 28 Jan 2009 13:49:03 +0000


On 28 Jan 2009, at 08:09, Rick Langschultz wrote:

Hello everyone,

I am developing some drawing software and needed some assistance. I have a basic view: TSLabel which is just a small plain view that doesn't really do anything - just a rectangle. This rectangle can be dragged and moved around it's superview - TSCanvasView which is a subclass of a TSZoomView.

Here is my code for a mouseDown: event:

NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
NSLog(@"Mouse Down at X point: %i", mouseLoc.x);
NSLog(@"Mouse Down at Y point: %i", mouseLoc.y);



It won't help that NSPoint.x is declared CGFloat. A %f format specifier should help.


My results are pretty large actually, here is the results:
2009-01-28 02:02:39.548 TestApp[59739:10b] Mouse Down at X point: -2089457256
2009-01-28 02:02:39.549 TestApp[59739:10b] Mouse Down at Y point: -2089602536


I suspect it is because I have the canvas displaying a checkerboard background that checkerboards the TSCanvasView's drawing.

Can anyone tell me why the X, Y coords are so astronomical? And is there any code I should look at. Here are my references:

Sketch.app - Apple Developer Tools / Examples
MySQL Workbench
EFLaceView

Any input, or pointers would be greatly appreciated.

Thanks,
Rick Langschultz
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

Jonathan Mitchell

Central Conscious Unit
http://www.mugginsoft.com




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Canvas View really large? (From: Rick Langschultz <email@hidden>)

  • Prev by Date: Update your app
  • Next by Date: Re: Update your app
  • Previous by thread: Canvas View really large?
  • Next by thread: drag the whole window just by dragging the Image placed on it
  • Index(es):
    • Date
    • Thread