Have you compared these results with what X11 gives you? (I know Windows is not X11 but you can have a simple X11 server by using something like MobaXterm on Windows).
use strict; use warnings; eval { use X11::Protocol; # Screen dimensions my $x11 = X11::Protocol->new (); my $screen = ($ENV{DISPLAY}//":0.0") =~ m/\.(\d+)$/ ? $1 : 0; $x11->choose_screen ($screen); # Root window printf "Screen is %4d x %4d x %2d pixels (%3d x %3d mm) (X11)\n", $x11->{width_in_pixels}, $x11->{height_in_pixels}, $x11->{root +_depth}, $x11->{width_in_millimeters}, $x11->{height_in_millimeters}; }; eval { use Tk; my $mw = Tk::MainWindow->new; printf "Screen is %4d x %4d x %2d pixels (%3d x %3d mm) (Tk)\n", $mw->screenwidth, $mw->screenheight, $mw->depth, $mw->screenmmwidth, $mw->screenmmheight; };
$ screen_size Screen is 3840 x 1200 x 24 pixels (1014 x 317 mm) (X11) Screen is 3840 x 1200 x 24 pixels (1014 x 317 mm) (Tk)
In reply to Re: Tk screen and monitor size in mm, DPI and scaling
by Tux
in thread Tk screen and monitor size in mm, DPI and scaling
by Discipulus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |