[Pythonmac-SIG] info on CoreGraphics

eric eric@enthought.com
Thu, 18 Apr 2002 14:09:39 -0400


Hey Just,

>
> > I have a rough set of routines that can draw paths (no bezier stuff) and
text
> > written in wxPython (the first target platform).  I'm to the point where I
> > need to start testing "corners" of the design, and I'd like to compare with
> > how quartz handles them.
> >
> > So, to this point, I've been writing little routines in C using Project
> > Builder to generate a PDF file that I can look at to see what Quartz does
> > (I've attachedone at the end).  I'd really rather write these in
(Mac)Python,
> > and it seems like it should be possible.  I see a Carbon.CoreGraphics
module,
> > but I didn't find anything but constants in it.  Am I looking in the wrong
> > place for the CoreGraphics routines, or have they just not made it into the
> > package yet?
>
> Carbon.CoreGraphics is the constants module, the funcitonality is in
Carbon.CG.
> The wrapper is by no means complete (eg. CGPDFContextCreate() isn't there
> yet...), but your input and contributions are very welcome!

I'm using MacPython 2.2.1, and Carbon.CG only appears to have 2 methods,
CGContextRefType and CreateCGContextForPort.  Are things like CGContextRotateCTM
and CGContextAddLines supported somewhere yet?

Also, I didn't see a CoreGraphics demo running around.  If you have some code
that
excercises these routines, I'd appreciate the example.

thanks,
eric