SFML-2.3.2.1: SFML bindings

Safe HaskellNone
LanguageHaskell98

SFML.Graphics.Rect

Synopsis

Documentation

data FloatRect Source

Utility class for manipulating rectangles.

Constructors

FloatRect 

Fields

fleft :: Float
 
ftop :: Float
 
fwidth :: Float
 
fheight :: Float
 

data IntRect Source

Utility class for manipulating rectangles.

Constructors

IntRect 

Fields

ileft :: Int
 
itop :: Int
 
iwidth :: Int
 
iheight :: Int
 

class Rect a where Source

Methods

intersectRect Source

Arguments

:: a

First rectangle to test

-> a

Second rectangle to test

-> Maybe a

Overlapping rect

Check intersection between two rectangles.

floatRectContains Source

Arguments

:: Float

X coordinate of the point to test

-> Float

Y coordinate of the point to test

-> FloatRect

Rectangle to test

-> Bool 

Check if a point is inside a rectangle's area.

intRectContains Source

Arguments

:: Int

X coordinate of the point to test

-> Int

Y coordinate of the point to test

-> IntRect

Rectangle to test

-> Bool 

Check if a point is inside a rectangle's area.