reanimate-1.1.1.0: Animation library based on SVGs.

CopyrightWritten by David Himmelstrup
LicenseUnlicense
Maintainerlemmih@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Reanimate.Morph.Common

Description

 
Synopsis

Documentation

type PointCorrespondence = Polygon -> Polygon -> (Polygon, Polygon) Source #

Method determining how points in the source polygon align with points in the target polygon.

type Trajectory = (Polygon, Polygon) -> Double -> Polygon Source #

Method for interpolating between two aligned polygons.

type ObjectCorrespondence = [GPolygon] -> [GPolygon] -> [(GPolygon, GPolygon)] Source #

Method for pairing sets of polygons.

data Morph Source #

Morphing strategy

Constructors

Morph 

Fields

morph :: Morph -> SVG -> SVG -> Double -> SVG Source #

Apply morphing strategy to interpolate between two SVG images.

splitObjectCorrespondence :: ObjectCorrespondence Source #

Object-correspondence algorithm that splits objects in smaller pieces as necessary.

dupObjectCorrespondence :: ObjectCorrespondence Source #

Object-correspondence algorithm that duplicate objects as necessary.

genesisObjectCorrespondence :: ObjectCorrespondence Source #

Object-correspondence algorithm that spawn objects as necessary.

toShapes :: Double -> SVG -> [(DrawAttributes, Polygon)] Source #

Extract shapes and their graphical attributes from an SVG node.

normalizePolygons :: (Real a, Fractional a, Epsilon a) => APolygon a -> APolygon a -> (APolygon a, APolygon a) Source #

Add points to each polygon such that they end up with same size.

annotatePolygons :: (Polygon -> SVG) -> SVG -> SVG Source #

Map over each polygon in an SVG node.

unsafeSVGToPolygon :: Double -> SVG -> Polygon Source #

Extract the first polygon in an SVG node. Will fail if there are no acceptable shapes.