📄 getpixels.3
字号:
'\"'\" Copyright (c) 1990 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) GetPixels.3 1.8 96/03/26 18:11:30'\" .so man.macros.TH Tk_GetPixels 3 "" Tk "Tk Library Procedures".BS.SH NAMETk_GetPixels, Tk_GetScreenMM \- translate between strings and screen units.SH SYNOPSIS.nf\fB#include <tk.h>\fR.spint\fBTk_GetPixels(\fIinterp, tkwin, string, intPtr\fB)\fR.spint\fBTk_GetScreenMM(\fIinterp, tkwin, string, doublePtr\fB)\fR.SH ARGUMENTS.AS "Tcl_Interp" *joinPtr.AP Tcl_Interp *interp inInterpreter to use for error reporting..AP Tk_Window tkwin inWindow whose screen geometry determines the conversion between absoluteunits and pixels. .AP char *string inString that specifies a distance on the screen..AP int *intPtr outPointer to location in which to store converted distance in pixels..AP double *doublePtr outPointer to location in which to store converted distance in millimeters..BE.SH DESCRIPTION.PPThese two procedures take as argument a specification of distance onthe screen (\fIstring\fR) and compute the corresponding distanceeither in integer pixels or floating-point millimeters.In either case, \fIstring\fR specifies a screen distance as afloating-point number followed by one of the following charactersthat indicates units:.TP<none>The number specifies a distance in pixels..TP\fBc\fRThe number specifies a distance in centimeters on the screen..TP\fBi\fRThe number specifies a distance in inches on the screen..TP\fBm\fRThe number specifies a distance in millimeters on the screen..TP\fBp\fRThe number specifies a distance in printer's points (1/72 inch)on the screen..PP\fBTk_GetPixels\fR converts \fIstring\fR to the nearest evennumber of pixels and stores that value at \fI*intPtr\fR.\fBTk_GetScreenMM\fR converts \fIstring\fR to millimeters andstores the double-precision floating-point result at \fI*doublePtr\fR..PPBoth procedures return \fBTCL_OK\fR under normal circumstances.If an error occurs (e.g. \fIstring\fR contains a number followedby a character that isn't one of the ones above) then\fBTCL_ERROR\fR is returned and an error message is leftin \fIinterp->result\fR..SH KEYWORDScentimeters, convert, inches, millimeters, pixels, points, screen units
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -