Graphics.Rendering.Chart.Backend.Cairo

Chart-cairo-1.9.4.1: Cairo backend for Charts.

Safe Haskell | None
Language | Haskell98

Graphics.Rendering.Chart.Backend.Cairo

Description

The backend to render charts with cairo.

Synopsis

- data FileFormat
  - = PNG
  - | SVG
  - | PS
  - | PDF
- data FileOptions = FileOptions {
  - _fo_size :: (Int, Int)
  - _fo_format :: FileFormat
  }
- runBackend :: CEnv -> BackendProgram a -> Render a
- renderableToFile :: FileOptions -> FilePath -> Renderable a -> IO (PickFn a)
- toFile :: (Default r, ToRenderable r) => FileOptions -> FilePath -> EC r () -> IO ()
- defaultEnv :: AlignmentFns -> CEnv
- fo_size :: Lens' FileOptions (Int, Int)
- fo_format :: Lens' FileOptions FileFormat
- cBackendToFile :: FileOptions -> BackendProgram a -> FilePath -> IO a

# Documentation

data FileFormat #

Constructors

PNG |
SVG |
PS |
PDF |

data FileOptions #

Constructors

FileOptions |
Fields _fo_size :: (Int, Int) _fo_format :: FileFormat

#### Instances

Instances details

Default FileOptions # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Cairo Methods def :: FileOptions #

runBackend #

Arguments

:: CEnv | Environment to start rendering with.
-> BackendProgram a | Chart render code.
-> Render a | Cairo render code.

Run this backends renderer.

renderableToFile :: FileOptions -> FilePath -> Renderable a -> IO (PickFn a) #

Generate an image file for the given renderable, at the specified path. Size and format are set through the `FileOptions` parameter.

toFile :: (Default r, ToRenderable r) => FileOptions -> FilePath -> EC r () -> IO () #

Generate an image file from from the state content of an EC computation. The state may have any type that is an instance of `ToRenderable`

defaultEnv :: AlignmentFns -> CEnv #

Produce a environment with no transformation and clipping. It will use the default styles.

fo_size :: Lens' FileOptions (Int, Int) #

fo_format :: Lens' FileOptions FileFormat #

cBackendToFile :: FileOptions -> BackendProgram a -> FilePath -> IO a #

Generate an image file for the given drawing instructions, at the specified path. Size and format are set through the `FileOptions` parameter.