MonoTouch 中的 CGImageCreateWithImageInRect 相当于什么?

发布于 2024-12-05 10:15:41 字数 222 浏览 1 评论 0原文

MonoTouch 中 CGImageCreateWithImageInRect iOS 方法的等效项是什么?

我正在尝试在 C# 中转换此 Objective-C 行:

CGImageRef sampleImageRef = CGImageCreateWithImageInRect(self.CGImage, fillRect);

提前致谢!

What is the equivalent of CGImageCreateWithImageInRect iOS method in MonoTouch?

I'm trying to convert this Objective-C line in C#:

CGImageRef sampleImageRef = CGImageCreateWithImageInRect(self.CGImage, fillRect);

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

山有枢 2024-12-12 10:15:42

CoreGrapphics函数CGImageCreateWithImageInRect对应于CGImageWithImageInRect方法。 API 签名是:

public CGImage WithImageInRect (RectangleF rect)

从 ObjectiveC 翻译后,您的源代码应如下所示:

 CGImage sampleImageRef = this.CGImage.WithImageInRect (fillRect);

The CoreGrapphics function CGImageCreateWithImageInRect correspond to the WithImageInRect method of CGImage. API signature is:

public CGImage WithImageInRect (RectangleF rect)

Once translated from ObjectiveC your source code should look like:

 CGImage sampleImageRef = this.CGImage.WithImageInRect (fillRect);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文