EnglishРусский  

   ..

   LIB

   Desktop.dll

   Fractal.g

   Graphics.dll

The project is closed! You can look at a new scripting language. It is available on GitHub.
Also, try our open source cross-platform automation software.

Ads

Installer and installation software
Commercial and Freeware installers.

source\dev\directx\Fractal.g
 1 include {
 2   "lib//Graphics.g"
 3   "lib//InputDevice.g"
 4 }
 5 
 6 define{
 7   SCREEN_WIDTH = 1024
 8   SCREEN_HEIGHT = 768
 9 }
10 
11 func Main <entry>{
12   int x = 1
13   int y = 1
14   int n = $SCREEN_HEIGHT - 1
15   
16   int  r s
17   
18   InputDevice.UseKeyboard()
19 
20   Screen.Create($SCREEN_WIDTH,$SCREEN_HEIGHT,32)
21   
22   Image img
23   img.Create(n,n)
24 
25   Graphics.StartDraw(img)
26     for r=0, r<=n, r++ {
27       for s=0, s<=(n-r), s++ {
28         if (r && s){
29           Graphics.Plot(x+r+5  , y+s+5  , 64+r/4, s/4   , s/2+64)
30           Graphics.Plot(x+6+n-r, y+6+n-s, s/4   , 64+r/4, s/2+64)
31         }
32         else{
33           Graphics.Plot(x+r+5  , y+s+5  , 128+r/4, s/2    , s/2+128)
34           Graphics.Plot(x+6+n-r, y+6+n-s, s/2    , 128+r/4, s/2+128)
35         }
36       }
37     }
38   Graphics.StopDraw()
39   
40   img.Resize($SCREEN_WIDTH,$SCREEN_HEIGHT)
41 
42 
43   Graphics.StartDraw(Screen)
44     img.Draw(0,0)
45   Graphics.StopDraw()
46 
47   
48   Screen.FlipBuffers()
49   
50   while (!Keyboard.isPushed($BTN_ALL)){
51     Keyboard.Examine()
52   }
53 }
54