sub draw_coordinates { my ($pboard) = @_; # Delete existing coordinate text my $canvas = $pboard->{'canvas'}; my $ptext = $pboard->{'text'}; map { my_delete($canvas, $_) } @$ptext; $pboard->{'text'} = [ ]; for (my $i = 0; $i < $ncols; $i++) { my $x = $borderx + $i * $cellx + $i * $linex + $linex / 2; for (my $j = 0; $j < $nrows; $j++) { my $y = $bordery + $j * $celly + $j * $liney + $liney / 2; my @opts = ($x, $y, -text => coor_to_square([$i, $j])); push @opts, -anchor => 'nw'; ($coor_font || 0) and push @opts, -font => $coor_font; my $id = my_create($canvas, "createText", [@opts]); push @$ptext, $id; } } }