diagrams-lib-1.3.0.8: Embedded domain-specific language for declarative graphics

Copyright | (c) 2011 diagrams-lib team (see LICENSE)
License | BSD-style (see LICENSE)
Maintainer | diagrams-discuss@googlegroups.com
Safe Haskell | None
Language | Haskell2010

Diagrams.TwoD.Model

Contents

- Showing the local origin
- Showing an approximation of the envelope
- Showing an approximation of the trace
- Showing labels of all named subdiagrams

Description

Tools for visualizing diagrams' internal model: local origins, envelopes, traces, etc.

Synopsis

- showOrigin :: (TypeableFloat n, Renderable (Path V2 n) b, Monoid' m) => QDiagram b V2 n m -> QDiagram b V2 n m
- showOrigin' :: (TypeableFloat n, Renderable (Path V2 n) b, Monoid' m) => OriginOpts n -> QDiagram b V2 n m -> QDiagram b V2 n m
- data OriginOpts n = OriginOpts {
  - _oColor :: Colour Double
  - _oScale :: n
  - _oMinSize :: n
  }
- oColor :: forall n. Lens' (OriginOpts n) (Colour Double)
- oScale :: forall n. Lens' (OriginOpts n) n
- oMinSize :: forall n. Lens' (OriginOpts n) n
- showEnvelope :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => QDiagram b V2 n Any -> QDiagram b V2 n Any
- showEnvelope' :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => EnvelopeOpts n -> QDiagram b V2 n Any -> QDiagram b V2 n Any
- data EnvelopeOpts n = EnvelopeOpts {
  - _eColor :: Colour Double
  - _eLineWidth :: Measure n
  - _ePoints :: Int
  }
- eColor :: forall n. Lens' (EnvelopeOpts n) (Colour Double)
- eLineWidth :: forall n n. Lens (EnvelopeOpts n) (EnvelopeOpts n) (Measure n) (Measure n)
- ePoints :: forall n. Lens' (EnvelopeOpts n) Int
- showTrace :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => QDiagram b V2 n Any -> QDiagram b V2 n Any
- showTrace' :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => TraceOpts n -> QDiagram b V2 n Any -> QDiagram b V2 n Any
- data TraceOpts n = TraceOpts {
  - _tColor :: Colour Double
  - _tScale :: n
  - _tMinSize :: n
  - _tPoints :: Int
  }
- tColor :: forall n. Lens' (TraceOpts n) (Colour Double)
- tScale :: forall n. Lens' (TraceOpts n) n
- tMinSize :: forall n. Lens' (TraceOpts n) n
- tPoints :: forall n. Lens' (TraceOpts n) Int
- showLabels :: (TypeableFloat n, Renderable (Text n) b, Semigroup m) => QDiagram b V2 n m -> QDiagram b V2 n Any

# Showing the local origin

showOrigin :: (TypeableFloat n, Renderable (Path V2 n) b, Monoid' m) => QDiagram b V2 n m -> QDiagram b V2 n m Source

Mark the origin of a diagram by placing a red dot 1/50th its size.

showOrigin' :: (TypeableFloat n, Renderable (Path V2 n) b, Monoid' m) => OriginOpts n -> QDiagram b V2 n m -> QDiagram b V2 n m Source

Mark the origin of a diagram, with control over colour and scale of marker dot.

data OriginOpts n Source

Constructors

OriginOpts |

Fields

_oColor :: Colour Double
_oScale :: n
_oMinSize :: n

Instances

Fractional n => Default (OriginOpts n) Source |

oColor :: forall n. Lens' (OriginOpts n) (Colour Double) Source

oScale :: forall n. Lens' (OriginOpts n) n Source

oMinSize :: forall n. Lens' (OriginOpts n) n Source

# Showing an approximation of the envelope

showEnvelope :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => QDiagram b V2 n Any -> QDiagram b V2 n Any Source

Mark the envelope with an approximating cubic spline using 32 points, medium line width and red line color.

showEnvelope' :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => EnvelopeOpts n -> QDiagram b V2 n Any -> QDiagram b V2 n Any Source

Mark the envelope with an approximating cubic spline with control over the color, line width and number of points.

data EnvelopeOpts n Source

Constructors

EnvelopeOpts |

Fields

_eColor :: Colour Double
_eLineWidth :: Measure n
_ePoints :: Int

Instances

OrderedField n => Default (EnvelopeOpts n) Source |

eColor :: forall n. Lens' (EnvelopeOpts n) (Colour Double) Source

eLineWidth :: forall n n. Lens (EnvelopeOpts n) (EnvelopeOpts n) (Measure n) (Measure n) Source

ePoints :: forall n. Lens' (EnvelopeOpts n) Int Source

# Showing an approximation of the trace

showTrace :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => QDiagram b V2 n Any -> QDiagram b V2 n Any Source

Mark the trace of a diagram by placing 64 red dots 1/100th its size along the trace.

showTrace' :: (Enum n, TypeableFloat n, Renderable (Path V2 n) b) => TraceOpts n -> QDiagram b V2 n Any -> QDiagram b V2 n Any Source

Mark the trace of a diagram, with control over colour and scale of marker dot and the number of points on the trace.

data TraceOpts n Source

Constructors

TraceOpts |

Fields

_tColor :: Colour Double
_tScale :: n
_tMinSize :: n
_tPoints :: Int

Instances

Floating n => Default (TraceOpts n) Source |

tColor :: forall n. Lens' (TraceOpts n) (Colour Double) Source

tScale :: forall n. Lens' (TraceOpts n) n Source

tMinSize :: forall n. Lens' (TraceOpts n) n Source

tPoints :: forall n. Lens' (TraceOpts n) Int Source

# Showing labels of all named subdiagrams

showLabels :: (TypeableFloat n, Renderable (Text n) b, Semigroup m) => QDiagram b V2 n m -> QDiagram b V2 n Any Source