function stat_canvas($c, $n, $res) { list($r, $w, $h) = stat_boot($c, $n, $res); if ($r) { $ret = stat_canvas_mk($r, $w, $h); } return canvas($ret, $w, $h); }
function plug_canvas($d, $s) { $id = randid(); if ($s) { $_SESSION['graphsz'] = $s; } if (!$d) { $d = 'rect=0,0,100,44,ff0000 rect=100,0,100,44,00ff00 disk=11,22,10,ffffff line=20,22,80,22,00ff00 circle=100,22,20 disk=100,22,20,ffffff line=120,22,180,22,00ff00 circle=190,22,10,000000 disk=190,22,9,ffffff text=oeil,0,58,12,arial,ff0000 text=observé,77,58,12,arial text=existant,158,58,12,arial'; } $d = str_replace("\n", ' ', $d); $ret .= lj('popbt', 'popup_plup___canvas_cnvs*edit_' . ajx($d) . '_' . $id, 'edit'); $ret .= divd('graph' . $id, canvas($d, $id, $s)); return $ret; }