yampa-sdl2-0.1.0.2: Yampa and SDL2 made easy

Safe HaskellNone
LanguageHaskell2010

YampaSDL2.Draw

Contents

Synopsis

Draw functions

circle Source #

Arguments

:: Center

center of the circle

-> Double

radius

-> ShapeColour

colour

-> Int

zIndex

-> RenderObject 

Draw a circle

Example:

circle (V2 0 0) 100 (Filled orange) 2

rectangle Source #

Arguments

:: Center

center of the rectangle

-> V2 Double

size

-> ShapeColour

colour

-> Int

zIndex

-> RenderObject 

Draw a rectangle

Example:

rectangle (V2 0 0) (V2 100 200) (Filled blue) 3

image Source #

Arguments

:: Center

set the center point of the image

-> V2 Double

set the size of the image (V2 length height)

-> Maybe (V2 Double)

you can only use a part of the image, Nothing for the whole image

-> String

the file name, image must be in BMP format

-> Int

zIndex

-> RenderObject 

Draw an image

Example:

image (V2 0 0) (V2 800 600) Nothing "./path/to/image.bmp" 0