Copyright | (c) Marcin Mrotek, 2015 |
---|---|
License | BSD-3 |
Maintainer | marcin.jan.mrotek@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
The end-user API.
Documentation
renderHsQML :: SizeSpec V2 Double -> Diagram HsQML -> IO (ObjRef (DiagramObj ())) Source
Render a diagram to a QML object that controls a Canvas.
data SizeSpec v n :: (* -> *) -> * -> *
A SizeSpec
is a way of specifying a size without needed lengths for all
the dimensions.
mkSizeSpec :: (Functor v, Num n) => v (Maybe n) -> SizeSpec v n
Make a SizeSpec
from a vector of maybe values. Any negative values will
be ignored. For 2D SizeSpec
s see mkWidth
and mkHeight
from
Diagrams.TwoD.Size.
Backend HsQML V2 Double Source | |
Renderable (Text Double) HsQML Source | |
Renderable (Path V2 Double) HsQML Source | |
Renderable (Trail V2 Double) HsQML Source | |
type V HsQML = V2 Source | |
type N HsQML = Double Source | |
data Options HsQML V2 Double = HsQMLOptions {} Source | |
type Result HsQML V2 Double = IO (ObjRef (DiagramObj ())) Source | |
data Render HsQML V2 Double = HsQMLRender {
|
data family Options b v n
Backend-specific rendering options.
data DiagramObj a Source
The type to which the parts of a diagram are rendered.
The end result of rendering is always a DiagramObj ().
The monoid instance sequences actions on the same argument, with noop as identity.
As DiagramObj is a wrapper over a function to IO, Functor
, Applicative
, Monad
, and MonadIO
instances are defined in an expected way.