diagrams-hsqml-0.2.0.0: HsQML (Qt5) backend for Diagrams

Copyright(c) Marcin Mrotek, 2015
LicenseBSD-3
Maintainermarcin.jan.mrotek@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Diagrams.Backend.HsQML

Description

The end-user API.

Synopsis

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.

Instances

Functor v => Functor (SizeSpec v) 
Show (v n) => Show (SizeSpec v n) 
Generic (SizeSpec v n) 
Hashable (v n) => Hashable (SizeSpec v n) 
type Rep (SizeSpec v n) = D1 D1SizeSpec (C1 C1_0SizeSpec (S1 NoSelector (Rec0 (v n)))) 
type V (SizeSpec v n) = v 
type N (SizeSpec v n) = n 

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 SizeSpecs see mkWidth and mkHeight from Diagrams.TwoD.Size.

data family Options b v n

Backend-specific rendering options.

type B = HsQML Source

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.