aivika-experiment-cairo (empty) → 1.3
raw patch · 4 files changed
+104/−0 lines, 4 filesdep +Chartdep +Chart-cairodep +aivika-experimentsetup-changed
Dependencies added: Chart, Chart-cairo, aivika-experiment, aivika-experiment-chart, base
Files
- LICENSE +30/−0
- Setup.lhs +3/−0
- Simulation/Aivika/Experiment/CairoRenderer.hs +37/−0
- aivika-experiment-cairo.cabal +34/−0
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2012, 2013, 2014 David Sorokin <david.sorokin@gmail.com>++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.++3. Neither the name of the author nor the names of his contributors+ may be used to endorse or promote products derived from this software+ without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF+SUCH DAMAGE.
+ Setup.lhs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+> import Distribution.Simple+> main = defaultMain
+ Simulation/Aivika/Experiment/CairoRenderer.hs view
@@ -0,0 +1,37 @@++-- |+-- Module : Simulation.Aivika.Experiment.CairoRenderer+-- Copyright : Copyright (c) 2012-2014, David Sorokin <david.sorokin@gmail.com>+-- License : BSD3+-- Maintainer : David Sorokin <david.sorokin@gmail.com>+-- Stability : experimental+-- Tested with: GHC 7.6.3+--+-- This module defines a renderer that uses the Chart-cairo library based on Cairo+-- for rendering charts with simulation results.+--++module Simulation.Aivika.Experiment.CairoRenderer+ (CairoRenderer(..)) where++import Graphics.Rendering.Chart+import Graphics.Rendering.Chart.Backend.Cairo++import Simulation.Aivika.Experiment+import Simulation.Aivika.Experiment.Chart++-- | This renderer uses the Chart-cairo library based on Cairo for rendering charts with simulation results.+data CairoRenderer = CairoRenderer FileFormat++instance FileRenderer CairoRenderer++instance ChartRenderer CairoRenderer where++ renderableFileExtension (CairoRenderer PNG) = ".png"+ renderableFileExtension (CairoRenderer SVG) = ".svg"+ renderableFileExtension (CairoRenderer PS) = ".ps"+ renderableFileExtension (CairoRenderer PDF) = ".pdf"+ + renderChart (CairoRenderer format) size =+ renderableToFile (FileOptions size format)+
+ aivika-experiment-cairo.cabal view
@@ -0,0 +1,34 @@+name: aivika-experiment-cairo+version: 1.3+synopsis: Cairo backend for the Aivika simulation library+description:+ This package complements the Aivika and Aivika Experiment packages + and it allows rendering the charts using the Chart-cairo library.+ .+category: Simulation+license: BSD3+license-file: LICENSE+copyright: (c) 2012-2014. David Sorokin <david.sorokin@gmail.com>+author: David Sorokin+maintainer: David Sorokin <david.sorokin@gmail.com>+homepage: http://github.com/dsorokin/aivika-experiment-cairo+cabal-version: >= 1.6+build-type: Simple+tested-with: GHC == 7.6.3++library++ exposed-modules: Simulation.Aivika.Experiment.CairoRenderer++ build-depends: base >= 3 && < 6,+ Chart >= 1.2,+ Chart-cairo >= 1.2,+ aivika-experiment >= 1.3,+ aivika-experiment-chart >= 1.3++ ghc-options: -O2++source-repository head++ type: git+ location: https://github.com/dsorokin/aivika-experiment-cairo