data Bounds : Type Bounds along one axis in an affine space
Totality: total
Visibility: export
Constructors:
Empty : Bounds Bounds without extent. Contains no points.
Rng : Double -> Double -> Bounds Concrete bounds.
Hints:
Monoid Bounds Semigroup Bounds
getBounds : Bounds -> Maybe (Double, Double) Extract the inner structure of a `Bounds` values.
Mostly useful for debugging.
Totality: total
Visibility: exportempty : Bounds The empty bounds.
Totality: total
Visibility: exportval : Double -> Bounds A single point on an axis.
Totality: total
Visibility: exportrange : Double -> Double -> Bounds the range between two points on a line
Totality: total
Visibility: exportexpand : Bounds -> Bounds -> Bounds Return the smallest `Bounds` containing all points in both
argument bounds.
Totality: total
Visibility: exportinBounds1D : {default 0.0 _ : Double} -> Double -> Bounds -> Bool Checks if a value is within the given bounds.
Totality: total
Visibility: exportmiddle : Bounds -> Maybe Double Computes the middle (center) of a range. Returns `Nothing` if the `Bounds`
are empty.
Totality: total
Visibility: exportwidth : Bounds -> Double Computes the width of some bounds. Returns `0` if the `Bounds` are empty
Totality: total
Visibility: exporthalfWidth : Bounds -> Double Computes half of the width of some bounds.
Returns `0` if the `Bounds` are empty
Totality: total
Visibility: exportoverlap : {default 0.0 _ : Double} -> Bounds -> Bounds -> Bounds Compounds the overlapping region between two bounds in
one direction.
Totality: total
Visibility: exportrecord Bounds2D : AffineTransformation -> Type Bounds in two dimensions.
Totality: total
Visibility: public export
Constructor: BS : Bounds -> Bounds -> Bounds2D t
Projections:
.x : Bounds2D t -> Bounds .y : Bounds2D t -> Bounds
Hints:
Bounded (Bounds2D t) Monoid (Bounds2D t) Semigroup (Bounds2D t)
.x : Bounds2D t -> Bounds- Totality: total
Visibility: public export x : Bounds2D t -> Bounds- Totality: total
Visibility: public export .y : Bounds2D t -> Bounds- Totality: total
Visibility: public export y : Bounds2D t -> Bounds- Totality: total
Visibility: public export width : Bounds2D t -> Double- Totality: total
Visibility: export height : Bounds2D t -> Double- Totality: total
Visibility: export overlap : {default 0.0 _ : Double} -> Bounds2D t -> Bounds2D t -> Bounds2D t Computes the overlapping rectangle between 2D bounds.
Totality: total
Visibility: exportinBounds : {default 0.0 _ : Double} -> Point t -> Bounds2D t -> Bool Checks, if the point is in within some bounds in its affine space
by two points.
Totality: total
Visibility: exportcorners : Bounds2D t -> Maybe (Point t, Point t) Return the corners of a bounding rectangle (if any)
Totality: total
Visibility: exportinterface Bounded : Type -> Type- Parameters: a
Constructor: BD
Methods:
btrans : AffineTransformation bounds : a -> Bounds2D btrans
Implementations:
Bounded (Bounds2D t) Foldable f => Bounded a => Bounded (f a) GetPoint a => Bounded a Bounded Rect
btrans : Bounded a => AffineTransformation- Totality: total
Visibility: public export bounds : {auto __con : Bounded a} -> a -> Bounds2D btrans- Totality: total
Visibility: public export convertBounds : Bounds2D s -> Bounds2D t- Totality: total
Visibility: export center : {auto b : Bounded a} -> a -> Point btrans Calculates the center in a collection of bounded values.
Returns the origin in case of an object with empty bounds.
Totality: total
Visibility: exportinRectangle : Point t -> Point t -> Point t -> Bool Checks, if the point is in or on the line of a rectangel defined
by two points.
Totality: total
Visibility: exporttranslatePositive : ModPoint a => Bounded a => a -> a Translates a bounded value so that the lower-left corner of its
bound will come to lie at the origin.
Totality: total
Visibility: exportdistanceToLineSegment : Point t -> Point t -> Point t -> Double Computes the distance of a point `p` from the line segment
between points `pl1` and `pl2`.
Totality: total
Visibility: exportrecord PackParams : Type- Totality: total
Visibility: public export
Constructor: PP : Double -> Double -> Nat -> Double -> PackParams
Projections:
.gapX : PackParams -> Double Horizontal gap between adjacent rectangles
.gapY : PackParams -> Double Vertical gap between adjacent rectangles
.iter : PackParams -> Nat Maximum number of iterations used in the binary search
to find the ideal packaging size
.ratio : PackParams -> Double Width-to-height ratio used when aligning the containers
.gapX : PackParams -> Double Horizontal gap between adjacent rectangles
Totality: total
Visibility: public exportgapX : PackParams -> Double Horizontal gap between adjacent rectangles
Totality: total
Visibility: public export.gapY : PackParams -> Double Vertical gap between adjacent rectangles
Totality: total
Visibility: public exportgapY : PackParams -> Double Vertical gap between adjacent rectangles
Totality: total
Visibility: public export.iter : PackParams -> Nat Maximum number of iterations used in the binary search
to find the ideal packaging size
Totality: total
Visibility: public exportiter : PackParams -> Nat Maximum number of iterations used in the binary search
to find the ideal packaging size
Totality: total
Visibility: public export.ratio : PackParams -> Double Width-to-height ratio used when aligning the containers
Totality: total
Visibility: public exportratio : PackParams -> Double Width-to-height ratio used when aligning the containers
Totality: total
Visibility: public exportalign : {default dflt _ : PackParams} -> Bounded a => ModPoint a => List a -> List a Packs rectangular objects in a grid using a guillotine cutting
algorithm.
The minimal size of the rectangle required to pack the items is
computed via a binary search (maximum number of iterations is
given via the `PackParams` argument).
Gap sizes in both directions can be specified by the provided
`PackParams` argument.
Totality: total
Visibility: export