Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type XY = V2 Int
- data LBox = LBox {
- _lBox_tl :: XY
- _lBox_size :: XY
- nilLBox :: LBox
- make_0area_lBox_from_XY :: XY -> LBox
- make_1area_lBox_from_XY :: XY -> LBox
- make_lBox_from_XYs :: XY -> XY -> LBox
- make_lBox_from_XYlist :: [XY] -> LBox
- does_lBox_contains_XY :: LBox -> XY -> Bool
- lBox_tl :: LBox -> XY
- lBox_area :: LBox -> Int
- lBox_to_axis :: LBox -> (Int, Int, Int, Int)
- translate_lBox :: XY -> LBox -> LBox
- add_XY_to_lBox :: XY -> LBox -> LBox
- make_lBox_from_axis :: (Int, Int, Int, Int) -> LBox
- union_lBox :: LBox -> LBox -> LBox
- lBox_expand :: LBox -> (Int, Int, Int, Int) -> LBox
- intersect_lBox :: LBox -> LBox -> Maybe LBox
- intersect_lBox_include_zero_area :: LBox -> LBox -> Maybe LBox
- does_lBox_intersect :: LBox -> LBox -> Bool
- does_lBox_intersect_include_zero_area :: LBox -> LBox -> Bool
- substract_lBox :: LBox -> LBox -> [LBox]
- data CanonicalLBox = CanonicalLBox Bool Bool LBox
- canonicalLBox_from_lBox :: LBox -> CanonicalLBox
- canonicalLBox_from_lBox_ :: LBox -> LBox
- lBox_from_canonicalLBox :: CanonicalLBox -> LBox
- deltaLBox_via_canonicalLBox :: CanonicalLBox -> DeltaLBox -> DeltaLBox
- lBox_isCanonicalLBox :: LBox -> Bool
- class Delta x dx where
- plusDelta :: x -> dx -> x
- minusDelta :: x -> dx -> x
- newtype DeltaXY = DeltaXY XY
- data DeltaLBox = DeltaLBox {}
- module Linear.V2
Documentation
a point in screen space should only be used by VC, so does not belong here newtype VPoint = VPoint (Int, Int) deriving (Generic, Show, FromJSON, ToJSON)
a box in logical space note size is non inclusive e.g. an LBox with size (1,1) is exactly 1 point at ul e.g. an LBox with size (0,0) contains nothing
LBox | |
|
Instances
FromJSON LBox Source # | |
ToJSON LBox Source # | |
Defined in Potato.Flow.Math | |
Generic LBox Source # | |
Show LBox Source # | |
Binary LBox Source # | |
NFData LBox Source # | |
Defined in Potato.Flow.Math | |
Eq LBox Source # | |
TransformMe LBox Source # | |
Defined in Potato.Flow.Methods.LineTypes | |
Delta LBox DeltaLBox Source # | |
type Rep LBox Source # | |
Defined in Potato.Flow.Math type Rep LBox = D1 ('MetaData "LBox" "Potato.Flow.Math" "tinytools-0.1.0.0-DrleRpyeSqeBtRJXQdRmv7" 'False) (C1 ('MetaCons "LBox" 'PrefixI 'True) (S1 ('MetaSel ('Just "_lBox_tl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 XY) :*: S1 ('MetaSel ('Just "_lBox_size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 XY))) |
make_0area_lBox_from_XY :: XY -> LBox Source #
returns a 0 area LBox
make_1area_lBox_from_XY :: XY -> LBox Source #
returns a 1 area LBox
make_lBox_from_XYlist :: [XY] -> LBox Source #
always returns a canonical LBox
lBox_to_axis :: LBox -> (Int, Int, Int, Int) Source #
(left, right, top, bottom) right and bottom are non-inclusive
add_XY_to_lBox :: XY -> LBox -> LBox Source #
always returns a canonical LBox bottom/right XYs cells are not included in
substract_lBox :: LBox -> LBox -> [LBox] Source #
substract lb2 from lb1 and return [LBox] representing the difference
data CanonicalLBox Source #
CanonicalLBox is always has non-negative width/height and tracks which axis are flipped to return back to original LBox first Bool is if x values are flipped, second is for y
canonicalLBox_from_lBox_ :: LBox -> LBox Source #
same as canonicalLBox_from_lBox but returns just the canonical LBox
lBox_isCanonicalLBox :: LBox -> Bool Source #
class Delta x dx where Source #
Instances
Instances
Generic DeltaLBox Source # | |
Show DeltaLBox Source # | |
NFData DeltaLBox Source # | |
Defined in Potato.Flow.Math | |
Eq DeltaLBox Source # | |
Delta LBox DeltaLBox Source # | |
type Rep DeltaLBox Source # | |
Defined in Potato.Flow.Math type Rep DeltaLBox = D1 ('MetaData "DeltaLBox" "Potato.Flow.Math" "tinytools-0.1.0.0-DrleRpyeSqeBtRJXQdRmv7" 'False) (C1 ('MetaCons "DeltaLBox" 'PrefixI 'True) (S1 ('MetaSel ('Just "_deltaLBox_translate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 XY) :*: S1 ('MetaSel ('Just "_deltaLBox_resizeBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 XY))) |
module Linear.V2