我可以知道CGPoint
内是否有CGImageRef
吗?
或者我应该以其他格式转换CGImageRef
?
更新
maskcontext = CGBitmapContextCreate(currentM, w,
h,
bitsPerComponent, bytesPerRow, colorSpace,
kCGImageAlphaNone);
maskImage = CGBitmapContextCreateImage(maskcontext);
其中currentM
是unsigned char
,maskcontext
是CGContextRef
maskImage
是CGImageRef
,我想知道rect
。
答案 0 :(得分:2)
你能得到你的形象框架吗?然后你可以这样做:
CGRectContainsPoint ( CGRect rect, CGPoint point )
查看该点是否在该帧内。