I would like to draw on a CGContext by using tiles from CGImage that I would like to draw in a specified order.
According to documentation here it seems that the only method to draw an image in a graphic context is
void CGContextDrawImage (
CGContextRef c,
CGRect rect,
CGImageRef image
);
But this doesn’t take in account the case in which I want to draw just a CGRect of the source image. Do I have to do some tricks to make this work?
If I understand your question correctly then you are asking to crop an image at a particular
CGRect, if so then you need to take a look at this method.This will return you a
CGImageRefand according to your need I think this is what you are looking for.