Re: NSRect to QDRect and back
Re: NSRect to QDRect and back
- Subject: Re: NSRect to QDRect and back
- From: David Remahl <email@hidden>
- Date: Wed, 27 Jun 2001 08:23:46 +0200
Are there build in Carbon functions to convert from NSRect to Rect and
Rect to NSRect?
How would you suggest that would be done, as they have different
starting points (coordinate systems)? Anyway, you can do what ever you
want quite easily since both Rect and NSRect are regular data
structures, so you could do
Rect macRect;
NSRect nextRect;
macRect.l = 0;
macRect.t = 0;
macRect.r = nextRect.size.width;
macRect.b = nextRect.size.height;
or use any of the regular carbon convenience functions (and/or the
NSRect convenience functions).
/ david