MonoTouch 中 CGImageCreateWithImageInRect iOS 方法的等价物是什么?
我正在尝试在 C# 中转换此 Objective-C 行:
CGImageRef sampleImageRef = CGImageCreateWithImageInRect(self.CGImage, fillRect);
提前致谢!
最佳答案
CoreGraphics 函数CGImageCreateWithImageInRect 对应于CGImage 的WithImageInRect 方法。 API 签名是:
public CGImage WithImageInRect (RectangleF rect)
从 ObjectiveC 翻译后,您的源代码应如下所示:
CGImage sampleImageRef = this.CGImage.WithImageInRect (fillRect);
关于c# - MonoTouch 中 CGImageCreateWithImageInRect 的等价物是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7487067/