Emanuele Sabetta
Emanuele Sabetta

Reputation: 162

What is the equivalent of CGImageCreateWithImageInRect in MonoTouch?

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!

Upvotes: 6

Views: 1641

Answers (1)

poupou
poupou

Reputation: 43553

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

Upvotes: 13

Related Questions