Automatically change size() to fullScreen()

I’m looking for a preprocessor for Processing code that reliably changes size() calls into fullScreen() calls preserving the passed renderer.

Does anyone know of a related project? Thanks.

I would like to this to improve the Openframe-Processing extension as described here earlier.

1 Like

Does this answer your question?

	@Override
	public void size(int width, int height) {
		fullScreen();
	}
	
	@Override
	public void size(int width, int height, String renderer) {
		fullScreen();
	}
2 Likes

Thanks @micycle! That’s awesome. I will add it to the Processing code instead of replacing the size() calls with regex in the code.

I just slightly modified it to preserve the renderer:

  @Override
  public void size(int width, int height) {
    fullScreen();
  }
  
  @Override
  public void size(int width, int height, String renderer) {
    fullScreen(renderer);
  }
1 Like