!for i=1 to $drawcnt
 l=!line $i of $drawlist
 !distribute items $l into type,number,p1,p2
 !if $type iswordof random middle
  type=point
 !endif
 !if $type=midper
  type=line
 !endif
 h=!char $number of $(hide$type)
 !if $h=-
  !goto cont
 !endif
 obj=!line $number of $($(type)s)
 !distribute items $obj into t1,t2,t3,t4,t5,t6
 !default t5=1
 
 !if $type=point
  x=$[rint(($t1-($stx))*$prop)]
  y=$[rint(($t2-($sty))*$prop)]
  !if $x<=1 or $y<=1 or $x>=$size or $y>=$size
   !goto cont
  !endif
  t=fcircle $x,$y,6,$(color$t3)\
string $(color$t3),$[$x+5],$[$y-4],tiny,$number
  draw_src=$draw_src\
$t
  !if $clignote!=$empty and $number notitemof $clignote
   draw_src_2=$draw_src_2\
$t
  !endif
  !goto cont
 !endif
 
 !if $type=line
  !distribute item $obj into x_,y_,u_,v_
  !if $t5>1
   m_=$[4*$pic_range/(abs($x_-($u_))+abs($y_-($v_)))]
   !if $t5=2 or $t5=4
    x_=$[($m_+1)*($t1)-$m_*($t3)]
    y_=$[($m_+1)*($t2)-$m_*($t4)]
   !endif
   !if $t5=2 or $t5=3
    u_=$[($m_+1)*($t3)-$m_*($t1)]
    v_=$[($m_+1)*($t4)-$m_*($t2)]
   !endif
   !if $t5=4
    u_=$t1
    v_=$t2
   !endif
  !endif
  t=line $[rint(($x_-($stx))*$prop)],$[rint(($y_-($sty))*$prop)],$[rint(($u_-($stx))*$prop)],$[rint(($v_-($sty))*$prop)],$(color$t6)
  draw_src=$draw_src\
$t
  !if $clignote!=$empty and l$number notitemof $clignote
   draw_src_2=$draw_src_2\
$t
  !endif
  !goto cont
 !endif
 
 !if $type=circle
  x=$[rint(($t1-($stx))*$prop)]
  y=$[rint(($t2-($sty))*$prop)]
  r=$[rint(2*$t3*$prop+2)]
  !if $x+$r<=1 or $y+$r<=1 or $x-$r>=$size or $y-$r>=$size
   !goto cont
  !endif
  t=circle $x,$y,$r,$(color$t5)
  draw_src=$draw_src\
$t
  !if $clignote!=$empty and c$number notitemof $clignote
   draw_src_2=$draw_src_2\
$t
  !endif
  !goto cont
 !endif
 
 :cont
!next i

