开发者

What is the equivalent of CGImageCreateWithImageInRect in MonoTouch?

开发者 https://www.devze.com 2023-04-05 23:44 出处:网络
What is the equivalent of CGImageCreateWithImageInRect iOS method in MonoTouch? I\'m trying to convert this Objective-C line in C#:

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!


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消