Problem with NSView drawing
Problem with NSView drawing
- Subject: Problem with NSView drawing
- From: Nicolas Cottaris <email@hidden>
- Date: Tue, 12 Feb 2002 14:48:05 -0800
Hello,
I have a question about drawing in NSView. If another application covers
part of my application, and I move the other application window so that
there is
no overlap between the two windows, it takes a while for my application
to redraw
its NSView. Some times it even doesn't redraw it unless I click on it.
What is the problem? Aren't the contexts of an NSView stored so that
when uncovered they can be redrawn instantaneously?
My drawRect implementation is shown below. Basically it fills a large
array of
NSBezierPath paths with a color.
What am I doing wrong?
- (void)drawRect:(NSRect)rect
{
if (rect.origin.y < 20) {
for (t = 0; t < rawRFrows; t++)
for (x = 0; x < rawRFcols; x++) {
findex = (int)(100.0 * rawRF[rf_type][x][t] + 0.5);
r = LUT[RF_LUT][0][findex];
g = LUT[RF_LUT][1][findex];
b = LUT[RF_LUT][2][findex];
[[NSColor colorWithCalibratedRed:r green:g blue:b
alpha:1] set];
[XTrf[rf_type][x][t] fill];
}
}
}
Nicolas P. Cottaris
_______________________________________________
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.