1234567891011121314151617181920212223242526272829303132333435 |
- # scale.table
- !'
- "Scale rendering using the table:"
- $func('scale.table', 275, 420) + ' 275 / 420'
- $func('scale.table', 400, 420) + ' 400 / 420'
- $func('scale.table', 420, 420) + ' 420 / 420'
- $func('scale.table', 157, 420) + ' 157 / 420'
- $func('scale.table', 42, 420) + ' 42 / 420'
- $func('scale.table', 0, 420) + ' 0 / 420'
- '!
- !!-----scale.table------
- args[0] = args[0] & ! the current value of the parameter
- args[1] = args[1] & ! the maximum value
- if args[2] = 0:args[2] = 200 & ! Span (tables) pixels. default 350 px
- if $ARGS[3] = "":$ARGS[3] = "FF0000" & ! the color of the filled part of the scale in the format RRGGBB. default - red
- $ARGS['table'] = '<table width="<<args[2]>>" border="0" cellspacing="0" cellpadding="0"><tr>'
- args['x'] = (args[0] * 100) / args[1]
- args['empty'] = 100 - args['x']
- if args['x'] > 0:
- $ARGS['table'] += '<td width="<<args['x']>>%" bgcolor="#' + $ARGS[3] + '"> </td>'
- elseif args['empty'] > 0:
- $ARGS['table'] + = "<td width="<<args['empty']>>%" bgcolor="#888888"> </td>"
- end
- $ARGS['table'] += '</tr></table>'
- $result = $ARGS['table']
- --- scale.table ---------------------------------
|