That's how kEventControlDraw is supposed to work. It redraws the
view whenever it needs redrawing. What you really want to do is
create a CGBitmapContext, draw into that, and then create a
CGImageRef from that which the HIImageView will draw. Or just do
your *complete* drawing in a custom view's kEventControlDraw.
What I want to do is to draw directly (no buffering, no
cgbitmapcontext) into a hiview, but I don't want the old things I
drawed in to be erased (otherwise I had to build a history of my
drawings which would make it very slow). Is there a possibility to
do that?
Whenever your window is resized, its backbuffer has to be recreated.
So unless you use a CGBitmapContext, there is no buffer that you can
rely on being there.
So, I guess you have to use a bitmap context or CGImage.
You can use HIViewSetNeedsDisplayInRect() to mark only part of the
view as needing redraw, and check the event parameters to only copy
over this area of your CGBitmapContext.
Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden