module Wumpus.Drawing.Text.Base.PosChar
(
LocRectChar
, posChar
, posEscChar
, charLabel
, escCharLabel
) where
import Wumpus.Drawing.Text.Base.Common
import Wumpus.Basic.Kernel
import Wumpus.Core
type PosChar u = PosObject u
posChar :: InterpretUnit u => Char -> PosChar u
posChar = makePosChar . CharLiteral
posEscChar :: InterpretUnit u => EscapedChar -> PosChar u
posEscChar = makePosChar
type LocRectChar u = BoundedLocRectGraphic u
charLabel :: (Floating u, InterpretUnit u) => Char -> LocRectChar u
charLabel ch = escCharLabel $ CharLiteral ch
escCharLabel :: (Floating u, InterpretUnit u)
=> EscapedChar -> LocRectChar u
escCharLabel esc = runPosObjectR2 (makePosChar esc)
makePosChar :: InterpretUnit u
=> EscapedChar -> PosObject u
makePosChar esc = makePosObject (charOrientationZero esc) (escText1 esc)
escText1 :: InterpretUnit u => EscapedChar -> LocGraphic u
escText1 ch = escTextLine $ wrapEscChar ch