[Drawkit] Is it "Touch" time?

Graham Cox graham.cox at bigpond.com
Mon Jul 27 19:42:55 PDT 2009

The main problem for porting DK to the iPhone, which remains, is that  
the core drawing that DK does is heavily based on NSBezierPath rather  
than the lower level CGPath interfaces. Likewise DK uses  
NSGraphicsContext over CGContext, NSColor over CGColor and NSImage  
over CGImage.

If porting were attempted it would probably make most sense to  
recreate these objects rather than rewrite DK to use the CoreGraphics  
approach directly, simply because of the large amount of code that  
extends and uses NSBezierPath, and while we do not have access to the  
source of these, they are mostly simple wrappers around the CG code  
anyway, so it would be feasible to do, if a substantial effort.

I'm unsure why Apple chose to drop these from the iPhone APIs as they  
don't cause a major performance hit and are easier to use than the CG  
counterparts, but that's for them to know and us mortals to merely  
speculate and wonder. If I'd have known that Apple were planning to  
take this direction when I started DK I might have done things  
differently, but they didn't make that decision public until the SDK  
was released as usual.

We could also all file bug reports asking for the iPhone APIs to  
include NSBezierPath and the other higher level graphics APIs. You  
never know...


On 28/07/2009, at 8:47 AM, Dick Applebaum wrote:

> AIR, the response I got from Graham was that the iPhone OS did not  
> contain the necessary APIs/Frameworks to facilitate porting-- making  
> the port effort a major rewrite (and distraction).
> In the interim several things have happened:
> -- The iPhone Hardware has been improved, specifically CPU, GPU,  
> Compass and Camera
> -- The iPhone OS has been enriched, incorporating more APIs from Mac  
> OSX and new iPhone APIs and OpenGL ES 2.0
> -- Apple claims that much of SnowLeopard has been re-implemented in  
> Cocoa
> -- Evidence is that Snow Leopard is incorporating some APIs and  
> frameworks from the iPhone (they share some amount of a common code  
> base)
> Now, there are lots of rumors that Apple will soon announce a  
> MultiTouch 10" Tablet device for delivery this year (lots of  
> supplier rumors support this).
> So, given this:
> Is it practical, and is it time to port DrawKit to the Touch  
> interface?

More information about the Drawkit mailing list