home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / gle / demo / join.gle < prev    next >
Encoding:
Text File  |  1992-11-29  |  1.3 KB  |  64 lines

  1. size 18 24 box    ! This is JOIN.GLE, demonstrates the join commands.
  2. set hei .3
  3. amove .3 .3 
  4. text join.gle
  5.  
  6. set hei 1.3 just center
  7. amove 9 21
  8. text Joining named objects
  9.  
  10. set hei .8 lwidth .1
  11. amove  8.8  18.8 
  12. begin box name line
  13.    rline  0 -8.2 
  14. end box
  15. set lwidth 0
  16.  
  17. amove  9.67745  8.7603 
  18. begin box   name cir   nobox
  19.    circle 1
  20. end box
  21. circle 1
  22. amove  12.7461  4.59445 
  23. begin box  name hi   add .2
  24.    text Hi there
  25. end box
  26. amove  3.14401  17.0566 
  27. begin box name grv add .2
  28.    text GRV
  29. end box
  30. amove  14.9533  12.2986 
  31. begin box name chv add .2
  32.    text CHV
  33. end box
  34. amove  12.5179  17.6103 
  35. begin box name cheese add .2
  36.    text Cheese
  37. end box
  38. amove  2.7381  11.229 
  39. begin box name goats add .2
  40.    text Goats
  41. end box
  42. ! Now draw the lines between objects
  43. join chv - goats
  44. join grv -> line.h          ! Note: ".h" means to join horizontally.
  45. join line.h <-> cheese.tl
  46. join cheese.tr - chv.tr
  47. join cir.ci <- hi           ! Note: ".ci" is used for circles
  48. join cir.ci <- chv
  49. join cir.ci <- goats
  50. !-----------------------------------------------------------------------------
  51. ! A pie slice   (Will only work on PostScript it uses BEGIN PATH FILL).
  52. sub pie ang1 ang2 radius color$
  53. begin path fill color$ stroke
  54.    rmove 0 0
  55.    arc radius ang1 ang2 
  56.    closepath
  57. end path
  58. end sub
  59.  
  60. amove 3 2
  61. @pie 0 10  2 "grey10"
  62. @pie 10 40 2 "grey20"
  63. @pie 40 120 2 "blue"
  64.