Safe Haskell | None |
---|---|
Language | Haskell2010 |
- setupBasicShapesModuleConfiguration :: EventloopSetupModuleConfiguration
- basicShapesModuleIdentifier :: EventloopModuleIdentifier
- basicShapesPostProcessor :: PostProcessor
- type GraphicalNumeric = Float
- type Position = Point
- type Width = GraphicalNumeric
- type Height = GraphicalNumeric
- type Dimensions = (Width, Height)
- type Radius = GraphicalNumeric
- type Red = GraphicalNumeric
- type Green = GraphicalNumeric
- type Blue = GraphicalNumeric
- type Alpha = GraphicalNumeric
- type Color = (Red, Green, Blue, Alpha)
- type FillColor = Color
- type StrokeColor = Color
- type FillThickness = GraphicalNumeric
- type StrokeLineThickness = GraphicalNumeric
- type UpperLeft = Point
- type UpperRight = Point
- type LowerLeft = Point
- type LowerRight = Point
- type NumberOfPoints = Int
- type FontFamily = [Char]
- type FontSize = GraphicalNumeric
- data BasicShapesOut = DrawShapes CanvasId [Shape]
- data Shape
- = CompositeShape { }
- | Rectangle { }
- | Circle { }
- | RegularPolygon { }
- | Text { }
- | Line { }
- | MultiLine { }
- | FilledMultiLine { }
- | Polygon { }
- data Rotation = Rotation RotatePoint Angle
- data RotatePoint
- data BoundingBox = BoundingBox LowerLeft UpperLeft UpperRight LowerRight
- type CanvasId = NumericId
- data Alignment
- data GeometricPrimitive
- = Points [Point]
- | CircleArea Point Radius
- opOnBoundingBox :: (Point -> Point) -> BoundingBox -> BoundingBox
- allRegularPolygonPoints :: NumberOfPoints -> Point -> Radius -> [Point]
- boundingBoxFromPrimitives :: [GeometricPrimitive] -> BoundingBox
- normalizeBBox :: BoundingBox -> BoundingBox
- roundPoint :: Point -> ScreenPoint
- roundColor :: Color -> ScreenColor
- strokePointsForLine :: StrokeLineThickness -> Point -> Point -> [Point]
- strokePointsForConnection :: StrokeLineThickness -> Point -> Point -> Point -> [Point]
- strokePoints :: StrokeLineThickness -> [Point] -> [Point]
- strokePointsClosedPath :: StrokeLineThickness -> [Point] -> [Point]
- class ToPrimitives a where
- class ToCenter a where
- class ToPrimitives a => ToBoundingBox a where
- class ToBoundingBox a => Overlaps a where
- findRotationPoint :: ToCenter a => a -> Rotation -> Point
- class ToCanvasOut a where
- class ToCanvasOperations a where
- toCanvasText :: Shape -> CanvasText
- class ToScreenPathPart a where
- toCanvasPathFill :: Shape -> PathFill
- hasCanvasPathFill :: Shape -> Bool
- allScreenPolygonPoints :: Shape -> [Point]
Documentation
type GraphicalNumeric = Float 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 FillThickness = GraphicalNumeric Source #
type UpperRight = Point Source #
type LowerRight = Point Source #
type NumberOfPoints = Int Source #
type FontFamily = [Char] Source #
type FontSize = GraphicalNumeric Source #
data BasicShapesOut Source #
CompositeShape | Should contain atleast 1 shape. Rotation before Position |
Rectangle | | Position is upperleftcorner. Position is the corner closes to origin. Visually in canvas, this is top left. In a Cartesian coördinate system, this is bottom left. |
Circle | | Position is center |
RegularPolygon | The first point of the regular polygon, always starts in the direction from the x-axis.(Towards x-infinity). Position is the the centre of the regular polygon |
Text | |
| |
Line | |
MultiLine | |
| |
FilledMultiLine | |
| |
Polygon | |
|
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 RotatePoint Source #
data BoundingBox Source #
BoundingBox LowerLeft UpperLeft UpperRight LowerRight | | The point indications are from the perspective of a regular Cartesian coördinate system. |
Opcode: 1500
AlignLeft | Opcode: 1501 |
AlignRight | Opcode: 1502 |
AlignCenter | Opcode: 1503 |
data GeometricPrimitive Source #
opOnBoundingBox :: (Point -> Point) -> BoundingBox -> BoundingBox Source #
allRegularPolygonPoints :: NumberOfPoints -> Point -> Radius -> [Point] Source #
roundPoint :: Point -> ScreenPoint Source #
roundColor :: Color -> ScreenColor Source #
strokePointsForLine :: StrokeLineThickness -> Point -> Point -> [Point] Source #
strokePointsForConnection :: StrokeLineThickness -> Point -> Point -> Point -> [Point] Source #
strokePoints :: StrokeLineThickness -> [Point] -> [Point] Source #
strokePointsClosedPath :: StrokeLineThickness -> [Point] -> [Point] Source #
class ToPrimitives a where Source #
toPrimitives :: a -> [GeometricPrimitive] Source #
class ToPrimitives a => ToBoundingBox a where Source #
toBoundingBox :: a -> BoundingBox Source #
class ToBoundingBox a => Overlaps a where Source #
class ToCanvasOut a where Source #
toCanvasOut :: a -> CanvasOut Source #
class ToCanvasOperations a where Source #
toCanvasOperations :: a -> [CanvasOperation] Source #
toCanvasText :: Shape -> CanvasText Source #
class ToScreenPathPart a where Source #
toScreenPathParts :: a -> Maybe ([ScreenPathPart], ScreenStartingPoint) Source #
toCanvasPathFill :: Shape -> PathFill Source #
hasCanvasPathFill :: Shape -> Bool Source #
allScreenPolygonPoints :: Shape -> [Point] Source #