diff options
Diffstat (limited to 'doc/GetColor.3')
-rw-r--r-- | doc/GetColor.3 | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/doc/GetColor.3 b/doc/GetColor.3 index abd1620..25fe16e 100644 --- a/doc/GetColor.3 +++ b/doc/GetColor.3 @@ -13,7 +13,6 @@ Tk_AllocColorFromObj, Tk_GetColor, Tk_GetColorFromObj, Tk_GetColorByValue, Tk_Na .SH SYNOPSIS .nf \fB#include <tk.h>\fR -.VS 8.1 .sp XColor * \fBTk_AllocColorFromObj(\fIinterp, tkwin, objPtr\fB)\fR @@ -23,20 +22,17 @@ XColor * .sp XColor * \fBTk_GetColorFromObj(\fItkwin, objPtr\fB)\fR -.VE .sp XColor * \fBTk_GetColorByValue(\fItkwin, prefPtr\fB)\fR .sp -CONST char * +const char * \fBTk_NameOfColor(\fIcolorPtr\fB)\fR .sp GC \fBTk_GCForColor(\fIcolorPtr, drawable\fB)\fR .sp -.VS 8.1 \fBTk_FreeColorFromObj(\fItkwin, objPtr\fB)\fR -.VE .sp \fBTk_FreeColor(\fIcolorPtr\fB)\fR .SH ARGUMENTS @@ -45,14 +41,12 @@ GC Interpreter to use for error reporting. .AP Tk_Window tkwin in Token for window in which color will be used. -.VS 8.1 br .AP Tcl_Obj *objPtr in/out String value describes desired color; internal rep will be modified to cache pointer to corresponding (XColor *). .AP char *name in Same as \fIobjPtr\fR except description of color is passed as a string and -resulting (XColor *) isn't cached. -.VE +resulting (XColor *) is not cached. .AP XColor *prefPtr in Indicates red, green, and blue intensities of desired color. @@ -66,7 +60,6 @@ same screen and depth as the window for which the color was allocated. .BE .SH DESCRIPTION -.VS 8.1 .PP These procedures manage the colors being used by a Tk application. They allow colors to be shared whenever possible, so that colormap @@ -77,7 +70,6 @@ Given a textual description of a color, \fBTk_AllocColorFromObj\fR locates a pixel value that may be used to render the color in a particular window. The desired color is specified with an object whose string value must have one of the following forms: -.VE .TP 20 \fIcolorname\fR Any of the valid textual names for a color defined in the @@ -99,7 +91,6 @@ the most significant bits of the color, while the lower unfilled bits will be repeatedly replicated from the available higher bits. For example, #3a7 is the same as #3333aaaa7777. .PP -.VS 8.1 \fBTk_AllocColorFromObj\fR returns a pointer to an XColor structure; the structure indicates the exact intensities of the allocated color (which may differ slightly from those requested, @@ -107,7 +98,7 @@ depending on the limitations of the screen) and a pixel value that may be used to draw with the color in \fItkwin\fR. If an error occurs in \fBTk_AllocColorFromObj\fR (such as an unknown color name) then NULL is returned and an error message is stored in -\fIinterp\fR's result if \fIinterp\fR isn't NULL. +\fIinterp\fR's result if \fIinterp\fR is not NULL. If the colormap for \fItkwin\fR is full, \fBTk_AllocColorFromObj\fR will use the closest existing color in the colormap. \fBTk_AllocColorFromObj\fR caches information about @@ -122,13 +113,12 @@ return value, so \fBTk_GetColor\fR is less efficient than .PP \fBTk_GetColorFromObj\fR returns the token for an existing color, given the window and description used to create the color. -\fBTk_GetColorFromObj\fR doesn't actually create the color; the color +\fBTk_GetColorFromObj\fR does not actually create the color; the color must already have been created with a previous call to \fBTk_AllocColorFromObj\fR or \fBTk_GetColor\fR. The return value is cached in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetColorFromObj\fR with the same \fIobjPtr\fR and \fItkwin\fR. -.VE .PP \fBTk_GetColorByValue\fR is similar to \fBTk_GetColor\fR except that the desired color is indicated with the \fIred\fR, \fIgreen\fR, and @@ -174,7 +164,6 @@ The graphics context is cached with the color and will exist only as long as \fIcolorPtr\fR exists; it is freed when the last reference to \fIcolorPtr\fR is freed by calling \fBTk_FreeColor\fR. .PP -.VS 8.1 When a color is no longer needed \fBTk_FreeColorFromObj\fR or \fBTk_FreeColor\fR should be called to release it. For \fBTk_FreeColorFromObj\fR the color to release is specified @@ -184,6 +173,5 @@ with a pointer to its XColor structure. There should be exactly one call to \fBTk_FreeColorFromObj\fR or \fBTk_FreeColor\fR for each call to \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR, or \fBTk_GetColorByValue\fR. -.VE .SH KEYWORDS color, intensity, object, pixel value |