In Director Terry Gilliam's 2009 film The Imaginarium of Doctor Parnassus, Depp, Jude Law, and Colin Farrell each played the character initially portrayed by their friend Heath Ledger, who died before the film was completed. All three actors gave their salaries to Ledger's daughter Matilda. The next Depp-Burton collaboration was Alice in Wonderland (2010), in which he played the Mad Hatter alongside Helena Bonham Carter, Anne Hathaway and Alan Rickman. The following year saw the release of the fourth installment in the Pirates series, On Stranger Tides (2011), which was again a box office success. Depp also voiced the title character, a lizard, in the animated film Rango (2011), and returned to Hunter S. Thompson's work with a film adaptation of the novel The Rum Diary, which also became the first project undertaken by his production company, Infinitum Nihil.