Skip to content

{ Category Archives } Macintosh

Sling Blade Runner

Lately, I’ve been without a project to keep me busy at nights (hence all my blog posts). I’m learning python, but since my main gig is C/C++, I like to keep those skills sharp with little puzzles. While looking for interesting coding puzzles, I stumbled across a page at ITA Software that asks [...]

Is an NSPoint in an NSBezierPath?

There’s a shortcoming in NSBezierPath that bugged me for years — there is no easy way to tell if an NSPoint is in the bezier path. Fear not, here is a category on NSBezierPath that supplies a function for finding whether or not a point is in an NSBezierPath.
 
{
if([myBezierPath pointInStroke:thePoint])
[...]