Skip to content

Instantly share code, notes, and snippets.

@CalvinLogan
Created December 10, 2018 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CalvinLogan/ec6fa19694e8614f2ba1b916c623fd88 to your computer and use it in GitHub Desktop.
Save CalvinLogan/ec6fa19694e8614f2ba1b916c623fd88 to your computer and use it in GitHub Desktop.
def setUp():
global window
window = Display("Visualizer", getScreenWidth(), getScreenHeight())
gradient = Rectangle(0, 0, getScreenWidth(), getScreenHeight(), Color.BLACK, True, 1)
window.add(gradient)
updateColor(gradient)
#input: None
#return: the width of the screen
def getScreenWidth():
return Toolkit.getDefaultToolkit().getScreenSize().width
#input: none
#return: the height of the screen
def getScreenHeight():
return Toolkit.getDefaultToolkit().getScreenSize().height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment