home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / TCL / BLT / BLT1.7L1 / BLT1 / blt-1.7 / man / bitmap.man < prev    next >
Encoding:
Text File  |  1994-01-10  |  5.0 KB  |  148 lines

  1. '\"
  2. '\" Copyright 1993-1994 by AT&T Bell Laboratories.
  3. '\" 
  4. '\" Permission to use, copy, modify, and distribute this software
  5. '\" and its documentation for any purpose and without fee is hereby
  6. '\" granted, provided that the above copyright notice appear in all
  7. '\" copies and that both that the copyright notice and warranty
  8. '\" disclaimer appear in supporting documentation, and that the
  9. '\" names of AT&T Bell Laboratories any of their entities not be used
  10. '\" in advertising or publicity pertaining to distribution of the
  11. '\" software without specific, written prior permission.
  12. '\"
  13. '\" AT&T disclaims all warranties with regard to this software, including
  14. '\" all implied warranties of merchantability and fitness.  In no event
  15. '\" shall AT&T be liable for any special, indirect or consequential
  16. '\" damages or any damages whatsoever resulting from loss of use, data
  17. '\" or profits, whether in an action of contract, negligence or other
  18. '\" tortuous action, arising out of or in connection with the use or
  19. '\" performance of this software.
  20. '\"
  21. '\" Bitmap command created by George Howlett.
  22. '\"
  23. .so man.macros
  24. .HS blt_bitmap cmds
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. blt_bitmap \- Define bitmap from data
  29. .SH SYNOPSIS
  30. \fBblt_bitmap define \fIname dataList\fR
  31. .sp
  32. .VS
  33. \fBblt_bitmap exists \fIname\fR
  34. .VE
  35. .sp
  36. \fBblt_bitmap bits \fIname\fR
  37. .sp
  38. \fBblt_bitmap data \fIname\fR
  39. .sp
  40. \fBblt_bitmap height \fIname\fR
  41. .sp
  42. \fBblt_bitmap width \fIname\fR
  43. .sp
  44. .VS
  45. \fBblt_bitmap compose \fIname text \fR?\fIoptions\fR?
  46. .VE
  47. .BE
  48. .SH DESCRIPTION
  49. .PP
  50. This command creates an internal bitmap for Tk from a list of data 
  51. and associates it with a given name.  It essentially offers the 
  52. functionality of \fBTk_DefineBitmap\fR at the Tcl programming level.  
  53. .SH BITMAP COMMANDS
  54. The following commands are available for \fBblt_bitmap\fR:
  55. .TP
  56. \fBblt_bitmap define \fIname dataList\fR 
  57. Associates \fIname\fR with in-memory bitmap data so that \fIname\fR can 
  58. be used in later calls to \fBTk_GetBitmap\fR. 
  59. The \fIname\fR argument is the name of the bitmap; it must
  60. not previously have been defined in either a call to Tk_DefineBitmap or
  61. \fBblt_bitmap\fR.  The argument \fIdataList\fP describes
  62. the bitmap to be created.  It is a list of two elements, the dimensions
  63. and source data.  The dimensions are a list of two numbers which are
  64. the width and height of the bitmap.  The source data is a list 
  65. of hexadecimal values in a format similar to the X11 or X10 bitmap format.  
  66. The values may be optionally separated by commas and do not need to 
  67. be prefixed with "\fC0x\fR". 
  68. .TP
  69. \fBblt_bitmap exists \fIname\fR 
  70. .VS
  71. Returns "1" if a bitmap \fIname\fR exists, otherwise "0". 
  72. .TP
  73. \fBblt_bitmap bits \fIname\fR 
  74. Returns the source data of the bitmap \fIname\fR. The source data is a 
  75. list of the hexadecimal values.  
  76. It is an error if \fIname\fR does not represent a valid bitmap.
  77. .TP
  78. \fBblt_bitmap data \fIname\fR 
  79. Returns a list of both the dimensions of the bitmap \fIname\fR and its 
  80. source data. 
  81. It is an error if \fIname\fR does not represent a valid bitmap.
  82. .TP
  83. \fBblt_bitmap height \fIname\fR 
  84. Returns the height of the bitmap \fIname\fR.
  85. It is an error if \fIname\fR does not represent a valid bitmap.
  86. .TP
  87. \fBblt_bitmap width \fIname\fR 
  88. Returns the width of the bitmap \fIname\fR.
  89. It is an error if \fIname\fR does not represent a valid bitmap.
  90. .TP
  91. \fBblt_bitmap compose \fIname text \fR?\fIoptions\fR?
  92. Creates a bitmap \fIname\fR from the text string \fItext\fR.
  93. A bitmap \fIname\fR can not already exist.  
  94. The following options are available.
  95. .RS
  96. .TP
  97. \fB\-font \fIfontName\fR 
  98. Specifies a font to use when drawing text into the bitmap.
  99. If this option isn't specified then \fIfontName\fR defaults to 
  100. \fC*-Helvetica-Bold-R-Normal-*-140-*\fR.
  101. .TP
  102. \fB\-rotate \fItheta\fR
  103. Specifies the angle of rotation of the text in the bitmap.
  104. \fITheta\fR is a real number representing the angle in degrees.
  105. It defaults to \fC0.0\fR degrees.
  106. .RE
  107. .VE
  108. .SH EXAMPLES
  109. The following examples demonstrate the various forms \fIdataList\fR 
  110. may take in the \fBblt_bitmap\fR command.
  111. .PP
  112. The elements may or may not be separated by commas.
  113. .DS 
  114. \fCblt_bitmap define light_gray { { 4 2 } { 0x08, 0x02 } }\fR
  115. \fCblt_bitmap define light_gray { { 4 2 } { 0x08 0x02 } }\fR
  116. .DE
  117. .PP
  118. Each element is a hexadecimal number which is optionally prefixed
  119. by "\fC0x\fR".
  120. .DS
  121. \fCblt_bitmap define light_gray { { 4 2 } { 8 2 } }\fR
  122. .DE
  123. .PP
  124. The hex values of data can be represented in either X11 or X10 bitmap 
  125. format.  In X11 bitmap format, each element is an unsigned character.
  126. .DS 
  127. \fCblt_bitmap define face { { 16 16 } {
  128.    0x1f, 0xf8, 0xc7, 0xe3, 0xf3, 0xcf, 0xf9, 0x9f, 
  129.    0xfd, 0xbf, 0xcc, 0x33, 0xfe, 0x7f, 0xfe, 0x7f, 
  130.    0x7e, 0x7e, 0xfe, 0x7f, 0xec, 0x37, 0xdd, 0xbb,
  131.    0x39, 0x9c, 0xf3, 0xcf, 0xc7, 0xe3, 0x1f, 0xf8 } 
  132. }\fR
  133. .DE
  134. .PP
  135. While in X10 format, they instead represent short integers.
  136. .DS 
  137. \fCblt_bitmap define face { 16 16 } { 
  138.     0xf81f, 0xe3c7, 0xcff3, 0x9ff9, 0xbffd, 0x33cc, 
  139.     0x7ffe, 0x7ffe, 0x7e7e, 0x7ffe, 0x37ec, 0xbbdd, 
  140.     0x9c39, 0xcff3, 0xe3c7, 0xf81f
  141. }\fR
  142. .DE
  143. .SH BUGS
  144. .PP
  145. There is no way to delete or redefine a bitmap.
  146. .SH KEYWORDS
  147. bitmap
  148.