Swift CGContext wrapper