Safe Haskell | None |
---|---|
Language | Haskell2010 |
Examples
Examples are available in Imj.Example.SequentialTextTranslationsAnchored:
- Run
imj-base-examples-exe
to see these examples displayed in the terminal
- data TextAnimation a = TextAnimation {}
- data AnchorChars
- data AnchorStrings
- mkTextTranslation :: ColorString -> Float -> Coords Pos -> Coords Pos -> TextAnimation AnchorChars
- mkSequentialTextTranslationsCharAnchored :: [([ColorString], Coords Pos, Coords Pos)] -> Float -> TextAnimation AnchorChars
- mkSequentialTextTranslationsStringAnchored :: [([ColorString], Coords Pos, Coords Pos)] -> Float -> TextAnimation AnchorStrings
- renderAnimatedTextCharAnchored :: (Draw e, MonadReader e m, MonadIO m) => TextAnimation AnchorChars -> Frame -> m ()
- renderAnimatedTextStringAnchored :: (Draw e, MonadReader e m, MonadIO m) => TextAnimation AnchorStrings -> Frame -> m ()
- module Imj.Graphics.Interpolation
TextAnimation
Interpolates between various ColorString
s, and at the same time interpolates
their anchors.
Anchors interpolation can occur :
- at the
ColorString
level usingAnchorStrings
, or - at the
Char
level usingAnchorChars
data TextAnimation a Source #
Interpolates ColorString
s and anchors.
Show (TextAnimation a) Source # | |
data AnchorChars Source #
One anchor per Character
data AnchorStrings Source #
One anchor per String
Constructors
:: ColorString | |
-> Float | Duration in seconds |
-> Coords Pos | Left anchor at the beginning |
-> Coords Pos | Left anchor at the end |
-> TextAnimation AnchorChars |
Translates a ColorString
between two anchors.
mkSequentialTextTranslationsCharAnchored Source #
:: [([ColorString], Coords Pos, Coords Pos)] | List of (texts, from anchor, to anchor) |
-> Float | duration in seconds |
-> TextAnimation AnchorChars |
Translates text in an animated way,ete character by character.
Examples are given in Imj.Example.SequentialTextTranslationsAnchored.
mkSequentialTextTranslationsStringAnchored Source #
:: [([ColorString], Coords Pos, Coords Pos)] | List of (texts, from anchor, to anchor) |
-> Float | Duration in seconds |
-> TextAnimation AnchorStrings |
Translates text in an animated way, ColorString
by ColorString
.
Examples are given in Imj.Example.SequentialTextTranslationsAnchored.
Draw
renderAnimatedTextCharAnchored :: (Draw e, MonadReader e m, MonadIO m) => TextAnimation AnchorChars -> Frame -> m () Source #
Render a char-anchored TextAnimation
for a given Frame
renderAnimatedTextStringAnchored :: (Draw e, MonadReader e m, MonadIO m) => TextAnimation AnchorStrings -> Frame -> m () Source #
Render a string-anchored TextAnimation
for a given Frame
Reexports
module Imj.Graphics.Interpolation