Copyright(c) Taru Karttunen, 2014
LicenseBSD3
Maintainertaruti@taruti.net
Stabilityexperimental
Safe HaskellNone

Diagrams.Backend.Cairo.Raster.Repa

Description

Draw repa arrays into Cairo diagrams.

Synopsis

Documentation

cairoRepa ∷ Load r1 sh CairoColor ⇒ (DIM2 → Array r1 sh CairoColor) → Int → Int → IO (Diagram Cairo R2) Source

Compute a DImage from a repa array with the supplied width and height. The function calculating the array receives a DIM2 containing the dimensions of the array which may be different from the image width and height specified due to Cairo requirements of image data alignment. The DIM2 is in the form (Z :. height :. width).

computeIntoP ∷ Load r1 sh CairoColor ⇒ SurfaceData Int CairoColor → Array r1 sh CairoColor → IO () Source

Low-level primitive: Compute a repa array into a SurfaceData in parallel.

computeIntoS ∷ Load r1 sh CairoColor ⇒ SurfaceData Int CairoColor → Array r1 sh CairoColor → IO () Source

Low-level primitive: Compute a repa array into a SurfaceData sequentally.