head	1.9;
access;
symbols
	core-8-5-9:1.8
	core-8-5-8:1.8
	macosx-cocoa-merge:1.9
	macosx-cocoa-premerge:1.9
	macosx-carbon-freeze:1.9
	core-8-5-7:1.8
	core-8-5-6:1.8
	core-8-6-b1:1.9
	core-8-6-a3:1.9
	core-8-5-5:1.8
	core-8-6-a2:1.9
	core-8-5-4:1.8
	core-8-5-3:1.8
	core-8-6-a1:1.8
	core-8-4-19:1.4
	core-8-5-branch:1.8.0.2
	core-8-5-2:1.8
	core-8-4-18:1.4
	core-8-5-1:1.8
	core-8-4-17:1.4
	core-8-5-0:1.8
	core-8-5-b3:1.7
	core-8-5-b2:1.6
	core-8-4-16:1.4
	core-8-5-b1:1.6
	core-stablilizer-merge:1.6
	core-stabilizer-branch:1.6.0.2
	core-stabilizer-merge:1.8
	core-8-4-15:1.4
	core-8-5-a6:1.6
	core-8-5-a5:1.5
	core-8-4-14:1.4
	core-8-5-a4:1.5
	core-8-4-13:1.4
	core-8-4-12:1.4
	core-8-4-11:1.4
	core-8-5-a3:1.5
	core-8-4-10:1.4
	core-8-4-9-branch:1.4.0.6
	core-8-5-a2:1.4
	core-8-4-9:1.4
	core-8-4-8:1.4
	core-8-4-7:1.4
	core-8-5-a1:1.4
	core-8-4-6:1.4
	core-8-4-5:1.4
	mistachkin-dev-branch:1.4.0.4
	core-8-4-4:1.4
	core-8-4-3:1.4
	core-8-4-branch:1.4.0.2
	core-8-4-2:1.4
	core-8-4-1:1.4
	core-8-3-5:1.3
	core-8-4-0:1.4
	macosx-8-4-merge-2002-08-31-trunk:1.4
	macosx-8-4-premerge-2002-08-31-branch:1.3.18.1
	macosx-8-4-premerge-2002-08-31-trunk:1.4
	macosx-8-4-merge-2002-08-30-branch:1.3.18.1
	macosx-8-4-merge-2002-08-30-trunk:1.4
	macosx-8-4-merge-2002-08-20-branch:1.3.18.1
	macosx-8-4-merge-2002-08-20-trunk:1.4
	core-8-4-b2:1.4
	core-8-4-b1:1.4
	macosx-premerge-6-9-02:1.3.18.1
	core-8-4-a4:1.4
	core-8-3-4:1.3
	macosx-8-4-branch:1.3.0.18
	macosx-8-4-branchpoint:1.3
	core-8-4-a3:1.3
	core-8-3-3:1.3
	dgp-privates-into-namespace:1.3.0.16
	tclpro-1-5-0:1.3
	core-8-4-win-speedup:1.3.0.14
	core-8-4-a2:1.3
	tclpro-1-4-1:1.3
	tclpro-1-4-0:1.3
	core-8-3-2:1.3
	ajuba-ajuba2-2-1-base:1.3
	ajuba-ajuba2-2-0:1.3
	core-8-4-a1:1.3
	core-8-3-1-branch:1.3.0.12
	core-8-3-1:1.3
	scriptics-sc-2-0-b5:1.3
	scriptics-sc-2-0-fixed:1.3
	scriptics-sc-2-0-b2:1.3
	scriptics-sc-2-0-b1:1.3
	core-8-3-0:1.3
	core-8-3-b2:1.3
	core-8-3-b1:1.3
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	core-8-2-3:1.3
	scriptics-sc-1-1-branch:1.3.0.10
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.8
	scriptics-sc-1-0-base:1.3
	core-8-2-2:1.3
	core-8-2-1:1.3
	scriptics-bc-1-0-b1:1.3
	core-8-2-1-branch:1.3.0.6
	scriptics-tclpro-1-3-0:1.3
	core-8-2-0:1.3
	core-8-2-b3-branch:1.3.0.4
	core-8-2-b3-base:1.3
	scriptics-tclpro-1-3-b4:1.3
	core-8-2-b2:1.3
	scriptics-tclpro-1-3-b3:1.3
	core-8-2-b1:1.3
	scriptics-tclpro-1-3-b2:1.3
	merge-to-mainline-5/21/99:1.3
	scriptics-tclpro-1-3-b2-branch:1.3.0.2
	core-8-1-1:1.3
	scriptics-tclpro-1-3-b1:1.3
	core-8-1-1-base:1.3
	core-8-1-0:1.3
	merge-to-mainline-4-29-99:1.3
	merge-to-mainline-4-23-99:1.3
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.2
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.2
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.9
date	2008.06.30.22.57.01;	author dkf;	state Exp;
branches;
next	1.8;

1.8
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.7;

1.7
date	2007.10.29.16.04.12;	author dkf;	state Exp;
branches;
next	1.6;

1.6
date	2007.01.05.00.00.48;	author nijtmans;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches;
next	1.4;

1.4
date	2002.01.25.21.09.36;	author dgp;	state Exp;
branches;
next	1.3;

1.3
date	99.04.16.01.51.08;	author stanton;	state Exp;
branches
	1.3.14.1
	1.3.18.1;
next	1.2;

1.2
date	98.09.14.18.22.50;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.40.05;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.09;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.15.57;	author stanton;	state Exp;
branches;
next	;

1.3.14.1
date	2002.04.02.20.57.53;	author hobbs;	state Exp;
branches;
next	;

1.3.18.1
date	2002.02.05.02.25.13;	author wolfsuit;	state Exp;
branches;
next	;

1.6.2.1
date	2007.11.01.16.37.13;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: GetPixels.3,v 1.8 2007/12/13 15:23:43 dgp Exp $
'\" 
.so man.macros
.TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_GetPixelsFromObj, Tk_GetPixels, Tk_GetMMFromObj, Tk_GetScreenMM \- translate between strings and screen units
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
int
\fBTk_GetPixelsFromObj(\fIinterp, tkwin, objPtr, intPtr\fB)\fR
.sp
int
\fBTk_GetPixels(\fIinterp, tkwin, string, intPtr\fB)\fR
.sp
int
\fBTk_GetMMFromObj(\fIinterp, tkwin, objPtr, doublePtr\fB)\fR
.sp
int
\fBTk_GetScreenMM(\fIinterp, tkwin, string, doublePtr\fB)\fR
.SH ARGUMENTS
.AS "Tcl_Interp" *joinPtr
.AP Tcl_Interp *interp in
Interpreter to use for error reporting.
.AP Tk_Window tkwin in
Window whose screen geometry determines the conversion between absolute
units and pixels.
.AP Tcl_Obj *objPtr in/out
String value specifies a distance on the screen;
internal rep will be modified to cache converted distance.
.AP "const char" *string in
Same as \fIobjPtr\fR except specification of distance is passed as
a string.
.AP int *intPtr out
Pointer to location in which to store converted distance in pixels.
.AP double *doublePtr out
Pointer to location in which to store converted distance in millimeters.
.BE
.SH DESCRIPTION
.PP
These procedures take as argument a specification of distance on
the screen (\fIobjPtr\fR or \fIstring\fR) and compute the
corresponding distance either in integer pixels or floating-point millimeters.
In either case,
\fIobjPtr\fR or \fIstring\fR
specifies a screen distance as a
floating-point number followed by one of the following characters
that indicates units:
.TP
<none>
The number specifies a distance in pixels.
.TP
\fBc\fR
The number specifies a distance in centimeters on the screen.
.TP
\fBi\fR
The number specifies a distance in inches on the screen.
.TP
\fBm\fR
The number specifies a distance in millimeters on the screen.
.TP
\fBp\fR
The number specifies a distance in printer's points (1/72 inch)
on the screen.
.PP
\fBTk_GetPixelsFromObj\fR converts the value of \fIobjPtr\fR to the
nearest even number of pixels and stores that value at \fI*intPtr\fR.
It returns \fBTCL_OK\fR under normal circumstances.
If an error occurs (e.g. \fIobjPtr\fR contains a number followed
by a character that is not one of the ones above) then
\fBTCL_ERROR\fR is returned and an error message is left
in \fIinterp\fR's result if \fIinterp\fR is not NULL.
\fBTk_GetPixelsFromObj\fR caches information about the return
value in \fIobjPtr\fR, which speeds up future calls to
\fBTk_GetPixelsFromObj\fR with the same \fIobjPtr\fR.
.PP
\fBTk_GetPixels\fR is identical to \fBTk_GetPixelsFromObj\fR except
that the screen distance is specified with a string instead
of an object.  This prevents \fBTk_GetPixels\fR from caching the
return value, so \fBTk_GetAnchor\fR is less efficient than
\fBTk_GetPixelsFromObj\fR.
.PP
\fBTk_GetMMFromObj\fR and \fBTk_GetScreenMM\fR are similar to
\fBTk_GetPixelsFromObj\fR and \fBTk_GetPixels\fR (respectively) except
that they convert the screen distance to millimeters and
store a double-precision floating-point result at \fI*doublePtr\fR.
.SH KEYWORDS
centimeters, convert, inches, millimeters, pixels, points, screen units
@


1.8
log
@merge stable branch onto HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.6.2.1 2007/11/01 16:37:13 dgp Exp $
a47 1

a95 1

@


1.7
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.6 2007/01/05 00:00:48 nijtmans Exp $
@


1.6
log
@various "const" additions, in line with TIP #27
fix bug #1627732
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.5 2005/04/06 21:11:54 dkf Exp $
d80 1
a80 1
by a character that isn't one of the ones above) then
d82 1
a82 1
in \fIinterp\fR's result if \fIinterp\fR isn't NULL.
@


1.6.2.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.6 2007/01/05 00:00:48 nijtmans Exp $
d80 1
a80 1
by a character that is not one of the ones above) then
d82 1
a82 1
in \fIinterp\fR's result if \fIinterp\fR is not NULL.
@


1.5
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.4 2002/01/25 21:09:36 dgp Exp $
d40 1
a40 1
.AP "CONST char" *string in
@


1.4
log
@	* Updated callers of Tcl_SplitList and Tcl_Merge.
	* Updated callers of Tcl_GetStringResult.
	  Rewrote PrintScrollFractions to ScrollFractions to stop scribbling
	  directly on interp->result.
	* Updated callers of Tcl_GetVar, Tcl_GetVar2
	* Updated callers of Tcl_SplitPath, Tcl_JoinPath, and
	  Tcl_TranslateFileName.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.3 1999/04/16 01:51:08 stanton Exp $
a18 1
.VS 8.1
a20 1
.VE
a24 1
.VS 8.1
a26 1
.VE
a36 1
.VS 8.1 br
a42 1
.VE
a51 1
.VS 8.1
a52 1
.VE
a54 1
.VS 8.1
a55 1
.VE
a75 1
.VS 8.1
a96 1
.VE
@


1.3
log
@* Merged 8.1 branch into the main trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d45 1
a45 1
.AP char *string in
@


1.3.14.1
log
@sync with head
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.4 2002/01/25 21:09:36 dgp Exp $
d45 1
a45 1
.AP "CONST char" *string in
@


1.3.18.1
log
@Merge with current TOT
Added support for the wm stackorder command
Fixed crash when selecting Menu items in the Application menu that we didn't
put there.
Added first bits of the use of CG for low-level drawing.  The line-drawing works,
the rest doesn't yet.  You have to set the file static useCGDrawing to 1 and
rebuild to activate this code.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.3 1999/04/16 01:51:08 stanton Exp $
d45 1
a45 1
.AP "CONST char" *string in
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d3 1
a3 1
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
d11 1
a11 1
.TH Tk_GetPixels 3 "" Tk "Tk Library Procedures"
d14 1
a14 1
Tk_GetPixels, Tk_GetScreenMM \- translate between strings and screen units
d19 5
d27 5
d40 5
a44 1
units and pixels. 
d46 3
a48 1
String that specifies a distance on the screen.
d57 10
a66 4
These two procedures take as argument a specification of distance on
the screen (\fIstring\fR) and compute the corresponding distance
either in integer pixels or floating-point millimeters.
In either case, \fIstring\fR specifies a screen distance as a
d86 5
a90 7
\fBTk_GetPixels\fR converts \fIstring\fR to the nearest even
number of pixels and stores that value at \fI*intPtr\fR.
\fBTk_GetScreenMM\fR converts \fIstring\fR to millimeters and
stores the double-precision floating-point result at \fI*doublePtr\fR.
.PP
Both procedures return \fBTCL_OK\fR under normal circumstances.
If an error occurs (e.g. \fIstring\fR contains a number followed
d93 16
a108 1
in \fIinterp->result\fR.
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) GetPixels.3 1.8 96/03/26 18:11:30
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d3 1
a3 1
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
d8 1
a8 1
'\" SCCS: @@(#) GetPixels.3 1.9 98/01/14 13:59:00
d11 1
a11 1
.TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures"
d14 1
a14 1
Tk_GetPixelsFromObj, Tk_GetPixels, Tk_GetMMFromObj, Tk_GetScreenMM \- translate between strings and screen units
a18 5
.VS 8.1
int
\fBTk_GetPixelsFromObj(\fIinterp, tkwin, objPtr, intPtr\fB)\fR
.VE
.sp
a21 5
.VS 8.1
int
\fBTk_GetMMFromObj(\fIinterp, tkwin, objPtr, doublePtr\fB)\fR
.VE
.sp
d30 1
a30 5
units and pixels.
.VS 8.1 br
.AP Tcl_Obj *objPtr in/out
String value specifies a distance on the screen;
internal rep will be modified to cache converted distance.
d32 1
a32 3
Same as \fIobjPtr\fR except specification of distance is passed as
a string.
.VE
d41 4
a44 10
These procedures take as argument a specification of distance on
.VS 8.1
the screen (\fIobjPtr\fR or \fIstring\fR) and compute the
.VE
corresponding distance either in integer pixels or floating-point millimeters.
In either case,
.VS 8.1
\fIobjPtr\fR or \fIstring\fR
.VE
specifies a screen distance as a
d64 7
a70 5
.VS 8.1
\fBTk_GetPixelsFromObj\fR converts the value of \fIobjPtr\fR to the
nearest even number of pixels and stores that value at \fI*intPtr\fR.
It returns \fBTCL_OK\fR under normal circumstances.
If an error occurs (e.g. \fIobjPtr\fR contains a number followed
d73 1
a73 16
in \fIinterp\fR's result if \fIinterp\fR isn't NULL.
\fBTk_GetPixelsFromObj\fR caches information about the return
value in \fIobjPtr\fR, which speeds up future calls to
\fBTk_GetPixelsFromObj\fR with the same \fIobjPtr\fR.
.PP
\fBTk_GetPixels\fR is identical to \fBTk_GetPixelsFromObj\fR except
that the screen distance is specified with a string instead
of an object.  This prevents \fBTk_GetPixels\fR from caching the
return value, so \fBTk_GetAnchor\fR is less efficient than
\fBTk_GetPixelsFromObj\fR.
.PP
\fBTk_GetMMFromObj\fR and \fBTk_GetScreenMM\fR are similar to
\fBTk_GetPixelsFromObj\fR and \fBTk_GetPixels\fR (respectively) except
that they convert the screen distance to millimeters and
store a double-precision floating-point result at \fI*doublePtr\fR.
.VE
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetPixels.3,v 1.2 1998/09/14 18:22:50 stanton Exp $
@


