コード例 #1
0
 def testPointOnLeft(self):
     B = BBox(((-10.0, -10.0), (-1.0, -1.0)))
     P = (-10, -5.0)
     self.failUnless(B.PointInside(P))
コード例 #2
0
 def testPointOnBottomRight(self):
     B = BBox(((-10.0, -10.0), (-1.0, -1.0)))
     P = (-1, -10.0)
     self.failUnless(B.PointInside(P))
コード例 #3
0
 def testPointLeftTopLine(self):
     B = BBox(((1.0, 2.0), (5.0, 10.0)))
     P = (-3.0, 10.0)
     self.failIf(B.PointInside(P))
コード例 #4
0
 def testPointOnBottomLine(self):
     B = BBox(((1.0, 2.0), (5.0, 10.0)))
     P = (3.0, 5.0)
     self.failUnless(B.PointInside(P))
コード例 #5
0
 def testLeft(self):
     B = BBox(((5, 10), (15, 25)))
     P = (4, 12)
     self.failIf(B.PointInside(P))
コード例 #6
0
 def testRight(self):
     B = BBox(((5, 10), (15, 25)))
     P = (17.1, 12.3)
     self.failIf(B.PointInside(P))
コード例 #7
0
 def testAbove(self):
     B = BBox(((5, 10), (15, 25)))
     P = (10, 25.001)
     self.failIf(B.PointInside(P))
コード例 #8
0
 def testBelow(self):
     B = BBox(((5, 10), (15, 25)))
     P = (10, 5)
     self.failIf(B.PointInside(P))
コード例 #9
0
 def testLowerLeft(self):
     B = BBox(((5, 10), (15, 25)))
     P = (-10, 5)
     self.failIf(B.PointInside(P))
コード例 #10
0
 def testLowerRight(self):
     B = BBox(((5, 10), (15, 25)))
     P = (16, 4)
     self.failIf(B.PointInside(P))
コード例 #11
0
 def testPointIn(self):
     B = BBox(((1.0, 2.0), (5.0, 10.0)))
     P = (3.0, 4.0)
     self.failUnless(B.PointInside(P))