⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photo.n

📁 linux系统下的音频通信
💻 N
📖 第 1 页 / 共 2 页
字号:
'\"'\" Copyright (c) 1994 The Australian National University'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" Author: Paul Mackerras (paulus@cs.anu.edu.au),'\"	    Department of Computer Science,'\"	    Australian National University.'\"'\" "@(#) photo.n 1.12 97/10/14 10:52:30"'\" .so man.macros.TH photo n 4.0 Tk "Tk Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEphoto \- Full-color images.SH SYNOPSIS\fBimage create photo \fR?\fIname\fR? ?\fIoptions\fR?.BE.SH DESCRIPTION.PPA photo is an image whose pixels can display any color or betransparent.  A photo image is stored internally in full color (24bits per pixel), and is displayed using dithering if necessary.  Imagedata for a photo image can be obtained from a file or a string, or itcan be supplied fromC code through a procedural interface.  At present, only GIF and PPM/PGMformats are supported, but an interface exists to allow additionalimage file formats to be added easily.  A photo image is transparentin regions where no image data has been supplied..SH "CREATING PHOTOS".PPLike all images, photos are created using the \fBimage create\fRcommand.Photos support the following \fIoptions\fR:.TP\fB\-data \fIstring\fRSpecifies the contents of the image as a string.  The format of thestring must be one of those for which there is an image file formathandler that will accept string data.  If both the \fB\-data\fRand \fB\-file\fR options are specified, the \fB\-file\fR option takesprecedence..TP\fB\-format \fIformat-name\fRSpecifies the name of the file format for the data specified with the\fB\-data\fR or \fB\-file\fR option..TP\fB\-file \fIname\fR\fIname\fR gives the name of a file that is to be read to supply datafor the photo image.  The file format must be one of those for whichthere is an image file format handler that can read data..TP\fB\-gamma \fIvalue\fRSpecifies that the colors allocated for displaying this image in awindow should be corrected for a non-linear display with the specifiedgamma exponent value.  (The intensity produced by mostCRT displays is a power function of the input value, to a goodapproximation; gamma is the exponent and is typically around 2).The value specified must be greater than zero.  The defaultvalue is one (no correction).  In general, values greater than onewill make the image lighter, and values less than one will make itdarker..TP\fB\-height \fInumber\fRSpecifies the height of the image, in pixels.  This option is usefulprimarily in situations where the user wishes to build up the contentsof the image piece by piece.  A value of zero (the default) allows theimage to expand or shrink vertically to fit the data stored in it..TP\fB\-palette \fIpalette-spec\fRSpecifies the resolution of the color cube to be allocated fordisplaying this image, and thus the number of colors used from thecolormaps of the windows where it is displayed.  The\fIpalette-spec\fR string may be either a single decimal number,specifying the number of shades of gray to use, or three decimalnumbers separated by slashes (/), specifying the number of shades ofred, green and blue to use, respectively.  If the first form (a singlenumber) is used, the image will be displayed in monochrome (i.e.,grayscale)..TP\fB\-width \fInumber\fRSpecifies the width of the image, in pixels.    This option is usefulprimarily in situations where the user wishes to build up the contentsof the image piece by piece.  A value of zero (the default) allows theimage to expand or shrink horizontally to fit the data stored in it..SH "IMAGE COMMAND".PPWhen a photo image is created, Tk also creates a new commandwhose name is the same as the image.This command may be used to invoke various operationson the image.It has the following general form:.CS\fIimageName option \fR?\fIarg arg ...\fR?.CE\fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command..PPThose options that write data to the image generally expand the sizeof the image, if necessary, to accommodate the data written to theimage, unless the user has specified non-zero values for the\fB\-width\fR and/or \fB\-height\fR configuration options, in whichcase the width and/or height, respectively, of the image will not bechanged..PPThe following commands are possible for photo images:.TP\fIimageName \fBblank\fRBlank the image; that is, set the entire image to have no data, so itwill be displayed as transparent, and the background of whateverwindow it is displayed in will show through..TP\fIimageName \fBcget\fR \fIoption\fRReturns the current value of the configuration option givenby \fIoption\fR.\fIOption\fR may have any of the values accepted by the\fBimage create photo\fR command..TP\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?Query or modify the configuration options for the image.If no \fIoption\fR is specified, returns a list describing all ofthe available options for \fIimageName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list).  If \fIoption\fR is specifiedwith no \fIvalue\fR, then the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified).  Ifone or more \fIoption\-value\fR pairs are specified, then the commandmodifies the given option(s) to have the given value(s);  inthis case the command returns an empty string.\fIOption\fR may have any of the values accepted by the\fBimage create photo\fR command..TP\fIimageName \fBcopy\fR \fIsourceImage\fR ?\fIoption value(s) ...\fR?Copies a region from the image called \fIsourceImage\fR (which mustbe a photo image) to the image called \fIimageName\fR, possibly withpixel zooming and/or subsampling.  If no options are specified, thiscommand copies the whole of \fIsourceImage\fR into \fIimageName\fR,starting at coordinates (0,0) in \fIimageName\fR.  The followingoptions may be specified:.RS.TP\fB\-from \fIx1 y1 x2 y2\fRSpecifies a rectangular sub-region of the source image to be copied.(\fIx1,y1\fR) and (\fIx2,y2\fR) specify diagonally opposite corners ofthe rectangle.  If \fIx2\fR and \fIy2\fR are not specified, thedefault value is the bottom-right corner of the source image.  Thepixels copied will include the left and top edges of the specifiedrectangle but not the bottom or right edges.  If the \fB\-from\fRoption is not given, the default is the whole source image..TP\fB\-to \fIx1 y1 x2 y2\fRSpecifies a rectangular sub-region of the destination image to beaffected.  (\fIx1,y1\fR) and (\fIx2,y2\fR) specify diagonally oppositecorners of the rectangle.  If \fIx2\fR and \fIy2\fR are not specified,the default value is (\fIx1,y1\fR) plus the size of the sourceregion (after subsampling and zooming, if specified).  If \fIx2\fR and\fIy2\fR are specified, the source region will be replicated ifnecessary to fill the destination region in a tiled fashion..TP\fB\-shrink\fRSpecifies that the size of the destination image should be reduced, ifnecessary, so that the region being copied into is at the bottom-rightcorner of the image.  This option will not affect the width or heightof the image if the user has specified a non-zero value for the\fB\-width\fR or \fB\-height\fR configuration option, respectively..TP\fB\-zoom \fIx y\fR

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -