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

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

Diagrams.Parametric.Adjust

Description

Tools for adjusting the length of parametric objects such as segments and trails.

Synopsis

- adjust :: (N t ~ n, Sectionable t, HasArcLength t, Fractional n) => t -> AdjustOpts n -> t
- data AdjustOpts n
- adjMethod :: Lens' (AdjustOpts n) (AdjustMethod n)
- adjSide :: Lens' (AdjustOpts n) AdjustSide
- adjEps :: Lens' (AdjustOpts n) n
- data AdjustMethod n
  - = ByParam n
  - | ByAbsolute n
  - | ToAbsolute n
- data AdjustSide
  - = Start
  - | End
  - | Both

# Documentation

adjust :: (N t ~ n, Sectionable t, HasArcLength t, Fractional n) => t -> AdjustOpts n -> t Source #

Adjust the length of a parametric object such as a segment or trail. The second parameter is an option record which controls how the adjustment should be performed; see `AdjustOpts`.

data AdjustOpts n Source #

How should a segment, trail, or path be adjusted?

Instances

Fractional n => Default (AdjustOpts n) Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods def :: AdjustOpts n Source #

adjMethod :: Lens' (AdjustOpts n) (AdjustMethod n) Source #

Which method should be used for adjusting?

adjSide :: Lens' (AdjustOpts n) AdjustSide Source #

Which end(s) of the object should be adjusted?

adjEps :: Lens' (AdjustOpts n) n Source #

Tolerance to use when doing adjustment.

data AdjustMethod n Source #

What method should be used for adjusting a segment, trail, or path?

Constructors

ByParam n | Extend by the given parameter value (use a negative parameter to shrink)
ByAbsolute n | Extend by the given arc length (use a negative length to shrink)
ToAbsolute n | Extend or shrink to the given arc length

Instances

Fractional n => Default (AdjustMethod n) Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods def :: AdjustMethod n Source #

data AdjustSide Source #

Which side of a segment, trail, or path should be adjusted?

Constructors

Start | Adjust only the beginning
End | Adjust only the end
Both | Adjust both sides equally

Instances

Bounded AdjustSide Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods minBound :: AdjustSide Source # maxBound :: AdjustSide Source #
Enum AdjustSide Source # |

Instance details

Defined in Diagrams.Parametric.Adjust

Methods

succ :: AdjustSide -> AdjustSide Source #

pred :: AdjustSide -> AdjustSide Source #

toEnum :: Int -> AdjustSide Source #

fromEnum :: AdjustSide -> Int Source #

enumFrom :: AdjustSide -> [AdjustSide] Source #

enumFromThen :: AdjustSide -> AdjustSide -> [AdjustSide] Source #

enumFromTo :: AdjustSide -> AdjustSide -> [AdjustSide] Source #

enumFromThenTo :: AdjustSide -> AdjustSide -> AdjustSide -> [AdjustSide] Source #

Eq AdjustSide Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods (==) :: AdjustSide -> AdjustSide -> Bool Source # (/=) :: AdjustSide -> AdjustSide -> Bool Source #
Ord AdjustSide Source # |

Instance details

Defined in Diagrams.Parametric.Adjust

Methods

compare :: AdjustSide -> AdjustSide -> Ordering Source #

(<) :: AdjustSide -> AdjustSide -> Bool Source #

(<=) :: AdjustSide -> AdjustSide -> Bool Source #

(>) :: AdjustSide -> AdjustSide -> Bool Source #

(>=) :: AdjustSide -> AdjustSide -> Bool Source #

max :: AdjustSide -> AdjustSide -> AdjustSide Source #

min :: AdjustSide -> AdjustSide -> AdjustSide Source #

Read AdjustSide Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods readsPrec :: Int -> ReadS AdjustSide Source # readList :: ReadS [AdjustSide] Source # readPrec :: ReadPrec AdjustSide Source # readListPrec :: ReadPrec [AdjustSide] Source #
Show AdjustSide Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods showsPrec :: Int -> AdjustSide -> ShowS Source # show :: AdjustSide -> String Source # showList :: [AdjustSide] -> ShowS Source #
Default AdjustSide Source # |
Instance details Defined in Diagrams.Parametric.Adjust Methods def :: AdjustSide Source #