Copyright | (c) 2006-2016 alpheccar.org |
---|---|
License | BSD-style |
Maintainer | misc@NOSPAMalpheccar.org |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Coordinates for a PDF document
Synopsis
- module Data.Complex
- data Angle
- type Point = Complex PDFFloat
- data Matrix = Matrix !PDFFloat !PDFFloat !PDFFloat !PDFFloat !PDFFloat !PDFFloat
- toRadian :: Angle -> PDFFloat
- dot :: RealFloat t => Complex t -> Complex t -> t
- scalePt :: RealFloat t => t -> Complex t -> Complex t
- project :: RealFloat t => Complex t -> Complex t -> Complex t
- projectX :: RealFloat t => Complex t -> Complex t
- projectY :: RealFloat t => Complex t -> Complex t
- pointMatrix :: Point -> Point -> Point -> Matrix
- transform :: Matrix -> Point -> Point
- identity :: Matrix
- rotate :: Angle -> Matrix
- translate :: Point -> Matrix
- scale :: PDFFloat -> PDFFloat -> Matrix
- spiral :: Point -> Matrix
Documentation
module Data.Complex
Geometry
Types
A transformation matrix. An affine transformation a b c d e f
a b 0 c d 0 e f 1
Transformations
dot :: RealFloat t => Complex t -> Complex t -> t Source #
Dot product of two points 'dot (x :+ y) (a :+ b) == x * a + y * b' 'dot z w == magnitude z * magnitude w * cos (phase z - phase w)'
project :: RealFloat t => Complex t -> Complex t -> Complex t Source #
projects the first point onto the second
Specifies a matrix as three points