function toolname : string; begin result := 'Alan Box'; end; function numpoints : integer; begin result := 2; end; function usevmult : boolean; begin result := true; end; function usehmult : boolean; begin result := true; end; function usefmult : boolean; begin result := true; end; procedure clicked2 ( boundary, xlist, ylist, prices, hlist, vlist, flist, clist; var command_list : variant); begin RedimVarArray (command_list, 4); command_list [0] := xlist [0]; command_list [1] := ylist [0]; command_list [2] := xlist [1]; command_list [3] := ylist [1]; end; procedure add_next_line (c, x1, y1, x2, y2 : integer; var list : variant; var i : integer); begin list [i] := c; list [i + 1] := x1; list [i + 2] := y1; list [i + 3] := x2; list [i + 4] := y2; i := i + 5; end; procedure add_next_text (c, x1, y1 : integer; schrift : string; var list : variant; var i : integer); begin list [i] := c; list [i + 1] := x1; list [i + 2] := y1; list [i + 3] := schrift; i := i + 4; end; procedure draw2 ( boundary, xlist, ylist, prices, hlist, vlist, flist, clist; var command_list : variant); var i, j, x1, x2, x3, y1, y2, y3, lb, ub, hsize, vsize, lbv, ubv, firstq, threeq, midpoint, range, midapex, timespan : integer; v : double; draw_hmult, draw_vmult, draw_fmult : boolean; begin x1 := xlist [0]; x2 := xlist [1]; y1 := ylist [0]; y2 := ylist [1]; hsize := 0; draw_hmult := false; if not VarIsEmpty (hlist) then begin lb := vararraylowbound (hlist, 1); ub := vararrayhighbound (hlist, 1); hsize := ub - lb + 1; draw_hmult := true; end; vsize := 0; draw_vmult := false; if not VarIsEmpty (vlist) then begin lbv := vararraylowbound (vlist, 1); ubv := vararrayhighbound (vlist, 1); vsize := ubv - lbv + 1; draw_vmult := true; end; RedimVarArray (command_list, 10 * 10 + hsize * 10); i := 0; firstq := (((y1+y2)/2)+y2)/2; midpoint := (y1+y2)/2; threeq := (((y1+y2)/2)+y1)/2; range := abs((y2-y1)); midapex := (x1+x2)/2; timespan := abs(x2-x1); {angular 0-100} add_next_line (0, x1, y1, x2, y2, command_list, i); {angular 100-0} add_next_line (0, x2, y1, x1, y2, command_list, i); {label} add_next_text (20, x2, midpoint, ' mid', command_list, i); add_next_text (20, x2, y2, ' 100', command_list, i); add_next_text (20, x2, y1, ' 0', command_list, i); {quarter angulars } add_next_line (0, x1, midpoint, x1+timespan/2, y1, command_list, i); add_next_line (0, x1+timespan/2, y1, x2, midpoint, command_list, i); add_next_line (0, x2, midpoint, x1+timespan/2, y2, command_list, i); add_next_line (0, x1, midpoint, x1+timespan/2, y2, command_list, i); { minor angulars } { add_next_line (0, x2, firstq, x1, firstq+range, command_list, i); } { add_next_line (0, x2, firstq, x1, firstq-range, command_list, i); } { add_next_line (0, x2, threeq, x1, threeq+range, command_list, i); } { add_next_line (0, x2, threeq, x1, threeq-range, command_list, i); } { border } add_next_line (0, x1, y1, x1, y2, command_list, i); add_next_line (0, x1, y2, x2, y2, command_list, i); add_next_line (0, x2, y2, x2, y1, command_list, i); add_next_line (0, x2, y1, x1, y1, command_list, i); if draw_hmult then for j := lb to ub do begin v := hlist [j]; x3 := tq_round (x1 + (x2 - x1) * v); add_next_line (0, x3, y1, x3, y2, command_list, i); end; if draw_vmult then for j := lbv to ubv do begin v := vlist [j]; y3 := tq_round (y1 + (y2 - y1) * v); add_next_line (0, x1, y3, x2, y3, command_list, i); end; end;