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.
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…
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.
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.
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.
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.