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

Copyright | (c) Tim Docker 2014
License | BSD-style (see chart/COPYRIGHT)
Safe Haskell | None
Language | Haskell98

Graphics.Rendering.Chart.Backend.Types

Description

Synopsis

- data LineCap
  - = LineCapButt
  - | LineCapRound
  - | LineCapSquare
- data LineJoin
  - = LineJoinMiter
  - | LineJoinRound
  - | LineJoinBevel
- data LineStyle = LineStyle {
  - _line_width :: Double
  - _line_color :: AlphaColour Double
  - _line_dashes :: [Double]
  - _line_cap :: LineCap
  - _line_join :: LineJoin
  }
- data FontSlant
  - = FontSlantNormal
  - | FontSlantItalic
  - | FontSlantOblique
- data FontWeight
  - = FontWeightNormal
  - | FontWeightBold
- data FontStyle = FontStyle {
  - _font_name :: String
  - _font_size :: Double
  - _font_slant :: FontSlant
  - _font_weight :: FontWeight
  - _font_color :: AlphaColour Double
  }
- data HTextAnchor
  - = HTA_Left
  - | HTA_Centre
  - | HTA_Right
- data VTextAnchor
  - = VTA_Top
  - | VTA_Centre
  - | VTA_Bottom
  - | VTA_BaseLine
- data TextSize = TextSize {
  - textSizeWidth :: Double
  - textSizeAscent :: Double
  - textSizeDescent :: Double
  - textSizeYBearing :: Double
  - textSizeHeight :: Double
  }
- newtype FillStyle = FillStyleSolid {
  - _fill_color :: AlphaColour Double
  }
- type AlignmentFn = Point -> Point
- data AlignmentFns = AlignmentFns {
  - afPointAlignFn :: AlignmentFn
  - afCoordAlignFn :: AlignmentFn
  }
- bitmapAlignmentFns :: AlignmentFns
- vectorAlignmentFns :: AlignmentFns
- line_cap :: Lens' LineStyle LineCap
- line_color :: Lens' LineStyle (AlphaColour Double)
- line_dashes :: Lens' LineStyle [Double]
- line_join :: Lens' LineStyle LineJoin
- line_width :: Lens' LineStyle Double
- font_color :: Lens' FontStyle (AlphaColour Double)
- font_name :: Lens' FontStyle String
- font_size :: Lens' FontStyle Double
- font_slant :: Lens' FontStyle FontSlant
- font_weight :: Lens' FontStyle FontWeight
- fill_color :: Iso' FillStyle (AlphaColour Double)

# Documentation

data LineCap #

The different supported line ends.

Constructors

LineCapButt | Just cut the line straight.
LineCapRound | Make a rounded line end.
LineCapSquare | Make a square that ends the line.

#### Instances

Instances details

Show LineCap # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> LineCap -> ShowS # show :: LineCap -> String # showList :: [LineCap] -> ShowS #
Eq LineCap # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: LineCap -> LineCap -> Bool # (/=) :: LineCap -> LineCap -> Bool #
Ord LineCap # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods compare :: LineCap -> LineCap -> Ordering # (<) :: LineCap -> LineCap -> Bool # (<=) :: LineCap -> LineCap -> Bool # (>) :: LineCap -> LineCap -> Bool # (>=) :: LineCap -> LineCap -> Bool # max :: LineCap -> LineCap -> LineCap # min :: LineCap -> LineCap -> LineCap #

data LineJoin #

The different supported ways to join line ends.

Constructors

LineJoinMiter | Extends the outline until they meet each other.
LineJoinRound | Draw a circle fragment to connet line end.
LineJoinBevel | Like miter, but cuts it off if a certain threshold is exceeded.

#### Instances

Instances details

Show LineJoin # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> LineJoin -> ShowS # show :: LineJoin -> String # showList :: [LineJoin] -> ShowS #
Eq LineJoin # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: LineJoin -> LineJoin -> Bool # (/=) :: LineJoin -> LineJoin -> Bool #
Ord LineJoin # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods compare :: LineJoin -> LineJoin -> Ordering # (<) :: LineJoin -> LineJoin -> Bool # (<=) :: LineJoin -> LineJoin -> Bool # (>) :: LineJoin -> LineJoin -> Bool # (>=) :: LineJoin -> LineJoin -> Bool # max :: LineJoin -> LineJoin -> LineJoin # min :: LineJoin -> LineJoin -> LineJoin #

data LineStyle #

Data type for the style of a line.

Constructors

LineStyle |
Fields _line_width :: Double The thickness of a line in device units. _line_color :: AlphaColour Double The color of a line. _line_dashes :: [Double] The dash pattern. Every value at a even index gives a dash width and every value at a odd index gives a gap width in device units. _line_cap :: LineCap How to end a line. _line_join :: LineJoin How to connect two lines.

#### Instances

Instances details

Default LineStyle # | The default line style.
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods def :: LineStyle #
Show LineStyle # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> LineStyle -> ShowS # show :: LineStyle -> String # showList :: [LineStyle] -> ShowS #
Eq LineStyle # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: LineStyle -> LineStyle -> Bool # (/=) :: LineStyle -> LineStyle -> Bool #

data FontSlant #

The possible slants of a font.

Constructors

FontSlantNormal | Normal font style without slant.
FontSlantItalic | With a slight slant.
FontSlantOblique | With a greater slant.

#### Instances

Instances details

Default FontSlant # | The default font slant.
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods def :: FontSlant #
Show FontSlant # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> FontSlant -> ShowS # show :: FontSlant -> String # showList :: [FontSlant] -> ShowS #
Eq FontSlant # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: FontSlant -> FontSlant -> Bool # (/=) :: FontSlant -> FontSlant -> Bool #
Ord FontSlant # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods compare :: FontSlant -> FontSlant -> Ordering # (<) :: FontSlant -> FontSlant -> Bool # (<=) :: FontSlant -> FontSlant -> Bool # (>) :: FontSlant -> FontSlant -> Bool # (>=) :: FontSlant -> FontSlant -> Bool # max :: FontSlant -> FontSlant -> FontSlant # min :: FontSlant -> FontSlant -> FontSlant #

data FontWeight #

The possible weights of a font.

Constructors

FontWeightNormal | Normal font style without weight.
FontWeightBold | Bold font.

#### Instances

Instances details

Default FontWeight # | The default font weight.
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods def :: FontWeight #
Show FontWeight # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> FontWeight -> ShowS # show :: FontWeight -> String # showList :: [FontWeight] -> ShowS #
Eq FontWeight # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: FontWeight -> FontWeight -> Bool # (/=) :: FontWeight -> FontWeight -> Bool #
Ord FontWeight # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods compare :: FontWeight -> FontWeight -> Ordering # (<) :: FontWeight -> FontWeight -> Bool # (<=) :: FontWeight -> FontWeight -> Bool # (>) :: FontWeight -> FontWeight -> Bool # (>=) :: FontWeight -> FontWeight -> Bool # max :: FontWeight -> FontWeight -> FontWeight # min :: FontWeight -> FontWeight -> FontWeight #

data FontStyle #

Data type for a font.

Constructors

FontStyle |
Fields _font_name :: String The font family or font face to use. _font_size :: Double The height of the rendered font in device coordinates. _font_slant :: FontSlant The slant to render with. _font_weight :: FontWeight The weight to render with. _font_color :: AlphaColour Double The color to render text with.

#### Instances

Instances details

Default FontStyle # | The default font style.
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods def :: FontStyle #
Show FontStyle # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> FontStyle -> ShowS # show :: FontStyle -> String # showList :: [FontStyle] -> ShowS #
Eq FontStyle # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: FontStyle -> FontStyle -> Bool # (/=) :: FontStyle -> FontStyle -> Bool #

data HTextAnchor #

Possible horizontal anchor points for text.

Constructors

HTA_Left |
HTA_Centre |
HTA_Right |

#### Instances

Instances details

Show HTextAnchor # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> HTextAnchor -> ShowS # show :: HTextAnchor -> String # showList :: [HTextAnchor] -> ShowS #
Eq HTextAnchor # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: HTextAnchor -> HTextAnchor -> Bool # (/=) :: HTextAnchor -> HTextAnchor -> Bool #
Ord HTextAnchor # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods compare :: HTextAnchor -> HTextAnchor -> Ordering # (<) :: HTextAnchor -> HTextAnchor -> Bool # (<=) :: HTextAnchor -> HTextAnchor -> Bool # (>) :: HTextAnchor -> HTextAnchor -> Bool # (>=) :: HTextAnchor -> HTextAnchor -> Bool # max :: HTextAnchor -> HTextAnchor -> HTextAnchor # min :: HTextAnchor -> HTextAnchor -> HTextAnchor #

data VTextAnchor #

Possible vertical anchor points for text.

Constructors

VTA_Top |
VTA_Centre |
VTA_Bottom |
VTA_BaseLine |

#### Instances

Instances details

Show VTextAnchor # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> VTextAnchor -> ShowS # show :: VTextAnchor -> String # showList :: [VTextAnchor] -> ShowS #
Eq VTextAnchor # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: VTextAnchor -> VTextAnchor -> Bool # (/=) :: VTextAnchor -> VTextAnchor -> Bool #
Ord VTextAnchor # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods compare :: VTextAnchor -> VTextAnchor -> Ordering # (<) :: VTextAnchor -> VTextAnchor -> Bool # (<=) :: VTextAnchor -> VTextAnchor -> Bool # (>) :: VTextAnchor -> VTextAnchor -> Bool # (>=) :: VTextAnchor -> VTextAnchor -> Bool # max :: VTextAnchor -> VTextAnchor -> VTextAnchor # min :: VTextAnchor -> VTextAnchor -> VTextAnchor #

data TextSize #

Text metrics returned by `textSize`.

Constructors

TextSize |
Fields textSizeWidth :: Double The total width of the text. textSizeAscent :: Double The ascent or space above the baseline. textSizeDescent :: Double The decent or space below the baseline. textSizeYBearing :: Double The Y bearing. textSizeHeight :: Double The total height of the text.

#### Instances

Instances details

Show TextSize # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> TextSize -> ShowS # show :: TextSize -> String # showList :: [TextSize] -> ShowS #
Eq TextSize # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: TextSize -> TextSize -> Bool # (/=) :: TextSize -> TextSize -> Bool #

newtype FillStyle #

Abstract data type for a fill style.

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

Constructors

FillStyleSolid |
Fields _fill_color :: AlphaColour Double

#### Instances

Instances details

Default FillStyle # | The default fill style.
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods def :: FillStyle #
Show FillStyle # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods showsPrec :: Int -> FillStyle -> ShowS # show :: FillStyle -> String # showList :: [FillStyle] -> ShowS #
Eq FillStyle # |
Instance details Defined in Graphics.Rendering.Chart.Backend.Types Methods (==) :: FillStyle -> FillStyle -> Bool # (/=) :: FillStyle -> FillStyle -> Bool #

type AlignmentFn = Point -> Point #

A function to align points for a certain rendering device.

data AlignmentFns #

Holds the point and coordinate alignment function.

Constructors

AlignmentFns |
Fields afPointAlignFn :: AlignmentFn An adjustment applied immediately prior to points being displayed in device coordinates. When device coordinates correspond to pixels, a cleaner image is created if this transform rounds to the nearest pixel. With higher-resolution output, this transform can just be the identity function. This is usually used to align prior to stroking. afCoordAlignFn :: AlignmentFn The adjustment applied immediately prior to coordinates being transformed. This is usually used to align prior to filling.

bitmapAlignmentFns :: AlignmentFns #

Alignment to render on raster based graphics.

vectorAlignmentFns :: AlignmentFns #

Alignment to render on vector based graphics.

line_cap :: Lens' LineStyle LineCap #

line_color :: Lens' LineStyle (AlphaColour Double) #

line_dashes :: Lens' LineStyle [Double] #

line_join :: Lens' LineStyle LineJoin #

line_width :: Lens' LineStyle Double #

font_color :: Lens' FontStyle (AlphaColour Double) #

font_name :: Lens' FontStyle String #

font_size :: Lens' FontStyle Double #

font_slant :: Lens' FontStyle FontSlant #

font_weight :: Lens' FontStyle FontWeight #

fill_color :: Iso' FillStyle (AlphaColour Double) #