Location
All Locations in pyDraw are wrapped with this class, however some methods and constructors will automatically convert tuples to Locations automatically.
Initialization
location = Location(0, 0) # Two arguments
location = Location((200, 100)) # A single tuple
location = Location(another_location) # Copy constructor
location = Location(x=100) # Create a location at (100, 0)Values
location.x() # Get the x-coordinate
location.y() # Get the y-coordinatelocation[0] # Get the x-coordinate
location[1] # Get the y-coordinateChanging Locations
Advanced
Last updated