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: Old QuickDraw calls and Quartz 2D



Where does the CGContextRef originally come from?  For example,
if it comes from a Carbon Event, you can often request a
QuickDraw port from the event instead.

Also, if you're really stuck on QuickDraw, you could try doing
all your rendering calls in a side graphics port, and then
extract the image data.  The pixel map can then be passed to a
QuickDraw-compatible API like CreateCGImageFromPixMaps() (from
MacApplication.h), giving you a CGImage that can be rendered
with the CGContextRef.

Kevin G.



This may be a stupid question, but cab the old QuickDraw calls like MoveTo, MacLineTo, PenSize, etc. be used in a CGContextRef? If so how? I took some example code from Apple that shows how to use Quartz (Core Graphics) ad added some code to draw draw a couple of lines, but could not get anythign to display. I know I shoudl be using the the CG calls, and I plan to, but I have some older code that I need to get workign RIGHT away, and then I will modify it over time to use the CG calls.

I'm sure it will be much faster to get the code working to use Quartz now instead of trying to make a QD hack work. It's not that hard at all:


CGContextBeginPath(context);
CGContextMoveToPoint(context, p1.x, p1.y);
CGContextAddLineToPoint(context, p2.x, p2.y);
CGContextStrokePath(context);

_______________________________________________ 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: 
 >Old QuickDraw calls and Quartz 2D (From: James Mitchell <email@hidden>)
 >Re: Old QuickDraw calls and Quartz 2D (From: "Steve Mills" <email@hidden>)
 >Re: Old QuickDraw calls and Quartz 2D (From: Scott Mitchell <email@hidden>)
 >Re: Old QuickDraw calls and Quartz 2D (From: John Stiles <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.