So, I use CGBitmapContext to adapt the software blitter to iOS. I write my data into a bitmap, then I use the CoreGraphics functions to write text through a CGBitmapContext. Software blitter uses Upper Left Hand Origin, while CoreGraphics features use lower left hand start. Therefore, when I draw an image using the blitter in (0, 0), it appears in the upper left corner. When I draw text using CG in (0, 0), it appears in the lower left corner and DO NOT WRONG. Yes, I read all other questions about coordinate inversion, and I do this with the resulting CG image to display it correctly in the view. Perhaps a sample code will help ...
screen->write(image, ark::Point(0, 0));
CGContextShowTextAtPoint(
cgcontext,
0, 0,
str.c_str(),
str.length());
CGImageRef screenImage = CGBitmapContextCreateImage(cgcontext);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextTranslateCTM(context, 0, 480);
CGContextScaleCTM(context, 1, -1);
CGContextDrawImage(context,
CGRectMake(0, 0, 320, 480), screenImage);
CGContextRestoreGState(context);
CGImageRelease(screenImage);
? ULC?