Replaced deprecated drawing method.