Commits

Casey Duncan  committed 4dadb30

Export line classes at package level

  • Participants
  • Parent commits 3e9d1a9

Comments (0)

Files changed (3)

File lib/planar/__init__.py

 
 __all__ = ('TransformNotInvertibleError', 'set_epsilon', 
     'Vec2', 'Point', 'Vec2Array', 'Seq2', 
+    'Line', 'Ray', 'LineSegment',
     'Affine', 'BoundingBox', 'Polygon')
 
 __versioninfo__ = (0, 3, 0)
     __implementation__ = 'C'
 except ImportError: # pragma: no cover
     # Fall-back to Python implementation
-    from planar.vector import Vec2, Vec2Array, Seq2
-    from planar.transform import Affine
-    from planar.box import BoundingBox
-    from planar.polygon import Polygon
+    from planar.py import Vec2, Vec2Array, Seq2, Affine, \
+        Line, Ray, LineSegment, BoundingBox, Polygon
 
     class TransformNotInvertibleError(Exception):
         """The transform could not be inverted"""

File lib/planar/py.py

 """Convenience namespace module for importing Python class implementations"""
 
 __all__ = ('Vec2', 'Point', 'Vec2Array', 'Seq2', 
-	'Affine', 'BoundingBox', 'Polygon')
+	'Affine', 'Line', 'Ray', 'LineSegment', 'BoundingBox', 'Polygon')
 
 from planar.vector import Vec2, Vec2Array, Seq2
 from planar.vector import Vec2 as Point
 from planar.transform import Affine
+from planar.line import Line, Ray, LineSegment
 from planar.box import BoundingBox
 from planar.polygon import Polygon

File test/test_planar.py

 	import planar
 	import planar.py
 	from planar.py import (Vec2, Point, Vec2Array, Seq2, 
-		Affine, BoundingBox, Polygon)
+		Line, Ray, LineSegment, Affine, BoundingBox, Polygon)
 	assert set(planar.py.__all__).issubset(set(planar.__all__)), (
 		planar.py.__all__, planar.__all__)