twentefp-eventloop-graphics-0.1.0.3: Used as Lab Assignments Environment at Univeriteit Twente

Safe HaskellSafe-Inferred
LanguageHaskell98

EventLoop.Output.Graphical

Synopsis

Documentation

data Graphical Source

Graphical Responses Out

Constructors

Draw GObject Groupname

Draw the graphical object with the given groupname.

MoveGroup Groupname Pos Relative

Move an entire group to a new position possibly relative to the old position.

MoveElement Name Pos Relative

Move a single element to a new position possibly relative to the old position.

RemoveGroup Groupname

Remove a group

RemoveElement Name

Remove an element.

data GObject Source

A general graphical object containing the common attributes of each Primitive.

Constructors

GObject

Graphical Object

Fields

name :: Name

Name of the graphical object/element

prim :: Primitive

The graphical primitive that should be drawn

children :: [GObject]

Children of the graphical primitive. Can be used to create composited graphical components containing multiple GObjects.

Container

A container for Graphical Objects

Fields

children :: [GObject]

Children of the graphical primitive. Can be used to create composited graphical components containing multiple GObjects.

Instances

data Primitive Source

Primitive graphical structures

Constructors

Text

The text graphical primitive

Fields

edgeColor :: Color

Color of the edges of the text

edgeThickness :: Float

The edge thickness of the text (Should be 1 most of the time)

color :: Color

The Color of the fill of the text

position :: Pos

The position on the screen of the text

size :: Float

The height of the text in pixels

font :: Font

Which font to be used

text :: [Char]

The actual text to be displayed

fromCenter :: Bool

Is the position the topleft corner of the text or the center of the text

Line

The line graphical primitive

Fields

edgeColor :: Color

Color of the edges of the text

edgeThickness :: Float

The edge thickness of the text (Should be 1 most of the time)

positions :: [Pos]

The list of positions the line should go through. A line will be drawn from point 1 to point 2 to point...

Rect

The rectangle graphical primitive

Fields

edgeColor :: Color

Color of the edges of the text

edgeThickness :: Float

The edge thickness of the text (Should be 1 most of the time)

color :: Color

The Color of the fill of the text

position :: Pos

The position on the screen of the text

dimensions :: Dimension

The dimensions of the rectangle

Arc

The arc graphical primitive. This is the part of a circle. When startAng=0 and endAng=360 you get a full circle.

Fields

edgeColor :: Color

Color of the edges of the text

edgeThickness :: Float

The edge thickness of the text (Should be 1 most of the time)

color :: Color

The Color of the fill of the text

position :: Pos

The position on the screen of the text

radius :: Float

The radius of the arc

startAng :: Float

The starting angle of the arc in degrees.

endAng :: Float

The ending angle of the arc in degrees.

type Name = [Char] Source

The name of a graphical object. Another synonym in the package used for this is Element.

type Groupname = [Char] Source

The groupname of a set of graphical objects.

type Color = (Float, Float, Float) Source

The color expressed in (red, green, blue) code where each value is between 0 <= 255.

type Font = [Char] Source

The font associated with a Text primitive.

type Relative = Bool Source

A boolean expressing if an event should be carried out relative to the old situation or to the absolute situation Example of this is when moving an element. Should the move be relative to the old Pos or to the absolute Pos on the screen.