diagrams-contrib-1.4.0.1: Collection of user contributions to diagrams EDSL

Copyright(c) 2013 Brent Yorgey
LicenseBSD-style (see LICENSE)
Maintainerbyorgey@cis.upenn.edu
Safe HaskellNone
LanguageHaskell2010

Diagrams.TwoD.Path.Calligraphic

Description

Create "calligraphic" strokes by filling between two offset copies of a curve.

Synopsis

Documentation

calligraphic :: (Floating n, Ord n) => V2 n -> Trail' Line V2 n -> Trail' Loop V2 n Source #

calligraphic pen t creates a "calligraphic" variant of t by filling between two copies of t offset by the pen vector.

import Diagrams.Coordinates
import Diagrams.TwoD.Path.Calligraphic

curve = cubicSpline False [1 ^& 1, 2 ^& 5, 5 ^& 6, 8 ^& 12]
      # scale 3

calligraphicEx =
  [ circle 15 # calligraphic (2 ^& 1)
  , curve     # calligraphic (2 ^& 2)
  ]
  # map (centerXY . strokeLoop)
  # fc black
  # hcat' (with & sep .~ 10)