# -*- tcl -*- tcl.tk//DSL diagram//EN//1.0

proc showcorners {e corners} {
    foreach {c anchor text} $corners {
	circle radius 2 at [$e $c] color red text $text anchor $anchor
    }
}

proc compass {e} {
    showcorners $e {
	n  s  n 	ne sw ne	e  w  e 	se nw se
	s  n  s 	sw ne sw	w  e  w 	nw se nw
	c  sw c 
    }
}

proc make {} {
    block {
	circle
	line up    from [last circle n]
	line down  from [last circle s]
	line right from [last circle e]
	line left  from [last circle w]
	box dashed with nw at [[last circle se] + [20 20]]
	set Caption [last box center]
    }
}

right ; make ; move ; compass [make]
