New functions for CGContext