#!/usr/bin/perl -w # # pf.pl # use strict; use Tk; my %all; $all{mw} = MainWindow -> new(); $all{mw} -> bind("","exit"); $all{canvas} = $all{mw} -> Canvas (-background => "#000000",            -highlightthickness => 0,            -relief => "flat",            -bd => 0)->    pack(-fill => "both",           -expand => 1); my ($screenx,$screeny) = ($all{mw} -> screenwidth(), $all{mw} -> screenheight()); $all{photo} = $all{mw} -> Photo (-width => $screenx,          -height => $screeny); $all{canvas} -> createImage (0,0,                   -image => $all{photo},                   -anchor => "nw"); $all{mw} -> FullScreen(1); $all{mw} -> geometry  ("${screenx}x$screeny"); for (0..$screenx) {  my $y = $_;  $y = $screeny / 2 if $y >= $screeny / 2;  point($_,$y);  for (0..10000) {}  $all{mw} -> update; } for (0..$screenx) {  my $y = $_;  $y = $screeny / 2 if $y >= $screeny / 2;  my $x = $screenx - $_;  point($x,$y);  for (0..10000) {}  $all{mw} -> update; } MainLoop; sub point {  my ($x,$y,$color);  if ($#_ >= 0) {    $x = shift;    if ($#_ >= 0) {      $y = shift;      if ($#_ >= 0) {        $color = shift;      }      else {        $color = "#ff0000";      }    }    else {      $y = 0;      $color = "#ff0000";    }  }  else {    $x = 0;    $y = 0;    $color = "#ff0000";  }  $all{photo} ->  put ("$color",        -to => $x,$y); }