cnc-pattern-lib-0.1.0.0: Haskell library for creating SVG patterns for CNC routers

Safe HaskellNone
LanguageHaskell2010

Rectangle

Description

A type representing a parallelogram (doesn't just have to be a rectangle).

Synopsis

Documentation

data Rectangle Source #

Constructors

Rectangle 
Instances
Eq Rectangle Source # 
Instance details

Defined in Rectangle

Show Rectangle Source # 
Instance details

Defined in Rectangle

ApproxEq Rectangle Source # 
Instance details

Defined in Rectangle

Mergable Rectangle Source # 
Instance details

Defined in Rectangle

Transformable Rectangle Source # 
Instance details

Defined in Rectangle

SvgShape Rectangle Source # 
Instance details

Defined in Rectangle

Methods

toSvg :: Rectangle -> Svg Source #

mkRectangle :: Point -> Point -> Rectangle Source #

Constructor for a rectangle; supply one point for the top left and one point for the bottom right.

mapPoints :: (Point -> Point) -> Rectangle -> Rectangle Source #

Map a function over each point in the rectangle.

origin :: Rectangle -> Point Source #

Midpoint of a rectangle.

asLines :: Rectangle -> [Line] Source #

Convert a rectangle to a list of lines