How to find out what the current rectMode is using code?