Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
JSAWAA DOCUMENTATION For CompSci 334 
You probably just need to use circle, rectangle, moveRelative and maybe line  
(if you want a grid) and text (to describe what is happening). The other  
commands are still being tested and may not work as well.  
See the file sample.txt and pig.txt also on the assignment page under project3 
Primitive Objects: 
line​ [name] [x​1​] [y ​1​] [x​2​] [y ​2​] [color] [weight] 
Command that creates a ​line ​ given a variable name, starting (​x​1​, ​y​1​) coordinates, ending ( ​x​2​, ​y​2​) 
coordinates, line color, and line weight. 
circle​ [name] [x] [y] [diameter] [outline color] [background color] 
Command that creates a ​circle ​ given a variable name, position (x, y) coordinates, diameter, 
outline color, and background color. 
oval​ [name] [x] [y] [width] [height] [outline color] [background color] 
Command that creates a ​oval ​ given a variable name, position (x, y) coordinates, width, height, 
outline color, and background color. 
rectangle​ [name] [x] [y] [width] [height] [outline color] [background color] 
Command that creates a ​rectangle ​ given a variable name, position (x, y) coordinates, width, height, 
outline color, and background color. 
polygon​ [name] [n] [x ​1​] [y ​1​] ... [x​n​] [y ​n​] [outline color] [background color] 
Command that creates a ​polygon ​given a variable name, number of edges, vertices (x​n​, y​n​) 
coordinates, outline color, and background color. 
text​ [name] [x] [y] [“text”] [color] [font-size] 
Command that creates a ​line of text ​ given a variable name, position (x, y) coordinates, intended text, 
text color, and font-size. 
JSAWAA is a scripting language. To use it, you would output JSAWAA commands from your Java/Python
program to a .txt file. Then copy and paste the .txt file into the black canvas on the JSAWAA web page 
and click run. 
 
 
 
 
General Action Commands: 
 
begin ... end 
Place a group of commands in a between a begin ... end block to make those commands ​execute 
simultaneously​. 
 
 
changeParam ​[target] [parameter*] [new value] 
Command used to change the appearance and/or data of most primitive and data structure objects 
listed. ​Available parameters​: color, bkgrd (background), textcolor, text, point, width, height, x, y. 
See the extended description of this command below for further details on its usage.  
 
moveRelative​ [target] [x-offset] [y-offset] 
Command that ​animates​ the ​movement of the target object​ from its original location to a new  
location. The new location is calculated by adding the x and y offset to the target object's x and  
y-coordinate. 
 
delay​ [milliseconds] 
Command ​delays​ the execution of each step of JSAWAA animation by number of milliseconds. 
 
scale​ [target] [percentage] 
Command can be used on primitive objects and nodes to either scale (increase or decrease) the size  
of the object. 
 
remove​ [target] 
Command ​removes target object from the screen and the variable name is freed for use again.