HPDF-1.4: Generation of PDF documentsSource codeContentsIndex
Graphics.PDF.Coordinates
Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org
Contents
Geometry
Types
Transformations
Description
Coordinates for a PDF document
Synopsis
data Angle
= Degree !PDFFloat
| Radian !PDFFloat
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
Geometry
Types
data Angle Source
Angle
Constructors
Degree !PDFFloatAngle in degrees
Radian !PDFFloatAngle in radians
type Point = Complex PDFFloatSource
data Matrix Source

A transformation matrix. An affine transformation a b c d e f

 a b 0
 c d 0
 e f 1
Constructors
Matrix !PDFFloat !PDFFloat !PDFFloat !PDFFloat !PDFFloat !PDFFloat
show/hide Instances
Transformations
toRadian :: Angle -> PDFFloatSource
dot :: RealFloat t => Complex t -> Complex t -> tSource
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)'
scalePt :: RealFloat t => t -> Complex t -> Complex tSource
project :: RealFloat t => Complex t -> Complex t -> Complex tSource
projects the first point onto the second
projectX :: RealFloat t => Complex t -> Complex tSource
projects a point onto the x-axis
projectY :: RealFloat t => Complex t -> Complex tSource
projects a point onto the y-axis
pointMatrixSource
:: PointX component
-> PointY component
-> Pointtranslation component
-> Matrix
Specifies a matrix as three points
transform :: Matrix -> Point -> PointSource
Applies a matrix to a point
identity :: MatrixSource
Identity matrix
rotateSource
:: AngleRotation angle
-> Matrix
Rotation matrix
translate :: Point -> MatrixSource
Translation matrix 'transform (translate z) w == z + w'
scaleSource
:: PDFFloatHorizontal scaling
-> PDFFloatHorizontal scaling
-> Matrix
Scaling matrix
spiral :: Point -> MatrixSource
Produced by Haddock version 2.3.0