Draw a 9-slice shape, stretch it without distorting the image/corners.
Performance friendly and perfect for UI elements.