remove unused graphics ptr calculation function