Lines Matching refs:dgm

26     var $dgm;       // holds diagram data  variable in syntax_plugin_godiag
168 $this->dgm = array (
200 $this->dgm['imappings'][$matches[1]]=$matches[2];
204 ksort($this->dgm['imappings']);
205 foreach($this->dgm['imappings'] as $symb => $href) {
220 $this->dgm['black_first'] = false;
223 $this->dgm['break'] = 'true';
226 $this->dgm['coord_markers'] = true;
229 $this->dgm['divclass'] = 'left';
232 $this->dgm['divclass'] = 'right';
235 $this->dgm['board_size'] = $matches[1];
237 $this->dgm['title'] = $heading;
241 $this->dgm['edge_bottom']=true;
246 $this->dgm['edge_top']=true;
254 if(preg_match('/^(\s|\$)*\|/', $source_line)) { $this->dgm['edge_left']=true; }
255 if(preg_match('/\|\s*$/', $source_line)) { $this->dgm['edge_right']=true; }
261 if(array_key_exists($symb, $this->dgm['imappings'])) {
262 … $this->dgm['imap_html'] .= $this->imap_area($bx, $row, $this->dgm['imappings'][$symb]);
265 if($len>$this->dgm['gridh']) { $this->dgm['gridh']=$len; }
266 $this->dgm['dia'][$row++]=$as_array;
268 $this->dgm['gridv']=$row;
271 $dimh=($this->dgm['gridh']-1)*$this->style['line_sp']+$this->style['edge_sp']*2+1;
272 $dimv=($this->dgm['gridv']-1)*$this->style['line_sp']+$this->style['edge_sp']*2+1;
273 if($this->dgm['coord_markers']) {
280 list($this->dgm['board_size'], //this will be overwritten if it conflicts with other input
281 $this->dgm['offset_x'],
282 $this->dgm['offset_y']) = $offs_sz_arr;
284 if($this->dgm['board_size'] > $this->style['board_max'])
288 if($this->dgm['gridv'] >= $this->dgm['board_size'] - 1) {
289 $this->dgm['edge_top'] = true;
290 if($this->dgm['gridv'] == $this->dgm['board_size'])
291 $this->dgm['edge_bottom']=true;
293 if($this->dgm['gridh'] >= $this->dgm['board_size'] - 1) {
294 $this->dgm['edge_left']=true;
295 if($this->dgm['gridh'] == $this->dgm['board_size'])
296 $this->dgm['edge_right']=true;
301 $str_for_hash .= '!' . $this->dgm['black_first']
302 . '!' . $this->dgm['edge_top']
303 . '!' . $this->dgm['edge_bottom']
304 . '!' . $this->dgm['edge_left']
305 . '!' . $this->dgm['edge_right'];
308 . '!' . $this->dgm['board_size']
309 . '!' . $this->dgm['title'];
312 . '!' . ($this->dgm['coord_markers'] ? $this->dgm['board_size'] : false);
338 'imap_html' => $this->dgm['imap_html'],
339 'divclass' => $this->dgm['divclass'],
340 'break' => $this->dgm['break'],
454 imagefilledrectangle($im, $x1, $y1, $x2, $y2, $this->dgm['mark_color']);
462 imagefilledrectangle($im, $x1, $y1, $x2, $y2, $this->dgm['link_color']);
473 $str=$this->dgm['dia'][$by][$bx];
475 $blacks_turn = intval($str) % 2 == ($this->dgm['black_first'] ? 1 : 0);
481 $col=$blacks_turn ? $this->dgm['white_color'] : $this->dgm['black_color'];
489 $str = $this->dgm['dia'][$by][$bx];
493 imagefilledrectangle($im, $x-$r, $y-$r, $x+$r, $y+$r, $this->dgm['goban_color']);
494 …is->style['ttfont_sz'], 0, $basex, $y+$this->style['minusc_voffs'], $this->dgm['string_color'], $t…
500 $str = $this->dgm['board_size'] - $this->dgm['offset_y'] - $by;
502 $bx2 = $this->dgm['offset_x'] + $bx;
511 …is->style['ttfont_sz'], 0, $basex, $y+$this->style['majusc_voffs'], $this->dgm['string_color'], $t…
516 …e_sp']/2+1, $x+$this->style['line_sp']/2, $y+$this->style['line_sp']/2, $this->dgm['goban_color']);
553 $this->dgm['line_color'] = $this->acolor2color($im, $this->style['line_acolor']);
554 $this->dgm['mark_color'] = $this->acolor2color($im, $this->style['mark_acolor']);
555 … $this->dgm['link_color'] = $this->acolor2color($im, $this->style['link_acolor_alpha'], true);
556 $this->dgm['goban_color'] = $this->acolor2color($im, $this->style['goban_acolor']);
557 $this->dgm['black_color'] = $this->acolor2color($im, $this->style['black_acolor']);
558 $this->dgm['white_color'] = $this->acolor2color($im, $this->style['white_acolor']);
559 $this->dgm['string_color'] = $this->acolor2color($im, $this->style['string_acolor']);
561 imagefill($im, 0, 0, $this->dgm['goban_color']);
564 $beginv=$this->dgm['edge_top'] ? $this->style['edge_sp'] : $this->style['line_begin'];
565 $beginh=$this->dgm['edge_left'] ? $this->style['edge_sp'] : $this->style['line_begin'];
566 …$endv=$dimv - ($this->dgm['edge_bottom'] ? $this->style['edge_sp'] : $this->style['line_begin']) -…
567 …$endh=$dimh - ($this->dgm['edge_right'] ? $this->style['edge_sp'] : $this->style['line_begin']) - …
568 if($this->dgm['coord_markers']) {
574 for($i=0; $i<$this->dgm['gridv']; $i+=1) {
576 imageline($im, $beginh, $coords[0], $endh, $coords[0], $this->dgm['line_color']);
579 for($i=0; $i<$this->dgm['gridh']; $i+=1) {
581 imageline($im, $coords[0], $beginv, $coords[0], $endv, $this->dgm['line_color']);
585 if($this->dgm['coord_markers']) {
587 for($i=0; $i<$this->dgm['gridv']; $i++)
589 for($i=0; $i<$this->dgm['gridh']; $i++)
594 foreach($this->dgm['dia'] as $by => $row) {
609 if(array_key_exists($symb, $this->dgm['imappings'])) {
629 if($this->dgm['coord_markers'])
680 $sizex = $this->dgm['gridh'];
681 $sizey = $this->dgm['gridv'];
682 $heightdefined = $this->dgm['edge_top'] && $this->dgm['edge_bottom'];
683 $widthdefined = $this->dgm['edge_left'] && $this->dgm['edge_right'];
692 if ($this->dgm['edge_right']) $offset_x = $size-$sizex;
693 elseif (!$this->dgm['edge_left']) $offset_x = ($size-$sizex)/2;
700 if ($this->dgm['edge_bottom']) $offset_y = $size-$sizey;
701 elseif (!$this->dgm['edge_top']) $offset_y = ($size-$sizey)/2;
705 $size = max($sizex, $sizey, $this->dgm['board_size']);
707 if ($this->dgm['edge_right']) $offset_x = $size-$sizex;
708 elseif (!$this->dgm['edge_left']) $offset_x = ($size-$sizex)/2;
710 if ($this->dgm['edge_bottom']) $offset_y = $size-$sizey;
711 elseif (!$this->dgm['edge_top']) $offset_y = ($size-$sizey)/2;
720 $rows = $this->dgm['dia'];
721 $title = str_replace(']', '\]', $this->dgm['title']);
723 $sizex = $this->dgm['gridh'];
724 $sizey = $this->dgm['gridv'];
725 $size = $this->dgm['board_size'];
726 $offset_x = $this->dgm['offset_x'];
727 $offset_y = $this->dgm['offset_y'];
729 $firstcolor = $this->dgm['black_first'] ? 'B' : 'W';
743 if (!$this->dgm['black_first']) {