Re: Drawing in Cocoa
Re: Drawing in Cocoa
- Subject: Re: Drawing in Cocoa
- From: "M. Uli Kusterer" <email@hidden>
- Date: Fri, 5 Dec 2003 14:24:17 +0100
At 13:53 Uhr +0100 05.12.2003, Ivan Myrvold wrote:
I was dreaming about a drawing program that you use to draw all the
objects you want, and then dump all the coordinates to a file, and
use these coordinates to draw this in a custom view in Cocoa.
Is this just a dream, or have anyone else been thinking along the same lines?
Have you looked at the "Sketch" Example? It should have been
installed somewhere in your /Developer/Examples/ folder when you
installed the developer tools.
It doesn't do Bezier paths yet, but it shouldn't be too hard to add
an SKTBezierPath graphic class and add the necessary code to allow
placing points.
PS - Note that Sketch has a small bug: It draws on .0 coordinates,
instead of .5. which means that straight lines end up "between"
pixels and look very blurry. An easy solution is to change the
bezierPath methods of all basic shapes to offset the bounds rect by
0.5 before actually drawing their shape.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.