Can you get what the current rectMode is?

I want to make a custom rectangle function, and I want to base how it draws the rectangle on what the current rectMode is. Is it possible to get what rectMode the sketch is currently on? Something like

R = rectMode

would return CENTER or some associated number. If it’s not possible I have other options, but this would just make more sense. Thanks for any help!

1 Like
  1. print PGraphics.getDeclaredField('rectMode').get(g) == CORNER
  2. print PGraphics.getDeclaredField('rectMode').get( == CORNER
  3. print PGraphics.getDeclaredField('rectMode').get(this.getGraphics()) == CORNER