Re: erasing, redrawing NSBezierPath into and NSImage problem
Re: erasing, redrawing NSBezierPath into and NSImage problem
- Subject: Re: erasing, redrawing NSBezierPath into and NSImage problem
- From: "Louis C. Sacha" <email@hidden>
- Date: Tue, 6 Jul 2004 13:09:48 -0700
Hello...
It looks like you are creating a new image every time drawLabels is
called, and you aren't doing anything with it.
Instead of creating a new image, you need to either somehow get a
reference to the existing images being used in the matrix and do your
redrawing in those images, or after you've created and drawn the
images you need to tell the matrix to use them instead of the old
images.
Hope that helps,
Louis
Following is my code for drawing the labels:
- (void)drawLabels
{
...
someLabel = [[NSImage alloc]
initWithSize:NSMakeSize(cellWidth, cellHeight)];
[someLabel lockFocus];
...
[someLabel unlockFocus];
[labelMatrix setNeedsDisplay: YES];
}
Will
_______________________________________________
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.