winfo fpixels
Gives a screen distance in pixels.
winfo fpixels WINDOW DISTANCE
Description
DISTANCE is a number of pixels, or a number with c, i, m, or p for centimeters, inches, millimeters, or points. ztk has 96 pixels for each inch. The result has the form of a floating-point number, and ztk rounds it to an integer.
Returns
A floating-point number.
Examples
% winfo fpixels . 1i
96.0
# ztk rounds the result.
% winfo fpixels . 1.4
1.0
Errors
% winfo fpixels . x
bad screen distance "x"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1