• 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: NSRect, views....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRect, views....


  • Subject: Re: NSRect, views....
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Wed, 27 Aug 2003 17:51:36 +0100

On Wednesday, August 27, 2003, at 04:13 pm, April Gendill wrote:

> Oh, my...
> This is no small affair...
> Looks like I've opened a can of worms here.

Not at all. It's very straight-forward; if you find it difficult, it's
probably because you think it should be... it really isn't.

Here's a picture that should help:

[demime 0.98b removed an attachment of type application/pdf which had a name of pastedGraphic3.pdf]
The origin of rectangle A is (2.0, 2.0), whilst its size is (4.0, 3.0).
To get an NSRect corresponding to it, you'd do

NSRect rectA = NSMakeRect (2.0, 2.0, 4.0, 3.0);

Similarly for B and C you'd write

NSRect rectB = NSMakeRect (8.0, 3.0, 6.0, 3.0);
NSRect rectC = NSMakeRect (5.0, 7.0, 7.0, 2.0);

If the view (the outer box) is flipped, then you take the vertical
measurements from the top rather than from the bottom.

> By the way what is Appkido? is it a third party frame work? or a
> information source or a typo?

It's a *very* useful program that lets you browse the Cocoa
documentation. Here's a URL:

http://homepage.mac.com/aglee/downloads/

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSRect, views....
      • From: April Gendill <email@hidden>
References: 
 >Re: NSRect, views.... (From: April Gendill <email@hidden>)

  • Prev by Date: Re: Odd Quicktime Problem
  • Next by Date: A NSTextSecureField clone
  • Previous by thread: RE: NSRect, views....
  • Next by thread: Re: NSRect, views....
  • Index(es):
    • Date
    • Thread