Chart-0.6: A library for generating 2D Charts and Plots

Safe HaskellNone

Graphics.Rendering.Chart.Types

Description

 

Synopsis

Documentation

data Point Source

A point in two dimensions

Constructors

Point 

Fields

p_x :: Double
 
p_y :: Double
 

Instances

data Vector Source

Constructors

Vector 

Fields

v_x :: Double
 
v_y :: Double
 

Instances

vscale :: Double -> Vector -> VectorSource

scale a vector by a constant

pvadd :: Point -> Vector -> PointSource

add a point and a vector

pvsub :: Point -> Vector -> PointSource

subtract a vector from a point

psub :: Point -> Point -> VectorSource

subtract two points

type PointMapFn = Point -> PointSource

a function mapping between points

data Rect Source

A rectangle is defined by two points

Constructors

Rect Point Point 

Instances

mkrect :: Point -> Point -> Point -> Point -> RectSource

Create a rectangle based upon the coordinates of 4 points

vmap :: Range -> Range -> Double -> DoubleSource

A linear mapping of points in one range to another

newtype CairoPointStyle Source

Abstract data type for the style of a plotted point

The contained Cairo action draws a point in the desired style, at the supplied device coordinates.

Constructors

CairoPointStyle (Point -> Render ()) 

newtype CairoLineStyle Source

Abstract data type for the style of a line

The contained Cairo action sets the required line in the Cairo rendering state.

Constructors

CairoLineStyle (Render ()) 

newtype CairoFillStyle Source

Abstract data type for a fill style

The contained Cairo action sets the required fill style in the Cairo rendering state.

Constructors

CairoFillStyle (Render ()) 

newtype CairoFontStyle Source

Abstract data type for a font.

The contained Cairo action sets the required font in the Cairo rendering state.

Constructors

CairoFontStyle (Render ()) 

strokeLines :: [Point] -> Render ()Source

stroke the lines between successive points

rectPath :: Rect -> Render ()Source

make a path from a rectable

drawText :: HTextAnchor -> VTextAnchor -> Point -> String -> Render ()Source

Function to draw a textual label anchored by one of it's corners or edges.

filledCirclesSource

Arguments

:: Double

radius of circle

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

hollowCirclesSource

Arguments

:: Double

radius of circle

-> Double

thickness of line

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

hollowPolygonSource

Arguments

:: Double

radius of circle

-> Double

thickness of line

-> Int

Number of vertices

-> Bool

Is right-side-up?

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

filledPolygonSource

Arguments

:: Double

radius of circle

-> Int

Number of vertices

-> Bool

Is right-side-up?

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

plussesSource

Arguments

:: Double

radius of circle

-> Double

thickness of line

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

exesSource

Arguments

:: Double

radius of circle

-> Double

thickness of line

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

starsSource

Arguments

:: Double

radius of circle

-> Double

thickness of line

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoPointStyle 

solidLineSource

Arguments

:: Double

width of line

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoLineStyle 

dashedLineSource

Arguments

:: Double

width of line

-> [Double]

the dash pattern in device coordinates

-> Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoLineStyle 

fontStyleSource

Arguments

:: String

the font name

-> Double

the font size

-> FontSlant

the font slant

-> FontWeight

the font weight

-> CairoFontStyle 

solidFillStyleSource

Arguments

:: Double

red component of colour

-> Double

green component of colour

-> Double

blue component of colour

-> CairoFillStyle