Rigidity of Teichmüller curves