12 my $s = Cairo::PdfSurface->create('digit.pdf', $pw, $ph);
13 my $c = Cairo::Context->create($s);
16 $c->set_line_width(2);
17 $c->set_line_cap('round');
18 $c->set_source_rgb(0, 0, 0);
29 my ($x1,$y1,$x2,$y2) = $r =~ /^\((\d+),(\d+)\)-\((\d+),(\d+)\)$/ or die;
30 $c->move_to($xp + (.9*$x1+.1*$x2)*$u, $yp + (.9*$y1+.1*$y2)*$u);
31 $c->line_to($xp + (.9*$x2+.1*$x1)*$u, $yp + (.9*$y2+.1*$y1)*$u);
36 if ($xp + 5*$u > $pw) {
39 if ($yp + 5*$u > $ph) {
47 print "Output $n matchograms.\n";