Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing feedback for mouse operations




On Jun 10, 2006, at 2:49 AM, Jerry wrote:


We use a hybrid approach: For drawing of any selections, e.g. selected shape outlines, handles and so on we use an overlay and draw directly into it with a manually-created CGContext. Updates to the main drawing area are done via HIViewSetNeedsDisplay, but for fast painting, we draw directly into the view with a CGContext created in the mouse down handler. This works fine, but Eric has said that it's possible that this will break in the future, although I suspect it won't. We release updates often enough that we'll just fix it when the time comes, if ever.


That sounds like to approach used in Apple's developer example CarbonSketch.  They create an overlay window and draw into that context while tracking the mouse.


Also the MouseTracking demo from last years developer conference might be helpful.



My biggest concern is that

I've been told the context is unreliable during a mouse event.


That's something I don't understand: how mousing could work

properly if there is no proper CGContext (that establishes

coordinate transformations)?


 _______________________________________________
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

This email sent to email@hidden

References: 
 >Re: Drawing feedback for mouse operations (From: Mike Kluev <email@hidden>)
 >Re: Drawing feedback for mouse operations (From: Jerry <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.