NSBitmapImageRep questions
NSBitmapImageRep questions
- Subject: NSBitmapImageRep questions
- From: Rolando Abarca <email@hidden>
- Date: Mon, 14 Jun 2004 23:44:03 -0400
I'm implementing a drawing engine, and I need to access the pixels of a
NSView, so I'm using NSBitmapImageRep to do that. So far, it's working,
but it's a bit slow.
I have a timer, with interval 1/30.0 (30 fps?) that calls a method of
my NSView subclass, this methods performs some calculations on a matrix
that represents the screen. After I've done all my calculations, I
update the image rep, then call [self setNeedsDisplay:YES] to update
the view. In drawRect: I call [rep draw] to draw the representation...
I thought that the problem was in the copy of the matrix to the bitmap,
so I implemented a "dirty-rect" thing, to update only the rects that
were changed, but it didn't help.
Is there a better option to [rep draw] to update the view with the
image representation?
tia.
regards,
Rolando Abarca.-
Departamento de Ciencias de la Computacion
Facultad de Ciencias Fisicas y Matematicas
Universidad de Chile
_______________________________________________
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.