Safe Haskell | None |
---|---|
Language | Haskell2010 |
Eventloop.Module.BasicShapes
Documentation
type GraphicalNumeric = Float Source
type Translation = Point Source
type Width = GraphicalNumeric Source
type Height = GraphicalNumeric Source
type Dimensions = (Width, Height) Source
type Radius = GraphicalNumeric Source
type Red = GraphicalNumeric Source
type Green = GraphicalNumeric Source
type Blue = GraphicalNumeric Source
type Alpha = GraphicalNumeric Source
type StrokeColor = Color Source
type UpperRight = Point Source
type LowerRight = Point Source
type AmountOfPoints = Int Source
type FontFamily = [Char] Source
type FontSize = GraphicalNumeric Source
data BasicShapesOut Source
Constructors
DrawShapes CanvasId [Shape] |
Constructors
BaseShape | |
Fields | |
CompositeShape | Should contain atleast 1 shape |
Fields
|
Constructors
Rectangle | Translation is upperleftcorner |
Fields
| |
Circle | Translation is center |
Fields
| |
Polygon | The first point of the polygon, always starts in the direction from the x-axis.(Towards x-infinity) |
Fields
| |
Text | Translation is center, does not have a boundingbox due to technical limitations |
Fields
| |
Line | |
MultiLine | |
Constructors
Rotation RotatePoint Angle | | Rotation is around a point on the canvas. May be the centre of the boundingbox (enclosing rectangle) or an arbitrary point. Angle is in degrees and counter-clockwise in the coördinate system(from the x-axis to the y-axis) and visually on canvas clock-wise. |
data BoundingBox Source
Constructors
BoundingBox LowerLeft UpperLeft UpperRight LowerRight | | The point indications are from the perspective of a regular Cartesian coördinate system. |
foldBoundingBoxes :: (BoundingBox -> BoundingBox -> BoundingBox) -> [BoundingBox] -> BoundingBox Source
opOnBoundingBox :: (Point -> Point) -> BoundingBox -> BoundingBox Source
allPolygonPoints :: AmountOfPoints -> Point -> Radius -> [Point] Source
roundPoint :: Point -> ScreenPoint Source
roundColor :: Color -> ScreenColor Source
class ToBoundingBox a => ToCenter a where Source
class ToBoundingBox a where Source
Methods
toBoundingBox :: a -> BoundingBox Source
findRotationPoint :: ToCenter a => a -> Rotation -> Point Source
class ToCanvasOperations a where Source
Methods
toCanvasOperations :: a -> [CanvasOperation] Source
Instances
class ToScreenPathPart a where Source
Methods
toScreenPathParts :: a -> ([ScreenPathPart], ScreenStartingPoint, Maybe FillColor) Source
Instances