Search code examples
cocoansimage

Cocoa Compositing Together Images


I recall that there was this one method that could piece together an image, like a button, from 3 different images - one left side, the middle that would be stretched, and the right side. I think there was something like that that takes 10 images too, but I'm not sure.

The point is, does anyone know the API call that did that, and if not, how could I go about drawing a simple button from 3 different images?

Thanks.


Solution

  • I think you're looking for the AppKit function NSDrawThreePartImage. There are several drawing functions in a similar vein.