Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shapeobject.py
diff options
context:
space:
mode:
authorpmoxhay <pmoxhay@earthlink.net>2009-03-03 12:42:43 (GMT)
committer pmoxhay <pmoxhay@earthlink.net>2009-03-03 12:42:43 (GMT)
commitcd1665e5cb7d434893fb4de9315addd20a0b028f (patch)
tree2dd9ff6014a66852fa260663ab53918e8322a3e3 /shapeobject.py
parent4684498585d38d95bbc97fd2ffc2e279fef87bfd (diff)
First working example of comparing areas by cutting.
Diffstat (limited to 'shapeobject.py')
-rw-r--r--shapeobject.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/shapeobject.py b/shapeobject.py
index 5c7322f..4093c40 100644
--- a/shapeobject.py
+++ b/shapeobject.py
@@ -72,6 +72,9 @@ class ShapeObject(MovableObject):
p1 = self.points[i]
p2 = self.points[(i+1) % len(self.points)]
self.area += (p1.x*p2.y - p2.x*p1.y)/2
+
+ # Need to take absolute value?
+ #self.area = abs(self.area)
# Calculate the centroid (center of mass).
self.centroid = Vector(1, 1)
@@ -247,5 +250,4 @@ class ShapeObject(MovableObject):
self.calculate_bounds()
self.container.queue_draw()
-
-
+ \ No newline at end of file