If the background image is an image returned from stretchableImageWithLeftCapWidth:topCapHeight: (UIImage), the cap widths are calculated from that information, otherwise, the cap width is calculated by subtracting one from the image???s width then dividing by 2.