Created
December 10, 2018 21:59
-
-
Save CalvinLogan/ec6fa19694e8614f2ba1b916c623fd88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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