Skip to content

Instantly share code, notes, and snippets.

@arpit-omprakash
Created May 25, 2020 07:58
Show Gist options
  • Save arpit-omprakash/ecf4999bbdac7909717f6aefe4ce0448 to your computer and use it in GitHub Desktop.
Save arpit-omprakash/ecf4999bbdac7909717f6aefe4ce0448 to your computer and use it in GitHub Desktop.
╔════════════════════╦═══════════════════════════════════════════════════════════════════════╗
║ Attribute Name ║ Description ║
╠════════════════════╬═══════════════════════════════════════════════════════════════════════╣
║ myRect.left ║ The int value of the X-coordinate of the left side of the rectangle ║
║ myRect.right ║ The int value of the X-coordinate of the right side of the rectangle. ║
║ myRect.top ║ The int value of the Y-coordinate of the top side of the rectangle. ║
║ myRect.bottom ║ The int value of the Y-coordinate of the bottom side. ║
║ myRect.centerx ║ The int value of the X-coordinate of the center of the rectangle. ║
║ myRect.centery ║ The int value of the Y-coordinate of the center of the rectangle. ║
║ myRect.width ║ The int value of the width of the rectangle. ║
║ myRect.height ║ The int value of the height of the rectangle. ║
║ myRect.size ║ A tuple of two ints: (width, height) ║
║ myRect.topleft ║ A tuple of two ints: (left, top) ║
║ myRect.topright ║ A tuple of two ints: (right, top) ║
║ myRect.bottomleft ║ A tuple of two ints: (left, bottom) ║
║ myRect.bottomright ║ A tuple of two ints: (right, bottom) ║
║ myRect.midleft ║ A tuple of two ints: (left, centery) ║
║ myRect.midright ║ A tuple of two ints: (right, centery) ║
║ myRect.midtop ║ A tuple of two ints: (centerx, top) ║
║ myRect.midbottom ║ A tuple of two ints: (centerx, bottom) ║
╚════════════════════╩═══════════════════════════════════════════════════════════════════════╝
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment