home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / GetCapStyl.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  2.8 KB  |  77 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/GetCapStyl.3,v 1.5 93/04/01 09:41:24 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_GetCapStyle tkc
  25. .BS
  26. .SH NAME
  27. Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. int
  33. \fBTk_GetCapStyle(\fIinterp, string, capPtr\fB)\fR
  34. .sp
  35. char *
  36. \fBTk_NameOfCapStyle(\fIcap\fB)\fR
  37. .SH ARGUMENTS
  38. .AS "Tcl_Interp" *capPtr
  39. .AP Tcl_Interp *interp in
  40. Interpreter to use for error reporting.
  41. .AP char *string in
  42. String containing name of cap style: one of ```butt'', ``projecting'',
  43. or ``round''.
  44. .AP int *capPtr out
  45. Pointer to location in which to store X cap style corresponding to
  46. \fIstring\fR.
  47. .AP int cap in
  48. Cap style: one of \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
  49. .BE
  50.  
  51. .SH DESCRIPTION
  52. .PP
  53. \fBTk_GetCapStyle\fR places in \fI*capPtr\fR the X cap style
  54. corresponding to \fIstring\fR.
  55. This will be one of the values
  56. \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
  57. Cap styles are typically used in X graphics contexts to indicate
  58. how the end-points of lines should be capped.
  59. See the X documentation for information on what each style
  60. implies.
  61. .PP
  62. Under normal circumstances the return value is \fBTCL_OK\fR and
  63. \fIinterp\fR is unused.
  64. If \fIstring\fR doesn't contain a valid cap style
  65. or an abbreviation of one of these names, then an error message is
  66. stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
  67. \fI*capPtr\fR is unmodified.
  68. .PP
  69. \fBTk_NameOfCapStyle\fR is the logical inverse of \fBTk_GetCapStyle\fR.
  70. Given a cap style such as \fBCapButt\fR it returns a
  71. statically-allocated string corresponding to \fIcap\fR.
  72. If \fIcap\fR isn't a legal cap style, then
  73. ``unknown cap style'' is returned.
  74.  
  75. .SH KEYWORDS
  76. butt, cap style, projecting, round
  77.