optimize path drawing (check for bounds intersection)