Adds draw_in_rect:mode: to emulate UIView.contentMode.