discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug with addSubview ??


From: Paddy Smith
Subject: Re: bug with addSubview ??
Date: Sat, 10 Feb 2007 15:17:25 +0000

On 2/10/07, Paddy Smith <padski@gmail.com> wrote:
D'oh!  I really thought I'd checked that the origins coming in there were 0,0.
I just figured I'd want them if I moved to another frame of reference (like
if I ditch views).

So the NSRect that is passed in is the frame in terms of the containing
coordinates (which makes sense I suppose, otherwise you could just send
a size :-)) and what it buys you is precisely what I'm trying to do(!), the
ability to draw directly in the view, which is done in terms of *that*
coordinate
system.  And the view having its own frame of reference is more or less just
sugar that makes it a handy weapon to point at your feet ;-)

sorry, feeling a bit slow today. the rect in drawRect is origin 0,0 for a view
(ie in terms of that view's frame of reference). apologies for blathering on :-)

but thanks once again, my code works beautifully now :-)

Regards,
Paddy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]