Hello,
I'm new to this list (and OS X programming in general) but it seemed
the place to start. I hope you can help.
My employer, a small 10 person company, has an application that was
ported from OS 9 CodeWarrior C++ to OS X Carbon Xcode. I've been
tasked to transition the app from the existing QuickDraw drawing
environment to Quartz. The Apple documentation describes the Quartz
environment well enough. The documents of interest appear to be:
"Upgrading to the Mac OS X HIToolbox" Upgrading_HIToolbox.pdf
"Quartz Primer" QuartzPrimer.pdf
"Transitioning to Quartz 2D"
"Quartz 2D Programming Guide" drawingwithquartz2d.pdf
Management believes that a simple one-to-one replacement of QuickDraw
calls with Quartz calls is sufficient. "Just encapsulate all the
QuickDraw calls in a class object, and then replace the QuickDraw
calls one at a time." However, the documentation suggests that this
is not only not desirable, but not even possible. Most of the
documentation assumes that one replaces the entire QuickDraw and Apple
Event model, with a nib-based Carbon Event model. However, management
doesn't want to take that big of a bite all at once.
0. Is this the right list to ask about transitioning from QuickDraw?
1. At what level of granularity does it make sense to replace
QuickDraw calls? Each window? Each control? Each region/path? The
need to obtain and release a CGContext suggests a larger granularity,
like a window.
2. Is there any recommended order in which to attack such a
conversion?
3. Can Carbon event handlers coexist with QuickDraw WaitNextEvent
model?
Any suggestions would be greatly appreciated.
I'm in the same boat and have yet to make the transition. The last
couple of WWDCs had a session on this very topic, and will have one
again at WWDC this year. If you don't have a chance to go to WWDC then
I would try to buy a set of DVDs from last year's WWDC. I see them
every now and then on ebay. Just search for WWDC.
How difficult it is to port from QuickDraw depends on how much of
QuickDraw you are using and especially how much interaction there is
with your graphics. For example if you are just rendering some
graphics, say like a chart or graph, and don't require user interaction
your task may not be to difficult. However, if you are doing
interactive graphics it will be a lot more difficult. QuickDraw has an
XOR mode that will let you complement graphics on and off. Quartz has
no such thing. In Quartz you must paint the entire image if you wish
to remove something. This is countered by Quartz now having overlays.
So if you are trying to interactively place something graphic you would
do so by drawing it on an overlay, which can be cleared and redrawn at
the new location as the object moves.
For a particular window which you are drawing graphics into, you will
one to replace all of it and one time. If you are talking about
replacing each of the dialogs with Carbon/Nib based windows you will
also want to do the complete (individual) dialog at one time. We have
150 dialogs and about 80 of them have been converted to Nib based
windows. Because WNE can exist with Carbon based windows you don't
need to do all of them at the same time. However, you would not want
to have a older style dialog and try to replace just a few controls on
it.
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden