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

Canvas View really large?


  • Subject: Canvas View really large?
  • From: Rick Langschultz <email@hidden>
  • Date: Wed, 28 Jan 2009 02:09:57 -0600

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);


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


  • Follow-Ups:
    • Re: Canvas View really large?
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: Is there a more efficient way to get the first 4 bytes off a NSInputStream to compare
  • Next by Date: drag the whole window just by dragging the Image placed on it
  • Previous by thread: Re: XCode Debugger - a couple of questions from newbie
  • Next by thread: Re: Canvas View really large?
  • Index(es):
    • Date
    • Thread