A Core Graphics helper for iOS and OSX