HGamer3D-Data-0.3.0: Game Engine for the Haskell Programmer - Data Definitions and Utilities

Safe HaskellSafe-Inferred

HGamer3D.Data.ScreenGeometry

Contents

Description

Type definitions for 2D geometry and windows

Synopsis

Windowing

data Window Source

A window is simply represented by it's window id, an unsigned C int

Constructors

Window Int 

Geometry

data Point Source

A point has two coordinates an x and y one

Constructors

Point 

Fields

ptX :: Int
 
ptY :: Int
 

Instances

data Rectangle Source

A rectangle has an a position as x and y and widht and height

Constructors

Rectangle 

Fields

rectX :: Int
 
rectY :: Int
 
rectWidth :: Int
 
rectHeight :: Int
 

rectFromPoints :: Point -> Point -> RectangleSource

derive a rectangle from upper left and lower right points

pointsFromRect :: Rectangle -> (Point, Point)Source

get upper left and lower right point from a rect