Generalize set_dash to support offsets