Rasterific-0.7.2.1: A pure haskell drawing engine.

Safe HaskellNone
LanguageHaskell2010

Graphics.Rasterific.Lenses

Contents

Description

This module provide lenses compatible with the lens module but without the dependency to it.

Synopsis

Line lenses

lineX0 :: Lens' Line Point #

Line origin point.

lineX1 :: Lens' Line Point #

Line end point.

linePoints :: Traversal' Line Point #

Traverse all the points of a line.

Quadratic bezier curve

bezX0 :: Lens' Bezier Point #

Quadratic bezier starting point.

bezX1 :: Lens' Bezier Point #

bezier control point.

bezX2 :: Lens' Bezier Point #

bezier end point.

bezierPoints :: Traversal' Bezier Point #

Traversal of all the bezier's points.

Cubic bezier lenses

cbezX0 :: Lens' CubicBezier Point #

Cubic bezier first point

cbezX1 :: Lens' CubicBezier Point #

Cubic bezier first control point.

cbezX2 :: Lens' CubicBezier Point #

Cubic bezier second control point.

cbezX3 :: Lens' CubicBezier Point #

Cubic bezier last point.

cubicBezierPoints :: Traversal' CubicBezier Point #

Traversal of all the points of the cubic bezier.

Primitive lenses

primitivePoints :: Traversal' Primitive Point #

Traverse all the points defined in the primitive.

Path oriented lenses

pathCommandPoints :: Traversal' PathCommand Point #

Traversal of all the points of a path

pathPoints :: Traversal' Path Point #

Traversal of all the points in a path.

Type definition to match Lens

type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t #

Does it look familiar? yes it's the official Lens type.

type Lens' s a = Lens s s a a #

Try to match the Lens' type alias.

type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t #

Traversal type, matched to the one of the lens package.

type Traversal' s a = Traversal s s a a #