Add support for clamping pictures to be inside screen
This commit is contained in:
@@ -178,3 +178,11 @@ intersectSegsSeg = undefined
|
||||
-- | Placeholder: should intersect a segment with a bezier curve.
|
||||
intersectSegBezquad :: Point2 -> Point2 -> Point2 -> Point2 -> Point2 -> [Point2]
|
||||
intersectSegBezquad = undefined
|
||||
|
||||
-- | finds one (if any) of the points of intersection between a segment and a
|
||||
-- polygon.
|
||||
-- Can almost certainly be optimised.
|
||||
intersectSegPolyFirst :: Point2 -> Point2 -> [Point2] -> Maybe Point2
|
||||
intersectSegPolyFirst a b xs = foldr (<|>) Nothing $ zipWith lineColl xs (tail xs ++ [head xs])
|
||||
where
|
||||
lineColl = intersectSegSeg a b
|
||||
|
||||
Reference in New Issue
Block a user