NSDrawNinePartImage
is for drawing a single thing that's divided into nine aligned sections like a tic-tac-toe/noughts-and-crosses board.
The primary use case for that is a rounded-rectangle UI element, such as a button. You'd have four fixed-size corners, four uniaxially-stretchable sides, and one biaxially-stretchable center.
That doesn't fit with what you're describing. Three center columns?
If the two extra columns should be fixed in horizontal size, then put each end's images together into a single image per corner and per side. Then use NSDrawNinePartImage
as normal.
If the two extra columns are part of the center column and so should be horizontally stretchable, then I suggest that you use NSDrawThreePartImage
from inside an NSCustomImageRep subclass and use an instance of that subclass for each of three center-column part images. Then use NSDrawNinePartImage
as normal.
(Substitute “rows” for “columns” and “vertically” for “horizontally” in the previous three paragraphs if you want.)