module Wumpus.Drawing.Text.DocSymbols
(
ocircle
, small_ocircle
, empty_box
, left_slice
, right_slice
)
where
import qualified Wumpus.Drawing.Basis.Symbols as S
import Wumpus.Drawing.Text.Base.DocTextZero
import Wumpus.Basic.Kernel
import Control.Applicative
ocircle :: (Fractional u, InterpretUnit u) => GenDocGraphic st u
ocircle = embedPosObject $ makePosObject qy gf
where
qy = (\h -> let hh = 0.5 * h in Orientation hh hh 0 h) <$> capHeight
gf = capHeight >>= \h -> moveStart (go_up $ 0.5 * h) (S.ocircle $ 0.5 * h)
small_ocircle :: (Fractional u, InterpretUnit u) => GenDocGraphic st u
small_ocircle = embedPosObject $ makePosObject qy gf
where
qy = (\h -> let hw = 0.33 * h in Orientation hw hw 0 h) <$> capHeight
gf = capHeight >>= \h -> moveStart (go_up $ 0.33 * h) (S.ocircle $ 0.25 * h)
empty_box :: (Fractional u, InterpretUnit u) => GenDocGraphic st u
empty_box = embedPosObject $ makePosObject qy gf
where
qy = (\h -> let hw = 0.5 * h in Orientation hw hw 0 h) <$> capHeight
gf = capHeight >>= \h -> moveStart (go_up $ 0.33 * h) (S.empty_box $ 0.66 * h)
left_slice :: (Real u, Floating u, InterpretUnit u) => GenDocGraphic st u
left_slice = embedPosObject $ makePosObject qy gf
where
qy = (\h -> let hw = 0.66 * h in Orientation hw hw 0 h) <$> capHeight
gf = capHeight >>= \h -> moveStart (go_up $ 0.33 * h) (S.left_slice h)
right_slice :: (Real u, Floating u, InterpretUnit u) => GenDocGraphic st u
right_slice = embedPosObject $ makePosObject qy gf
where
qy = (\h -> let hw = 0.66 * h in Orientation hw hw 0 h) <$> capHeight
gf = capHeight >>= \h -> moveStart (go_up $ 0.33 * h) (S.right_slice h)