Joseph Duchesne
2005.08.19, 11:12 AM
Hi, I'm having problems with resizing my NSView. When I make it smaller, it doesn't clear the old area where it was drawn. Example:
What I don't want (http://www.staronesw.com/temp/Picture%204.pdf)
What I do want (http://www.staronesw.com/temp/Picture%205.pdf)
I got the second image by simply shrinking the window to the dock and popping it back. That cleared the crap.
The code I'm using is:
[self setFrameSize:NSMakeSize(x,y)];
self being the NSView.
My second problem is totally unrelated... I'm trying to load a 300DPI file into an NSImage, but it seems to be scaling it to 72DPI before it draws even though I'm telling it not to change the image data
image=[NSImage imageNamed:@"test"];
[image setDataRetained:YES];
[image setCachedSeparately:YES];
Is there anything I'm doing wrong?
What I don't want (http://www.staronesw.com/temp/Picture%204.pdf)
What I do want (http://www.staronesw.com/temp/Picture%205.pdf)
I got the second image by simply shrinking the window to the dock and popping it back. That cleared the crap.
The code I'm using is:
[self setFrameSize:NSMakeSize(x,y)];
self being the NSView.
My second problem is totally unrelated... I'm trying to load a 300DPI file into an NSImage, but it seems to be scaling it to 72DPI before it draws even though I'm telling it not to change the image data
image=[NSImage imageNamed:@"test"];
[image setDataRetained:YES];
[image setCachedSeparately:YES];
Is there anything I'm doing wrong?