[Pyobjc-dev] NSGraphicsContext.graphicsPort
Brought to you by:
ronaldoussoren
From: Robert K. <rk...@uc...> - 2005-04-19 07:35:25
|
[Moderator: please ignore same message posted from GMane] The current behavior of the NSGraphicsContext.graphicsPort method is to return a CGContextPtr instance from the Apple-built CoreGraphics wrappers. With any non-Apple Python installation, like Bob's build of Python 2.4.1, this module does not exist. I have found that the CoreGraphics module is quite limited and totally unsuited for actual drawing, which would be the primary use case for the object returned from NSGraphicsContext.graphicsPort. So I wrote my own, more complete, and Pythonic CoreGraphics bindings using Pyrex. I grabbed the address of the pointer from the CGContextPtr object. However, with 2.4.1, this doesn't work. I would like to propose adding a keyword argument to this method to control the output. sillySwigThing = myContext.graphicsPort(rawptr=True) To save hassle, I am happy with parsing the SWIG string encoding of the pointer address that is already built. If this change is acceptable, I can draw up the patch myself. Thank you. -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |