| Copyright | (c) Marcin Mrotek, 2015 |
|---|---|
| License | BSD-3 |
| Maintainer | marcin.jan.mrotek@gmail.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Diagrams.Backend.HsQML
Description
The end-user API.
- renderHsQML :: SizeSpec2D -> Diagram HsQML R2 -> IO (ObjRef (DiagramObj ()))
- data SizeSpec2D :: *
- mkSizeSpec :: Maybe Double -> Maybe Double -> SizeSpec2D
- data HsQML = HsQML
- data family Options b v
- type B = HsQML
- data DiagramObj a
Documentation
renderHsQML :: SizeSpec2D -> Diagram HsQML R2 -> IO (ObjRef (DiagramObj ())) Source
Render a diagram to a QML object that controls a Canvas.
data SizeSpec2D :: *
A specification of a (requested) rectangular size.
Constructors
| Width !Double | Specify an explicit width. The height should be determined automatically (so as to preserve aspect ratio). |
| Height !Double | Specify an explicit height. The width should be determined automatically (so as to preserve aspect ratio). |
| Dims !Double !Double | An explicit specification of a width and height. |
| Absolute | Absolute size: use whatever size an object already has; do not rescale. |
Instances
| Eq SizeSpec2D | |
| Ord SizeSpec2D | |
| Show SizeSpec2D | |
| Generic SizeSpec2D | |
| Hashable SizeSpec2D | |
| type Rep SizeSpec2D = D1 D1SizeSpec2D ((:+:) ((:+:) (C1 C1_0SizeSpec2D (S1 NoSelector (Rec0 Double))) (C1 C1_1SizeSpec2D (S1 NoSelector (Rec0 Double)))) ((:+:) (C1 C1_2SizeSpec2D ((:*:) (S1 NoSelector (Rec0 Double)) (S1 NoSelector (Rec0 Double)))) (C1 C1_3SizeSpec2D U1))) |
mkSizeSpec :: Maybe Double -> Maybe Double -> SizeSpec2D
Create a size specification from a possibly-specified width and height.
Constructors
| HsQML |
Instances
| Typeable * HsQML | |
| Backend HsQML R2 | |
| Renderable Text HsQML | |
| Renderable (Path R2) HsQML | |
| Renderable (Trail R2) HsQML | |
| data Options HsQML R2 = HsQMLOptions {} | |
| type Result HsQML R2 = IO (ObjRef (DiagramObj ())) | |
data Render HsQML R2 = HsQMLRender {
|
data family Options b v
Backend-specific rendering options.
Instances
| data Options NullBackend | |
| data Options HsQML R2 = HsQMLOptions {} |
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.
Instances
| Monad DiagramObj | |
| Functor DiagramObj | |
| Applicative DiagramObj | |
| MonadIO DiagramObj | |
| Monoid a => Monoid (DiagramObj a) | |
| DefaultClass (DiagramObj ()) | |
| Typeable (* -> *) DiagramObj |