Extensions for CoreGraphics written in Swift