Added more gernality to graphics vector utils.