hps-0.16: Haskell Postscript

Safe HaskellSafe
LanguageHaskell98

Graphics.PS.Query

Description

Path query functions and related operations.

Synopsis

Documentation

startPt :: Path -> Maybe (Pt Double) Source #

Locate the starting point of the path, which must begin with a MoveTo node.

startPt' :: Path -> Maybe (Pt Double) Source #

Variant that allows the initial node to be a LineTo or CurveTo node.

mkValid :: Path -> Path Source #

Ensure path begins with a MoveTo node.

endPt :: Path -> Maybe (Pt Double) Source #

Locate the end point of the path.

close :: Path -> Path Source #

Append a LineTo the start point of Path.

approx :: Double -> Path -> Path Source #

Approximate curves as n straight line segments. That is replace CurveTo nodes with n LineTo nodes calculated using bezier4.

data Rect a Source #

Rectangle, given as lower left and upper right points.

Constructors

Rect 

Fields

Instances

Eq a => Eq (Rect a) Source # 

Methods

(==) :: Rect a -> Rect a -> Bool #

(/=) :: Rect a -> Rect a -> Bool #

Show a => Show (Rect a) Source # 

Methods

showsPrec :: Int -> Rect a -> ShowS #

show :: Rect a -> String #

showList :: [Rect a] -> ShowS #

rect_sum :: Ord a => Rect a -> Rect a -> Rect a Source #

Sum (join) of two Rect.

path_rect :: Path -> Rect Double Source #

Rectangle bounding a (simple) Path.

rect_to_bbox :: RealFrac a => Rect a -> BBox Source #

Translate Rect to BBox.