Use anchorX and anchorY instead of setReferencePoint
Whitespace