diagrams-pgf-1.4.1.1: PGF backend for diagrams drawing EDSL.

Copyright(c) 2015 Christopher Chalmers
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.Backend.PGF.Render

Contents

Description

This is an internal module exposing internals for rendering a diagram. This is for advanced use only. PGF has enough for general use.

Synopsis

Documentation

data PGF Source #

This data declaration is simply used as a token to distinguish this rendering engine.

Constructors

PGF 
Instances
Show PGF Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

showsPrec :: Int -> PGF -> ShowS #

show :: PGF -> String #

showList :: [PGF] -> ShowS #

TypeableFloat n => Backend PGF V2 n Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Associated Types

data Render PGF V2 n :: Type #

type Result PGF V2 n :: Type #

data Options PGF V2 n :: Type #

TypeableFloat n => Mainable [(String, QDiagram PGF V2 n Any)] Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

Associated Types

type MainOpts [(String, QDiagram PGF V2 n Any)] :: Type #

TypeableFloat n => Mainable (OnlineTex (QDiagram PGF V2 n Any)) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

Associated Types

type MainOpts (OnlineTex (QDiagram PGF V2 n Any)) :: Type #

TypeableFloat n => Renderable (Text n) PGF Source #

Does not support full alignment. Text is not escaped.

Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

render :: PGF -> Text n -> Render PGF (V (Text n)) (N (Text n)) #

TypeableFloat n => Renderable (Hbox n) PGF Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

render :: PGF -> Hbox n -> Render PGF (V (Hbox n)) (N (Hbox n)) #

TypeableFloat n => Mainable (Surface, QDiagram PGF V2 n Any) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

Associated Types

type MainOpts (Surface, QDiagram PGF V2 n Any) :: Type #

TypeableFloat n => Mainable (Surface, OnlineTex (QDiagram PGF V2 n Any)) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

Associated Types

type MainOpts (Surface, OnlineTex (QDiagram PGF V2 n Any)) :: Type #

RealFloat n => Renderable (DImage n Embedded) PGF Source #

Supported: ImageRGB8. (Other types from DynamicImage will error)

Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

render :: PGF -> DImage n Embedded -> Render PGF (V (DImage n Embedded)) (N (DImage n Embedded)) #

RealFloat n => Renderable (DImage n External) PGF Source #

Supported: .pdf, .jpg, .png.

Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

render :: PGF -> DImage n External -> Render PGF (V (DImage n External)) (N (DImage n External)) #

TypeableFloat n => Renderable (Path V2 n) PGF Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

render :: PGF -> Path V2 n -> Render PGF (V (Path V2 n)) (N (Path V2 n)) #

Semigroup (Render PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

(<>) :: Render PGF V2 n -> Render PGF V2 n -> Render PGF V2 n #

sconcat :: NonEmpty (Render PGF V2 n) -> Render PGF V2 n #

stimes :: Integral b => b -> Render PGF V2 n -> Render PGF V2 n #

Monoid (Render PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

mempty :: Render PGF V2 n #

mappend :: Render PGF V2 n -> Render PGF V2 n -> Render PGF V2 n #

mconcat :: [Render PGF V2 n] -> Render PGF V2 n #

Fractional n => Default (Options PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

def :: Options PGF V2 n #

Hashable n => Hashable (Options PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

hashWithSalt :: Int -> Options PGF V2 n -> Int #

hash :: Options PGF V2 n -> Int #

TypeableFloat n => Mainable (QDiagram PGF V2 n Any) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

Associated Types

type MainOpts (QDiagram PGF V2 n Any) :: Type #

type V PGF Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

type V PGF = V2
type N PGF Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

type N PGF = Double
data Options PGF V2 n Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

newtype Render PGF V2 n Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

newtype Render PGF V2 n = R (Render n)
type Result PGF V2 n Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

type Result PGF V2 n = Builder
type MainOpts [(String, QDiagram PGF V2 n Any)] Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

type MainOpts (OnlineTex (QDiagram PGF V2 n Any)) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

type MainOpts (Surface, QDiagram PGF V2 n Any) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

type MainOpts (Surface, OnlineTex (QDiagram PGF V2 n Any)) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

type MainOpts (QDiagram PGF V2 n Any) Source # 
Instance details

Defined in Diagrams.Backend.PGF.CmdLine

data family Options b (v :: Type -> Type) n :: Type #

Backend-specific rendering options.

Instances
Fractional n => Default (Options PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

def :: Options PGF V2 n #

Hashable n => Hashable (Options PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

hashWithSalt :: Int -> Options PGF V2 n -> Int #

hash :: Options PGF V2 n -> Int #

data Options NullBackend v n 
Instance details

Defined in Diagrams.Core.Types

data Options PGF V2 n Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

data family Render b (v :: Type -> Type) n :: Type #

An intermediate representation used for rendering primitives. (Typically, this will be some sort of monad, but it need not be.) The Renderable class guarantees that a backend will be able to convert primitives into this type; how these rendered primitives are combined into an ultimate Result is completely up to the backend.

Instances
Semigroup (Render NullBackend v n) 
Instance details

Defined in Diagrams.Core.Types

Semigroup (Render PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

(<>) :: Render PGF V2 n -> Render PGF V2 n -> Render PGF V2 n #

sconcat :: NonEmpty (Render PGF V2 n) -> Render PGF V2 n #

stimes :: Integral b => b -> Render PGF V2 n -> Render PGF V2 n #

Monoid (Render NullBackend v n) 
Instance details

Defined in Diagrams.Core.Types

Monoid (Render PGF V2 n) Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

Methods

mempty :: Render PGF V2 n #

mappend :: Render PGF V2 n -> Render PGF V2 n -> Render PGF V2 n #

mconcat :: [Render PGF V2 n] -> Render PGF V2 n #

data Render NullBackend v n 
Instance details

Defined in Diagrams.Core.Types

newtype Render PGF V2 n Source # 
Instance details

Defined in Diagrams.Backend.PGF.Render

newtype Render PGF V2 n = R (Render n)

Lenses

surface :: Lens' (Options PGF V2 n) Surface Source #

Lens onto the surface used to render.

sizeSpec :: Lens' (Options PGF V2 n) (SizeSpec V2 n) Source #

Lens onto the SizeSpec2D.

readable :: Lens' (Options PGF V2 n) Bool Source #

Lens onto whether the lines of the TeX output are indented.

standalone :: Lens' (Options PGF V2 n) Bool Source #

Lens onto whether a standalone TeX document should be produced.

Utilities

escapeString :: String -> String Source #

Escapes some common characters in a string. Note that this does not mean the string can't create an error; it merely escapes common characters.