LockFocus

Pixel Aligning

October 22nd, 2009

When you’re drawing graphics in your app, something that’s really important to make them look good is to pixel align them. This is the process of making sure all of the boundaries for a shape line up exactly with the screen’s pixel grid.

Read more »

Another Way to Mimic the Artwork Column in Cocoa

October 4th, 2009

Jesper’s recent post about mimicking the iTunes Artwork Column in Cocoa piqued my interest. It seemed like it should be possible to do this just within the confines of an NSTableView.

Read more »

Fun with Compositing Operations

April 27th, 2009

Graphics in Cocoa have a powerful but rarely used feature: compositing operations. These are similar to blend modes in the PDF format and in many graphics editing programs. They let you easily do some interesting things…

Read more »

Compiling Opacity Images

May 29th, 2008

Opacity is great for creating graphics for use in applications, but how do you ship those images with the application? Including the .opacity file itself would be bad (that would be like shipping your source code with the application), a native image format like TIFF would be better. At the same time, though, it’d be nice to be able to directly edit a .opacity source file and not have to manually rebuild the associated .tiff file each time. Luckily there’s an easy way to make this happen automatically with Opacity.

Read more »

Why Opacity?

May 14th, 2008

I few months ago I released Opacity, a new graphics editor. With all of the other graphics editors available on Mac OS X, I want to write a little about why I thought it was necessary to create Opacity.

Read more »

Drawing Between the Lines

April 23rd, 2008

Mac OS X has a wealth of graphics frameworks. From the PDF-based Quartz to AppKit to the filter-based Core Image, there’s something for everybody. Unfortunately, these frameworks each do things a little differently, which can lead to trouble when getting them to work with each other. There are system-provided ways to convert between some of these different types, but not for others. I put together a few categories with methods to make it easier for these frameworks to all get along.

Read more »

A (Slightly) Improved NSTableView

April 11th, 2008

While working on Lexicon and Opacity, I’ve used NSTableViews a lot. They work very well, but there are a few convenient behaviors that they don’t have out of the box.

Read more »

Dynamic Sparkle Release Notes

May 29th, 2006

By now I’m sure all Mac OS X developers have heard of Sparkle – the excellent auto-updating framework by Andy Matuschak. When I added Sparkle to Lexicon, I only ran into one problem. The release notes that Sparkle displays are decided by what version you are updating to, but they should depend only on what version you are updating from.

Read more »