File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -131,33 +131,6 @@ When /someone/ wishes to draw a shape with /...options/ {
131131 }
132132}
133133
134- When /someone/ wishes to draw a circle with /...options/ {
135- set center [dict_getdef $options center {0 0}]
136- set radius [dict_getdef $options radius 50]
137- set color [dict_getdef $options color white]
138- set thickness [dict_getdef $options thickness 2]
139- set filled [dict_getdef $options filled false]
140- set layer [dict_getdef $options layer 0]
141-
142- set numPoints 36
143- set points {}
144-
145- for {set i 0} {$i < $numPoints} {incr i} {
146- set angle [expr {2 * 3.14159 * $i / $numPoints}]
147- set x [expr {$radius * cos($angle)}]
148- set y [expr {$radius * sin($angle)}]
149- lappend points [vec2 add [list $x $y] $center]
150- }
151-
152- lappend points [lindex $points 0]
153-
154- if {$filled} {
155- Wish to draw a polygon with points $points color $color layer $layer
156- } else {
157- Wish to draw a stroke with points $points width $thickness color $color layer $layer
158- }
159- }
160-
161134When /someone/ wishes /p/ draws a /shape/ {
162135 Wish $p draws a $shape with color white
163136}
You can’t perform that action at this time.
0 commit comments