let draw_text () ~color ?name ~size ~x ~y text =
    set_color color;
    set_text_size size;
    moveto x y;
    begin match name with
      None -> ()
    | Some name' -> set_font name'
    end;
    draw_string text