-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocumentation
115 lines (75 loc) · 5.28 KB
/
documentation
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Function usages, argument parameters, and examples.
f-background [& colors]
"Takes in one through four RBG values (look at quil's fill function for exact RGB parameters) and sets the background of the drawn screen to that."
f-text [string x y]
"Draws the given text at the given x y position."
f-text-num [number x y]
"Draws the given number at the given x y position."
f-text-size [size]
"Changes the size of all following text to the given size. The default size is 12."
create-ellipse [width height & colors]
"Takes in width, height, and one through four RBG values (look at quil's fill function for exact RGB parameters).
Creates a hashmap of the information relevant to the shape and its draw position and values needed by the ds function."
create-arc [width height start stop & colors]
"Takes in a width, height, starting angle, ending angle, and one through four RBG values (look at quil's fill function for exact RGB parameters).
The start and stop angles are measured in degrees, with 0 or 360 being 3 o'clock.
Creates a hashmap of the information relevant to the shape and its draw position and the values needed by the ds function."
create-line [x2 y2 stroke & colors]
"Takes in one x and y position, a stroke weight, and one through four RBG values (look at quil's fill function for exact RGB parameters).
The first position is automatically (0,0) and the line is drawn to the specified (x,y).
Creates a hashmap of the information relevant to the shape and its draw position and the values needed by the ds function."
create-triangle [x2 y2 x3 y3 & colors]
"Takes in two x and y positions and one through four RBG values (look at quil's fill function for exact RGB parameters).
The position of the first vertex is automatically (0,0) so the triangle will be drawn based off that point.
Creates a hashmap of the information relevant to the shape and its draw position and the values needed by the ds function."
create-quad [x2 y2 x3 y3 x4 y4 & colors]
"Takes in three pairs x and y positions, ordered x2 y2 x3 y3 x4 y4, and one through four RBG values (look at quil's fill function for exact RGB parameters).
The position of the first vertex is automatically (0,0) so the quad will be drawn based on that point.
Creates a hashmap of the information relevant to the shape and its draw position and the values needed by the ds function."
create-picture [pic]
"Takes in a string of the image location, ex. \"src/images/SquidwardsEmbarrasingPhoto.jpg\".
Creates a hashmap of the information relevant to the shape and its draw position and values needed by the ds function."
create-rect [width height & colors]
"Takes in width, height, and one through four RBG values (look at quil's fill function for exact RGB parameters).
Creates a hashmap of the information relevant to the shape and its draw position and values needed by the ds function."
ds [shape x y]
"ds (or draw-shape) takes in a shape, an x position to be drawn at, and a y position to be drawn at.
Calls the internal function :ds of the shape or image hashmap with the input variables passed to it and draws the shape or image accordingly."
draw-shape [shape x y]
"Serves the same functionality of ds."
above [& shapes]
"Takes 1 or more shapes and puts them above each other.
The first argument will be on the top, the last argument will be on the bottom.
This returns a new complex shape."
beside [& shapes]
"Takes 1 or more shapes and puts them beside each other.
The first argument will be on the left, the last argument will be on the right.
This returns a new complex shape."
overlay [& shapes]
"Takes 1 or more shapes and overlays them on each other.
The first argument will be in the foreground of the shape, the last argument will be the background of the shape.
This returns a new complex shape."
overlay-align [vertical horizonal & shapes]
"Takes in a first argument of :top :center or :bottom for the vertical orientation, a second argument of :left :center or :right for the horizontal orientation,
and 1 or more shapes and overlays them on each other with the specified orientation.
The first argument will be in the foreground of the shape, the last argument will be the background of the shape.
This returns a new complex shape."
above-align [align & shapes]
"Takes in a first argument of :right :left for the vertical orientation,
and 1 or more shapes and puts them above each other with the specified alignment.
The first argument will be on top, the last argument will be on bottom.
This returns a new complex shape."
beside-align [align & shapes]
"Takes in a first argument of :top :bottom for the vertical orientation,
and 1 or more shapes and puts them beside each other with the specified alignment.
The first argument will be on the left, the last argument will be on the right.
This returns a new complex shape."
scale-shape [shape scale-x scale-y]
"Takes in a shape or image, x-axis scale, and y-axis scale.
Scales the shape based off the values input.
This returns a new complex shape if given a complex shape otherwise returns a new simple shape."
rotate-shape [shape angle]
"Function that takes in a shape or image and an angle in degrees.
It then rotates the shape or image.
This function returns a new shape.
This function cannot be used on complex shapes."