On Tue, Dec 23, 2008 at 12:44 PM, David Alter wrote:
> Thanks to everyone that has responded to me. It has been a big help.
>
>> > I want to draw in a NSView but not when drawRect is called.
>>
>> Others have pointed this out, but I want to reiterate: no you don't.
>> Trying to draw outside of dra
Thanks to everyone that has responded to me. It has been a big help.
> > I want to draw in a NSView but not when drawRect is called.
>
> Others have pointed this out, but I want to reiterate: no you don't.
> Trying to draw outside of drawRect: will only lead to pain. (It is
> useful, on rare occa
On Mon, Dec 22, 2008 at 4:22 PM, David Alter wrote:
>> > CGContextRef myContext =
>> > (CGContextRef)[[NSGraphicsContext currentContext]graphicsPort];
>>
>> Right now you're getting the current graphics context, which is purely
>> arbitrary. Nothing has set it yet, so you're getting whatever h
>
> > CGContextRef myContext =
> > (CGContextRef)[[NSGraphicsContext currentContext]graphicsPort];
>
> Right now you're getting the current graphics context, which is purely
> arbitrary. Nothing has set it yet, so you're getting whatever happened
> to be hanging around.
Is there a way to crea
On Fri, Dec 19, 2008 at 7:20 PM, David Alter wrote:
> I want to draw in a NSView but not when drawRect is called.
Others have pointed this out, but I want to reiterate: no you don't.
Trying to draw outside of drawRect: will only lead to pain. (It is
useful, on rare occasions. You are not experien
On 20 Dec 2008, at 11:20 am, David Alter wrote:
I want to draw in a NSView but not when drawRect is called.
Why? There are very few situations when this is required or appropriate.
To do this I
understand that I need to call lockFocus before drawing and
unlockFocus
after. The drawing appe
On Dec 19, 2008, at 6:20 PM, David Alter wrote:
I want to draw in a NSView but not when drawRect is called. To do
this I
understand that I need to call lockFocus before drawing and
unlockFocus
after. The drawing appears to happen but it is not until I
deactivate the
window do I see my resu
I want to draw in a NSView but not when drawRect is called. To do this I
understand that I need to call lockFocus before drawing and unlockFocus
after. The drawing appears to happen but it is not until I deactivate the
window do I see my results. How can I get it to refresh once I have done my
draw