我使用CIContext
方法- (void)drawImage:(CIImage *)im inRect:(CGRect)dest fromRect:(CGRect)src
将我的图像绘制到屏幕上。但我需要实现放大/缩小方法。我怎么能实现它?我想放大可以实现增加dest
矩形,因为苹果的文档说:CIContext drawImage:inRect:fromRect:scaling
The image is scaled to fill the destination rectangle.
但怎么样缩小?因为如果dest
矩形按比例缩小,则图像将以实际大小绘制,但只有图像的一部分可见(然后适用于dest
矩形的部分)。
你能提出什么建议?
您是否真的尝试过并观察该行为,或者您只是在猜测可能发生的事情? –
我已经试过了 – hockeyman