User Tools

Site Tools


en:stamp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:stamp [2016/01/01 22:42]
127.0.0.1 external edit
en:stamp [2020/02/28 10:46] (current)
Line 1: Line 1:
 ===== Stamp (Statement) ===== ===== Stamp (Statement) =====
 ==== Format ==== ==== Format ====
-**stamp** //x_expr////y_expr////numeric_array//\\ +**stamp** [[numericexpressions|x_position]][[numericexpressions|y_position]][[arrays|variable[]]]\\ 
-**stamp** ( //x_expr////y_expr////numeric_array// )\\ +**stamp** ( [[numericexpressions|x_position]][[numericexpressions|y_position]][[arrays|variable[]]] )\\ 
-**stamp** //x_expr////y_expr//, {x1, y1, x2, y2, x3, y3 ...}\\ +**stamp** [[numericexpressions|x_position]][[numericexpressions|y_position]][[lists|{ x1, y1, x2, y2, x3, y3 ... }]]\\ 
-**stamp** ( //x_expr////y_expr//, {x1, y1, x2, y2, x3, y3 ...} )\\ +**stamp** ( [[numericexpressions|x_position]][[numericexpressions|y_position]][[lists|{ x1, y1, x2, y2, x3, y3 ... }]] )\\ 
-**stamp** //x_expr////y_expr////scale_expr////numeric_array//\\ +**stamp** [[numericexpressions|x_position]][[numericexpressions|y_position]][[lists|{ {x1, y1}{x2, y2}, {x3, y3} ... }]]\\ 
-**stamp** ( //x_expr////y_expr////scale_expr////numeric_array// )\\ +**stamp** ( [[numericexpressions|x_position]][[numericexpressions|y_position]][[lists|{ {x1y1}, {x2, y2}, {x3, y3} ... }]] )\\ 
-**stamp** //x_expr////y_expr////scale_expr//, {x1, y1, x2, y2, x3, y3 ...}\\ +**stamp** [[numericexpressions|x_position]][[numericexpressions|y_position]][[floatexpressions|scale_expression]], [[arrays|variable[]]]\\ 
-**stamp** ( //x_expr////y_expr////scale_expr//, {x1, y1, x2, y2, x3, y3 ...} )\\ +**stamp** ( [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[floatexpressions|scale_expression]], [[arrays|variable[]]] )\\ 
-**stamp** //x_expr////y_expr////scale_expr////rotation_expr////numeric_array//\\ +**stamp** [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[floatexpressions|scale_expression]][[lists|{ x1, y1, x2, y2, x3, y3 ... }]]\\ 
-**stamp** ( //x_expr////y_expr////scale_expr////rotation_expr////numeric_array// )\\ +**stamp** ( [[numericexpressions|x_position]][[numericexpressions|y_position]][[floatexpressions|scale_expression]][[lists|{ x1, y1, x2, y2, x3, y3 ... }]] )\\ 
-**stamp** //x_expr////y_expr////scale_expr////rotation_expr//, {x1, y1, x2, y2, x3, y3 ...} )\\ +**stamp** [[numericexpressions|x_position]][[numericexpressions|y_position]][[floatexpressions|scale_expression]][[lists|{ {x1, y1}, {x2, y2}, {x3, y3} ... }]]\\ 
-**stamp** (//x_expr////y_expr////scale_expr////rotation_expr//, {x1, y1, x2, y2, x3, y3 ...}+**stamp** ( [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[floatexpressions|scale_expression]], [[lists|{ {x1, y1}, {x2, y2}, {x3, y3} ... }]] )\\ 
 +**stamp** [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[floatexpressions|scale_expression]], [[floatexpressions|rotation_expr]][[arrays|variable[]]]\\ 
 +**stamp** ( [[numericexpressions|x_position]][[numericexpressions|y_position]][[floatexpressions|scale_expression]][[floatexpressions|rotation_expr]][[arrays|variable[]]] )\\ 
 +**stamp** [[numericexpressions|x_position]][[numericexpressions|y_position]][[floatexpressions|scale_expression]][[floatexpressions|rotation_expr]][[lists|{ x1, y1, x2, y2, x3, y3 ... }]]\\ 
 +**stamp** ([[numericexpressions|x_position]], [[numericexpressions|y_position]], [[floatexpressions|scale_expression]], [[floatexpressions|rotation_expr]], [[lists|{ x1, y1, x2, y2, x3, y3 ... }]] )\\ 
 +**stamp** [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[floatexpressions|scale_expression]], [[floatexpressions|rotation_expr]], [[lists|{ {x1, y1}, {x2, y2}, {x3, y3} ... }]]\\ 
 +**stamp** ([[numericexpressions|x_position]][[numericexpressions|y_position]][[floatexpressions|scale_expression]][[floatexpressions|rotation_expr]][[lists|{ {x1, y1}{x2, y2}{x3, y3... }]] ) 
 + 
 +==== Description ==== 
 +Draws a polygon.  The sides of the polygon are defined by the values stored in the array, which should be stored as x,y pairs, sequentially. The length of a one dimensional array/2 or the number of rows on a two dimensional array will define the number of points.  
 + 
 +One dimensional arrays and lists must have at least six values and an even number of values.  A two dimensional array may have 3 or more rows but must have two columns. 
 + 
 ==== Description ==== ==== Description ====
 Draws a polygon with top left corner (origin) at x, y. Optionally scales size of polygon by the defined scale (1=normal size). Also optionally rotates the polygon by a specified angle around the origin (clockwise in radians).  The vertices of the polygon are defined by the values in an array, which should be stored as x,y pairs, sequentially. The length of the array/2 will define the number of points.  A stamped polygon can also be specified using a list of x,y pairs enclosed in curly braces {}. Draws a polygon with top left corner (origin) at x, y. Optionally scales size of polygon by the defined scale (1=normal size). Also optionally rotates the polygon by a specified angle around the origin (clockwise in radians).  The vertices of the polygon are defined by the values in an array, which should be stored as x,y pairs, sequentially. The length of the array/2 will define the number of points.  A stamped polygon can also be specified using a list of x,y pairs enclosed in curly braces {}.
Line 19: Line 32:
 Both of the code blocks below will draw a pair of green triangles on the graphics window: Both of the code blocks below will draw a pair of green triangles on the graphics window:
 <code> <code>
-clg +clg blue
-color blue+
 rect 0,0,300,300 rect 0,0,300,300
 color green color green
-dim tri(6) +tri = {{0, 0}{100, 100}{0, 100}}
-tri = {0, 0, 100, 100, 0, 100}+
 # stamp the triangle at 0,0 (full size) # stamp the triangle at 0,0 (full size)
-stamp 100, 100, tri+stamp 100, 100, tri[]
 # stamp the triangle at 200,100 (half size) # stamp the triangle at 200,100 (half size)
-stamp 200, 100, .5, tri+stamp 200, 100, .5, tri[]
 </code> </code>
 <code> <code>
-clg +clg blue
-color blue+
 rect 0,0,300,300 rect 0,0,300,300
 color green color green
 # stamp the triangle at 0,0 (full size) # stamp the triangle at 0,0 (full size)
-stamp 100, 100, {0, 0, 100, 100, 0, 100}+stamp 100, 100, {{0, 0}{100, 100}{0, 100}}
 # stamp the triangle at 200,100 (half size) # stamp the triangle at 200,100 (half size)
 stamp 200, 100, .5, {0, 0, 100, 100, 0, 100} stamp 200, 100, .5, {0, 0, 100, 100, 0, 100}
Line 48: Line 58:
 ==== History ====  ==== History ==== 
 |0.9.4|New To Version| |0.9.4|New To Version|
 +|1.99.99.55|two dimensional list support was added|
 +|1.99.99.72|added required [] to passing variable array|
  
en/stamp.1451713331.txt.gz · Last modified: 2020/02/28 10:46 (external edit)