hsql-1.8.2: Database access from Haskell.

Safe Haskell | None

DB.HSQL.Type.Geometric

Description

Geometric 2D types, equipped with `SqlBind` instances.

Synopsis

- data Point = Point {
  - pointX :: Double
  - pointY :: Double
  }
- data Line = Line {
  - lineBegin :: Point
  - lineEnd :: Point
  }
- data Path
  - = OpenPath {
    - pathPoints :: [Point]
    }
  - | ClosedPath {
    - pathPoints :: [Point]
    }
- data Box = Box {
  - boxX1 :: Double
  - boxY1 :: Double
  - boxX2 :: Double
  - boxY2 :: Double
  }
- data Polygon = Polygon {
  - polygonPoints :: [Point]
  }
- data Circle = Circle {
  - circleCenter :: Point
  - circleRadius :: Double
  }

# Documentation

data Point Source

A 2D point.

Constructors

Point |

Fields

pointX :: Double
pointY :: Double

Instances

Eq Point |
Ord Point |
Read Point |
Show Point |
SqlBind Point |

data Line Source

A 2D straight line.

Constructors

Line |

Fields

lineBegin :: Point
lineEnd :: Point

Instances

Eq Line |
Read Line |
Show Line |
SqlBind Line |

data Path Source

A 2D path, either open, or closed (looping).

Constructors

OpenPath | An open path

Fields

pathPoints :: [Point]

ClosedPath | A looping path

Fields

pathPoints :: [Point]

Instances

Eq Path |
Read Path |
Show Path |
SqlBind Path |

data Box Source

A 2D rectangle.

Constructors

Box |

Fields

boxX1 :: Double
boxY1 :: Double
boxX2 :: Double
boxY2 :: Double

Instances

Eq Box |
Read Box |
Show Box |
SqlBind Box |

data Polygon Source

A 2D polygon (without holes).

Constructors

Polygon |

Fields

polygonPoints :: [Point]

Instances

Eq Polygon |
Read Polygon |
Show Polygon |
SqlBind Polygon |

data Circle Source

A 2D circle

Constructors

Circle |

Fields

circleCenter :: Point
circleRadius :: Double

Instances

Eq Circle |
Read Circle |
Show Circle |
SqlBind Circle |