trim border drawing to its precise dimensions