Debian Codegraph @

examples/pixels-points

raw
1 #!/usr/local/bin/new/perl -w
2 use strict;
3 use Tk;
4 use Tk::Xlib;
5
6 my $mw = MainWindow->new;
7
8 $mw->scaling($ARGV[0]) if (@ARGV);
9
10 my $screen = $mw->Screen;
11
12 my $width = $screen->WidthOfScreen;
13 my $widthMM = $screen->WidthMMOfScreen;
14 my $widthIN = $widthMM/25.4;
15 my $height = $screen->HeightOfScreen;
16 my $heightMM = $screen->HeightMMOfScreen;
17 my $heightIN = $heightMM/25.4;
18 my $s = $mw->scaling;
19 my $ws = $width/($widthMM*72/25.4);
20 my $hs = $height/($heightMM*72/25.4);
21
22 print "Width=$width WidthMM=$widthMM WidthIN=$widthIN\n";
23 print "Height=$height HeightMM=$heightMM HeightIN=$heightIN\n";
24
25 print "Scale=$s wScale=$ws hScale=$hs\n";
26