diagrams-hsqml-0.0.0.2: 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 :: 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.

data family Options b v

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.