CLOSE SEARCH

[Snippet] Draw Font using Quartz

– (void)drawFont:(CGContextRef)context
{

CGContextSelectFont(context, “Georgia”, 24.0, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1);

CGAffineTransform xForm = CGAffineTransformMake(1.0, 0.0, 0.0, -1.0, 0.0, 0.0);
CGContextSetTextMatrix(context, xForm);
CGContextShowTextAtPoint(context, 10, 30, “Georgia”, strlen(“Georgia”));

}

Filed under: iOS