MCPcopy Create free account
hub / github.com/benfry/processing4 / setFrameCentered

Method setFrameCentered

core/src/processing/awt/PSurfaceAWT.java:685–690  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

683
684
685 private void setFrameCentered() {
686 // Can't use frame.setLocationRelativeTo(null) because it sends the
687 // frame to the main display, which undermines the --display setting.
688 frame.setLocation(screenRect.x + (screenRect.width - sketchWidth) / 2,
689 screenRect.y + (screenRect.height - sketchHeight) / 2);
690 }
691
692
693 /** Hide the menu bar, make the Frame undecorated, set it to screenRect. */

Callers 1

placeWindowMethod · 0.95

Calls 1

setLocationMethod · 0.65

Tested by

no test coverage detected