home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Archived / Updates / Flash / writeflash / Examples / grid < prev    next >
Text File  |  2000-04-24  |  1KB  |  107 lines

  1. // grid
  2.  
  3. #define WIDTH       5000
  4. #define HEIGHT      4000
  5. #define GRIDSPACING 500
  6.  
  7. #include FlashLibrary:Colours
  8. #include FlashFonts:IDs
  9. #include FlashFonts:Halvett.Medium
  10.  
  11. FileVersion 1
  12.  
  13. FrameArea {
  14.   width WIDTH
  15.   height HEIGHT
  16. }
  17.  
  18. BgColour WHITE
  19.  
  20.  
  21. Shape {
  22.   id 1
  23.   linestyle { 20 BLACK }
  24.   selectlinestyle 1
  25.   moveto { 0 -60 }
  26.   lineby { 0 120 }
  27.   moveto { -60 0 }
  28.   lineby { 120 0 }
  29. }
  30.  
  31. Text {
  32.   id 100
  33.   style {
  34.     font HALVETT_MEDIUM
  35.     size 200
  36.     colour BLACK
  37.   }
  38.   text "(0,0)"
  39. }
  40. Text {
  41.   id 101
  42.   style {
  43.     font HALVETT_MEDIUM
  44.     size 200
  45.     colour BLACK
  46.   }
  47.   text "(0,2000)"
  48. }
  49. Text {
  50.   id 102
  51.   style {
  52.     font HALVETT_MEDIUM
  53.     size 200
  54.     colour BLACK
  55.   }
  56.   text "(2000,0)"
  57. }
  58. Text {
  59.   id 103
  60.   style {
  61.     font HALVETT_MEDIUM
  62.     size 200
  63.     colour BLACK
  64.   }
  65.   text "(2000,2000)"
  66. }
  67.  
  68.  
  69. :var depth, spacing
  70. :depth=100
  71. :spacing=1000/GRIDSPACING
  72. :spacing=1000/spacing
  73.  
  74. :for x=0 to framesizex/spacing
  75. :for y=0 to framesizey/spacing
  76.   Place {
  77.     depth depth
  78.     id 1
  79.     matrix { 65536 x*spacing y*spacing }
  80.   }
  81. :depth += 1
  82. :next
  83. :next
  84.  
  85. Place {
  86.   id 100
  87.   depth 10000
  88.   matrix { 65536 20 60 }
  89. }
  90. Place {
  91.   id 101
  92.   depth 10001
  93.   matrix { 65536 20 60+2000 }
  94. }
  95. Place {
  96.   id 102
  97.   depth 10002
  98.   matrix { 65536 20+2000 60 }
  99. }
  100. Place {
  101.   id 103
  102.   depth 10003
  103.   matrix { 65536 20+2000 60+2000 }
  104. }
  105.  
  106. ShowFrame { }
  107.