What is equivalent to CGImageCreateWithImageInRect in MonoTouch?

What is equivalent to CGImageCreateWithImageInRect iOS method in MonoTouch?

I am trying to convert this Objective-C string to C #:

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

Thanks in advance!

+5
source share
1 answer

Function CoreGrapphics CGImageCreateWithImageInRect corresponds to the method WithImageInRect CGImage . API Signature:

public CGImage WithImageInRect (RectangleF rect)

After translating from ObjectiveC, your source code should look like this:

 CGImage sampleImageRef = this.CGImage.WithImageInRect (fillRect);
+11
source

All Articles