Subversion Repositories wimsdev

Compare Revisions

Ignore whitespace Rev 14250 → Rev 14255

/trunk/wims/public_html/scripts/anstype/draw
11,13 → 11,13
replist=!exec pari [$replist]~
replist=!replace internal ; by , in $replist
!else
replist=$(reply$i)
replist=$(reply$i)
!endif
!if $wims_read_parm=nocompare
type=!line -1 of $(oef_answer_option$i)
type=!word 1 of $type
!set draw_reply_cnt=!itemcnt $replist
!if $type iswordof arrows segments and $[$draw_reply_cnt%4]!=0 and $replist notsametext empty
!if $type iswordof arrows arrows2 segments and $[$draw_reply_cnt%4]!=0 and $replist notsametext empty
test=NaN $i
error=draw_bad_object
!exit
42,7 → 42,7
!! first line : the code
!! second line : segments, list of segments
 
!set listtype1=segments arrows rects circles points crosshairs
!set listtype1=segments arrows2 arrows rects circles points crosshairs
!set listtype2=lines demilines
!!only one object
!set listtype3=polyline polygon
60,7 → 60,7
!set arrow_head=!getopt arrow_head in $(replyoption$i)
!default arrow_head=10
 
!if $type iswordof arrows
!if $type iswordof arrows arrows2
option=$arrow_head,
!endif
 
88,7 → 88,7
!if $rg+$type_cnt2 <= $good_cnt
!increase g_cnt2
glist=!append line $(good[$rg+1 ..$rg+$type_cnt2]) to $glist
!if $type iswordof segments rects
!if $type iswordof segments arrows2 rects
glist=!append line $(good[$rg+3,$rg+4,$rg+1,$rg+2]) to $glist
!endif
!endif
96,7 → 96,7
 
!set g_cnt=$[$good_cnt/$type_cnt]
!set g_cnt1=$g_cnt
!if $type iswordof segments
!if $type iswordof segments arrows2
g_cnt1=$[2*$g_cnt]
!endif
!set r_cnt=!itemcnt $rlist