forked from fmidue/codeworld
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFMIDUE.hs
More file actions
44 lines (34 loc) · 1.11 KB
/
FMIDUE.hs
File metadata and controls
44 lines (34 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{-# LANGUAGE NoImplicitPrelude #-}
module Internal.FMIDUE where
import Internal.Num
import Internal.Picture
import Internal.Color
import Internal.Text
import GHC.Stack
-- | A list of Points.
type Points = [Point]
-- | Unicode text.
type String = Text
-- | The type for numbers.
type Float = Number
-- | A picture rotated by this angle about the origin.
--
-- Angles are in radians.
rotate :: HasCallStack => (Picture, Number) -> Picture
rotate = rotated
-- | A picture drawn at the given coordinates.
move :: HasCallStack => (Picture, Number, Number) -> Picture
move = translated
-- | A picture drawn entirely in this color.
color :: HasCallStack => (Picture, Color) -> Picture
color = colored
-- | A rendering of text characters.
print :: HasCallStack => String -> Picture
print = lettering
-- | A picture scaled by these factors in the x and y directions. Scaling
-- by a negative factor also reflects across that axis.
scale :: HasCallStack => (Picture, Number, Number) -> Picture
scale = scaled
-- | A thin sequence of line segments, with these points as endpoints
path :: HasCallStack => Points -> Picture
path = polyline