2011-09-20 15 views

Odpowiedz

11

W CoreGrapphics działać CGImageCreateWithImageInRect odpowiadają WithImageInRect sposobu CGImage. API jest podpis:

public CGImage WithImageInRect (RectangleF rect) 

Po przetłumaczeniu z ObjectiveC kod źródłowy powinien wyglądać następująco:

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

Oni nie są faktycznie zgodne ze sobą. CreateWithImageInRect bierze pod uwagę lokalizację rect, natomiast WithImageInRect (wersja mono) uwzględnia tylko rozmiar rect. https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGImage/#//apple_ref/c/func/CGImageCreateWithImageInRect – Gandalf458

Powiązane problemy