3182
Comment: Add a repr for Rect.
|
3189
|
Deletions are marked like this. | Additions are marked like this. |
Line 79: | Line 79: |
))) |
Points & Rectangles
A pair of classes to provide points and rectangles.
Surprisingly, I haven't been able to find a single Python module providing such primitive support.
WxPython supports wxPoint and wxRect, but it lacks many basic functions (such as, say, adding two points together to produce a third point..!)
This code is lacking a zillion essential features (such as "Length"). I only put in the ones I needed immediately. Please add, refactor, optimize, rename stuff to be more standard, etc., as you see fit..!
If there's an actual, accessible, easy-to-include Python module, not tied to a graphics library, that does this stuff already, please write about it here! No sense in reinventing the wheel. I've looked, but haven't found one. Hence this.