# shape settings
# Copyright by Peter Maersk-Moller 2012-2013 - All rights reserved
# shape require at least version 0.4.1
require version 0.4.4

maxplaces shapes 64
maxplaces shape patterns 16

# Basic patterns
shape pattern add 1 Unit Linear Top-Bottom
shape pattern linear 1 0 -0.5 0 0.5
shape pattern stoprgb 1 0.00 0 0 0 1.0
shape pattern stoprgb 1 1.00 0 0 0 0.0

shape pattern add 2 Unit Radial In-Out
shape pattern radial 2 0 0 0.0 0 0 0.5
shape pattern stoprgb 2 0.00 1 0 0 0.0
shape pattern stoprgb 2 0.20 1 0 0 0.0
shape pattern stoprgb 2 0.50 1 0 0 1.0
shape pattern stoprgb 2 0.60 1 0 0 0.9
shape pattern stoprgb 2 0.70 1 1 0 0.8
shape pattern stoprgb 2 0.80 1 1 0 0.6
shape pattern stoprgb 2 0.90 1 1 1 0.4
shape pattern stoprgb 2 1.00 1 1 1 0.0

#shape pattern add 3 Unit Radar Circles
#shape pattern radial 3 0 0 0.0 0 0 0.5
#shape pattern stoprgb 3 0.000 0 1 0 0.1
#shape pattern stoprgb 3 0.210 0 1 0 0.1
#shape pattern stoprgb 3 0.240 0 1 0 0.4
#shape pattern stoprgb 3 0.245 0 1 0 1.0
#shape pattern stoprgb 3 0.255 0 1 0 1.0
#shape pattern stoprgb 3 0.260 0 1 0 0.4
#shape pattern stoprgb 3 0.280 0 1 0 0.1

#shape pattern stoprgb 3 0.460 0 1 0 0.1
#shape pattern stoprgb 3 0.490 0 1 0 0.4
#shape pattern stoprgb 3 0.495 0 1 0 1.0
#shape pattern stoprgb 3 0.505 0 1 0 1.0
#shape pattern stoprgb 3 0.510 0 1 0 0.4
#shape pattern stoprgb 3 0.540 0 1 0 0.1

#shape pattern stoprgb 3 0.710 0 1 0 0.1
#shape pattern stoprgb 3 0.740 0 1 0 0.4
#shape pattern stoprgb 3 0.745 0 1 0 1.0
#shape pattern stoprgb 3 0.755 0 1 0 1.0
#shape pattern stoprgb 3 0.760 0 1 0 0.4
#shape pattern stoprgb 3 0.780 0 1 0 0.1
#
#shape pattern stoprgb 3 0.950 0 1 0 0.1
#shape pattern stoprgb 3 0.980 0 1 0 0.4
#shape pattern stoprgb 3 0.990 0 1 0 1.0
#shape pattern stoprgb 3 1.000 0 1 0 1.0

# Basic shape : Circle
shape add 1 Unit Circle
shape arc_cw 1 0 0 0.5 0 2PI

# Basic shape : Rectangle
shape add 2 Unit Rectangle
shape rectangle 2 -0.5 -0.5 1 1

# Basic shape : Diamond
shape add 3 Unit Diamond
shape moveto 3 0.5 0
shape linerel 3 -0.5 0.5
shape linerel 3 -0.5 -0.5
shape linerel 3 0.5 -0.5
shape linerel 3 0.5 0.5

shape add 4 Unit Square
shape moveto 4 -0.5 -0.5
shape lineto 4 0.5 -0.5
shape lineto 4 0.5 0.5
shape lineto 4 -0.5 0.5
shape closepath 4

shape add 5 Unit Triangle
shape moveto 5 -0.5 0.5
shape lineto 5 0.5 0.5
shape lineto 5 0.0 -0.5
shape lineto 5 -0.5 0.5
shape add 5
shape add 5 Unit Triangle
shape moverel 5 -0.5 0.5
shape linerel 5 1.0 0.0
shape linerel 5 -0.5 -1.0
shape linerel 5 -0.5 1.0

shape add 6 Unit Star-4
shape moveto 6 0.5 0
shape arc_cw 6  0.5 -0.5 0.5 PI/2 PI
shape arc_cw 6 -0.5 -0.5 0.5 0 PI/2
shape arc_cw 6 -0.5  0.5 0.5 -1PI/2 0
shape arc_cw 6  0.5  0.5 0.5 -1PI -1PI/2

shape add 9 Unit Freehand
shape moveto 9 0.0 0.0
shape linerel 9 1.0 0.0
shape linerel 9 0.0 1.0
shape linerel 9 -1.0 0.0
shape linerel 9 0.0 -1.0

shape add 10 Source Image 22
#shape image 10 22 0 0 -1 -1

shape add 11 Source Feed 1
shape feed 11 1 -384 -288 1.33333333 1.0

shape add 12 Source Feed 2
shape feed 12 2 -384 -288 1.33333333 1.0

shape add 13 Source Feed 3
shape feed 13 3 -384 -288 1.33333333 1.0

shape add 14 Source Feed 4
shape feed 14 4 -512 -288 1.0 1.0

shape add 17 Vostok
#shape scale 17 1 1
shape moveto 17 0 0
#shape scale 17 -10 -10
shape inshape 17 5
shape fill 17

shape add 18 Saphire
shape inshape 18 1
shape fill 18

#shape add 19 Radar Ray
#shape moveto 19 0.0 0.0
#shape lineto 19 0.5 0.0
#shape line width 19 -2.0
#shape line cap 19 round
#shape stroke 19

#shape add 20 Radar
#shape inshape 20 2
#shape clip 20
#shape paint 20
##shape newpath 20
##shape moveto 20 0 0
##shape lineto 20 -0.40 -0.40
##shape line width 20 -1.0
##shape source rgba 20 1 1 1 0.5
##shape stroke 20
#shape newpath 20
#shape scale 20 0.93 0.93
#shape inshape 20 1
#shape clip 20
#shape inshape 20 1
#shape source pattern 20 3
#shape paint 20


shape add 21 Combined Clip #1
shape inshape 21 1
shape clip 21
shape newpath 21
shape inshape 21 11
#shape source pattern 21 2
#shape fill 21
shape mask pattern 21 2
#shape paint 21 1.0

#shape add 21
#shape add 21 Combined Clip
#shape rectangle 21 -0.5 -0.5 1 1
#shape source pattern 21 2
#shape fill 21

shape add 22 Test Square
#shape inshape 22 11
shape inshape 22 2
#shape rectangle 22 0 0 1 1
shape source pattern 22 1
#shape fill 22
shape paint 22

shape add 23 rectangle
shape rectangle 23 -0.5 -0.5 1 1
shape source rgb 23 1 0 0 0.5
shape source pattern 23 2
shape fill 23

shape add 24 free
shape inshape 24 9
shape fill 24

shape add 25 Feed Example
#shape feed 25 1 -384 -288 1.33333333 1.0
#shape feed 25 1 0 0 -1.33333333 -1.0
shape feed 25 1 0 0 -2 1
#shape image 25 1 0 0 1 1
shape paint 25


#shape add 5 clip example
#shape arc_cw 5 1 1 1 0 2PI
#shape clip 5
#shape newpath 5
#shape rectangle 5 0 0 2 2
#shape fill 5
#shape moveto 5 0 0
#shape lineto 5 2 2
#shape moveto 5 2 0
#shape lineto 5 0 2
#shape source rgb 5 0 1 0
#shape line width 5 10
#shape stroke 5

shape add 28 Vertical Line
shape linerel 28 0 1.0
shape moverel 28 0.09375 -1
shape inshape 28 28

shape add 29 Horizontal Line
shape linerel 29 1.0 0
shape moverel 29 -1.0 -0.104166666667
shape inshape 29 29

shape add 30 Graph
shape inshape 30 2
shape clip 30
shape newpath 30
shape inshape 30 2
shape paint 30
shape newpath 30
shape recursion 30 12
shape moveto 30 -0.5 0.5
shape inshape 30 29
shape moveto 30 -0.5 -0.5
shape inshape 30 28
shape source rgba 30 1 1 1 0.3
shape line width 30 -1
shape stroke 30

shape add 31 Altitude Graph Line
shape add 32 Velocity Graph Line
shape add 33 Acceleration Graph Line

shape add 34 Graph Lines
shape moveto 34 0 0
shape inshape 34 31
shape line width 34 -3
shape stroke preserve 34
shape scale 34 -1 -1
shape moverel 34 5 0
shape arcrel_cw 34 -5 0 5 0 2PI
#shape moverel 34 -5 5
#shape linerel 34 10 0
#shape linerel 34 0 -10
#shape linerel 34 -10 0
#shape linerel 34 0 10
shape line width 34 -1
shape stroke 34
 
#shape place 0 1 512 288 10 10 0 0.5 0 0 0.8
#shape place 1 3 100 100 4 4 0 1 0 0 1.0
#shape place 1 5 50 50 90 90 0.0 0 0 0 1.0
#shape place 2 2 100 100 10 10 0.0 1 0 0 1.0
#shape place offset 1 -50 -50

#shape place 2 21 352 288 200 200 0.0 0 0 0 1.0
shape place 1 22 384 288 768 576 0.0 1 1 1 1.0
#shape place 3 21 452 188 100 100 0.0 0 0 0 1.0
shape place 4 21 384 288 700 500 0.0 1 1 1 1.0

#shape place 6 17 780 328 10 10 0.0 1.0 1.0 0.0 1.0
shape place 7 18 798 288 10 10 0.0 1.0 0.1 0.1 1.0
#shape place 5 20 798 288 192 192 0.0 0 0 0 1.0
#shape place 8 19 798 288 180 180 0.0 0 0.5 0 1.0

#shape place 1 23 10 10 1004 556 0.0 1 1 1 1.0
#shape place 2 25 20 20 0.5 0.5 0.0 1 0 0 0.3
shape place 10 30 704 384 320 192 0.0 0.14509 0.11372 0.34901 0.6
shape place offset 10 170 96
shape place 11 34 704 576 1 2 0.0 1 1 1 0.6
# blue color 0.14509 0.11372 0.34901

## Add shape place overlay all to Show
command pop Show
command push Show shape place overlay all
command push Show text overlay 30..34
command push Show shape place overlay 1 4
command push Show loop

#shape verbose 1

#virtual feed add 4
shape place alpha 1 1
shape place alpha 4 1
#shape place move rotation 8 0.04 10000000
#text string 30 Vostok
#text string 31 Saphire
#text string 32 Sputnik
#text place 30 30 5 0 0 1 1 1
#text place 31 31 5 0 0 1 1 1
#text place 32 32 5 0 0 1 1 1
#text coor 30 780 330
#text coor 31 798 290
#text coor 32 728 196

# blue color 0.14509 0.11372 0.34901

#move roller
text backgr move clip 5 0 0 0.04 0 0 0 25 0
