On Jan 31, 2005, at 5:38 PM, Edwards, Waverly wrote:
I'm currently looking at migrating from Quickdraw to CoreGraphics.
You'll definitely want to join the quartz-dev list then and be sure to
check some of the archives there. Some of the issues you mention below
have been extensively discussed in the past.
I've been reading Quartz 2D References today and I'm not too clear on
current limitations of CG.
Quartz is very capable, but simply had different design goals in mind.
The idea of user experience was clearly not one of the original goals.
Lots of bugs were put into Radar regarding that and Tiger looks to be
addressing some of the API gaps.
My app will be drawing thousands of polygons and lines, circles,
squares, etc (but mostly polygons) to represent a map (roads, bodies
of water, interstates, cities, states etc)
I am not finding any API's for polygon drawing
Polygons are just paths.
A way to test what polygon my mouse is currently over.
There really isn't any good solution like that in Quartz -- that's one
of those design goal issues. The quartz-dev archives have some good
suggestions for dealing with hit testing. In general though hit testing
on panther and earlier is almost entirely your responsibility.
A way to test if an object is within a particular region ( a free hand
lasso or rectangle)
Nothing like that in Quartz, though the solution to this is just a
different version of the question of a single point being in a CGPath
CG Paths don't really seem to be as effective as regions as I'm
understanding them.
What exactly do you need regions for? I would recommend getting away
from them completely if possible. If for no other reason than they
don't support floating point coordinates, and if Mac OS X ever has a
user scalable interface, this will be a big deal.
CGPaths and clipping should give you pretty much everything regions did.
As it stands now, it does not look like a good idea to even try using
CG as all the functionality associated with QD does not exist within
CG.
I disagree - now is the time to do so. Find out what APIs you really
need that you have to roll your own for an get bugs reported to Apple
so Quartz can be as API rich as possible in Tiger. If you don't ask
know, you may have to wait MUCH longer to get what you want.
Besides, if you don't try to map everything you do in QD 1-1 to Quartz,
you might find different ways to achieve the results you want. You
really want to work with Quartz the way it was designed, trying to
force it to be like QD is a path of madness and frustration :)
Am I overlooking something or should I wait to see what will be added
to CG in future OS releases?
Never assume!
First, I'd ask these questions on quartz-dev where a lot of people can
help
Second, check the quartz-dev archives for some of these issues,
especially regarding hit testing
Third, be sure to talk about what you're trying to achieve -- the "big
picture", not the details of trying to move your QD code to Quartz.
There may be new ways of doing things that you'd never think to ask
about.
Having moved to Quartz I couldn't imagine going back to Quickdraw now.
Especially with some simple C++ wrappers around the API. (search this
carbon-dev list for UContext to get an idea of what I've done in that
respect -- makes the CG APIs really painless)
Good luck
Bryan
_______________________________________________
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