CV-0.3.5.4: OpenCV based machine vision library

Safe HaskellSafe-Infered

Utils.Rectangle

Synopsis

Documentation

data Rectangle a Source

Constructors

Rectangle !a !a !a !a 

Instances

s :: NFData a => a -> t -> tSource

right :: Num a => Rectangle a -> aSource

bottom :: Num a => Rectangle a -> aSource

topLeft :: Rectangle t -> (t, t)Source

topRight :: Num t => Rectangle t -> (t, t)Source

bottomLeft :: Num t => Rectangle t -> (t, t)Source

bottomRight :: Num t => Rectangle t -> (t, t)Source

vertices :: Num t => Rectangle t -> [(t, t)]Source

rSize :: Rectangle t -> (t, t)Source

rArea :: Num a => Rectangle a -> aSource

center :: Fractional t => Rectangle t -> (t, t)Source

centerI :: Integral t => Rectangle t -> (t, t)Source

around :: (Fractional a, Ord a) => (a, a) -> (a, a) -> Rectangle aSource

Create rectangle around point (x,y)

mkRectangle :: (Num a, Ord a) => (a, a) -> (a, a) -> Rectangle aSource

mkRectCorners :: (Num a, Ord a) => (a, a) -> (a, a) -> Rectangle aSource

fromPtSize :: (a, a) -> (a, a) -> Rectangle aSource

inCoords :: Num t => Rectangle t -> Rectangle t -> ((t, t), (t, t)) -> Rectangle (t, t)Source

Return rectangle r2 in coordinate system defined by r1

inCoords' :: Num t => Rectangle t -> (t, t) -> (t, t)Source

Return a point in coordinates of given rectangle

enlargeToNthPower :: (Integral a, Integral b) => b -> Rectangle a -> Rectangle aSource

 Adjust the size of the rectangle to be divisible by 2^n.

contains :: (Num a, Ord a) => Rectangle a -> Rectangle a -> BoolSource

intersect1D :: Ord a => (a, a) -> (a, a) -> BoolSource

prop_intersect1DCommutes :: Ord a => (a, a) -> (a, a) -> BoolSource

tile :: (Enum a, Num a, Ord a) => (a, a) -> (a, a) -> Rectangle a -> [Rectangle a]Source

Create a tiling of a rectangles.

scale :: (Integral a3, Integral a, RealFrac a2, RealFrac a1) => (a1, a2) -> Rectangle a3 -> Rectangle aSource

Scale a rectangle