What determines a leaf's shape?

What determines a leaf's shape?