Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
.gitignore
LICENSE
README.md
_config.yml
centered_figure.py
readme.content.md
readme.json

README.md

Pygame toolbox

Pygame toolbox

Toolbox for pygame

@ppizarror License GPL v3 Python 2.7

Toolbox for pygame, contains functions and classes to manipulate figures, points, sounds, etc.

File Description
centered_figure.py Create figure with a (x,y) center. Detects collision, and plots into pygame surface.

Usage

  • centered_figure

    triangle = CenteredFigure([(0, 0), (0, 1), (0, 3)], [10, 10])
    square = CenteredFigure([(0, 0), (0, 1), (1, 1), (1, 0)], [10, 10])
    
    triangle.collide(square) # true
    triangle.rotate(15)      # Rotate 15 grads Counterclockwise
    triangle.scale(10)       # Multiply 10 to all vertices position

Requirements

  • Pygame
  • Shapely
    • Windows users:
      Download Shapely whl and install it through pip.
    • Linux users:
      pip install shapely
    • OSX users:
      pip install shapely==1.6b2

License

This project is licensed under GPLv3 [https://www.gnu.org/licenses/gpl-3.0.html]

Author

Pablo Pizarro R. | 2017