Actress Ellen Page says that she was inspired to come out gay by the prospect of making the upcoming film Freeheld.

In Freeheld, Page plays Stacie Andree, whose domestic partner Lieutenant Laurel Hester (played by Julianne Moore) is fighting for the right to leave her Ocean County, New Jersey police pension to Andree as she faces a diagnosis of terminal lung cancer.

Page, 28, who came out gay last year during a speech at an HRC-sponsored LGBT youth conference, told BuzzFeed News that she was inspired by the real-life people portrayed in the film.

“First of all, I didn't want to be a closeted person anymore,” she said. “But then also: 'What, are you going to not be an out gay actor when you shoot a movie like that?' Of course not. And it is people like Stacie and Laurel that inspire you.”

Filming the movie “was a special experience for me personally: What it represented in my life. It was nice to play a gay person. I'm gay! It was nice to fall in love with a person onscreen who is the kind of person that you'd fall in love with.”