Calculate canvas scaling