slow drawRect not displaying correctly
slow drawRect not displaying correctly
- Subject: slow drawRect not displaying correctly
- From: John Nairn <email@hidden>
- Date: Tue, 11 Apr 2006 12:49:39 -0700
Some graphical output of my scientific application draws many objects
(mostly NSBezierPath's) in an NSView subclass within the drawRect
method. It all works fine until the number of objects gets too large.
When it is too large, some symptoms are:
1. Changing plot data and using [plotView setNeedsDisplay:YES] does
indeed result in drawRect being called, but the plot does not change.
Problems common when more than 2000 objects to draw.
2. Scrolling does not work correctly - the view becomes fragmented
3. Setting scale of the plot in the enclosing NSScrollView with
[[self contentView] scaleUnitSquareToSize:NSMakeSize
(delta,delta)];
[[self contentView] scrollToPoint:origin];
[self reflectScrolledClipView:[self contentView]];
causes drawRect to go again but to draw correctly this time. It still
does not scroll correctly.
---------------
John Nairn (1-541-737-4265, FAX:1-541-737-3385)
Professor and Richardson Chair
Web Page: http://woodscience.oregonstate.edu/faculty/nairn.php (under
construction)
FEA/MPM Web Page: http://oregonstate.edu/~nairnj
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden