#
# sglidx.rb
#
# $Id: sglidx.rb,v 1.1 2000/11/21 03:02:07 keiko Exp $
#

require "narray"
require "numru/dcl"

include NumRu
include Math


dx = 0.01
dd = 0.08

#-- graph ---
iw = (ARGV[0] || (puts ' WORKSTATION ID (I)  ? ;'; DCL::sgpwsn; gets)).to_i
DCL::sgopn iw

DCL::slmgn(0.05, 0.05, 0.00, 0.10)
DCL::slsttl('DEMONSTRATION FOR LINE INDEX', 'T', 0.0, 0.0, 0.018, 1)
DCL::sgfrm

for j in 0..9
  for i in 0..9
    idx=j*10+i
    next if idx == 0
    x1=i*0.1+dx
    x2=x1+dd
    y1=1.0-j*0.1-dx
    y2=y1-dd
    chr = format("%2d", idx)
    DCL::sglnzv(x1, y1, x2, y2, idx)
    DCL::sgtxzv(x1+dx*2, y2+dx*2, chr, 0.015, 0, 1, 1)
  end
end

DCL::sgcls

