diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-06-14 13:35:46 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-06-14 13:35:46 (GMT) |
commit | 8abf69416e48492ccda18dcfc6e8adf9d33d0a32 (patch) | |
tree | c4ad54b29f443e940a51b7b0ca0a9c57e5b65adc /doc | |
parent | 8c18f8111d03425255bcd1d60b70da5c9ae5f521 (diff) | |
download | tk-8abf69416e48492ccda18dcfc6e8adf9d33d0a32.zip tk-8abf69416e48492ccda18dcfc6e8adf9d33d0a32.tar.gz tk-8abf69416e48492ccda18dcfc6e8adf9d33d0a32.tar.bz2 |
TIP#98 implementation; improved photo image copy and GIF frame access
Diffstat (limited to 'doc')
-rw-r--r-- | doc/FindPhoto.3 | 37 | ||||
-rw-r--r-- | doc/photo.n | 14 |
2 files changed, 47 insertions, 4 deletions
diff --git a/doc/FindPhoto.3 b/doc/FindPhoto.3 index 47f5df2..d1c96d1 100644 --- a/doc/FindPhoto.3 +++ b/doc/FindPhoto.3 @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -'\" RCS: @(#) $Id: FindPhoto.3,v 1.3 1999/10/29 03:57:40 hobbs Exp $ +'\" RCS: @(#) $Id: FindPhoto.3,v 1.4 2002/06/14 13:35:47 dkf Exp $ '\" .so man.macros .TH Tk_FindPhoto 3 8.0 Tk "Tk Library Procedures" @@ -27,11 +27,11 @@ Tk_PhotoHandle .VE .sp void -\fBTk_PhotoPutBlock\fR(\fIhandle, blockPtr, x, y, width, height\fR) +\fBTk_PhotoPutBlock\fR(\fIhandle, blockPtr, x, y, width, height, compRule\fR) .sp void \fBTk_PhotoPutZoomedBlock\fR(\fIhandle, blockPtr, x, y, width, height,\ -zoomX, zoomY, subsampleX, subsampleY\fR) +zoomX, zoomY, subsampleX, subsampleY, compRule\fR) .sp int \fBTk_PhotoGetImage\fR(\fIhandle, blockPtr\fR) @@ -69,6 +69,16 @@ to be placed within the image. Specifies the width of the image area to be affected (for \fBTk_PhotoPutBlock\fR) or the desired image width (for \fBTk_PhotoExpand\fR and \fBTk_PhotoSetSize\fR). +.VS 8.4 +.AP int compRule in +Specifies the compositing rule used when combining transparent pixels +in a block of data with a photo image. Must be one of +TK_PHOTO_COMPOSITE_OVERLAY (which puts the block of data over the top +of the existing photo image, with the previous contents showing +through in the transparent bits) or TK_PHOTO_COMPOSITE_SET (which +discards the existing photo image contents in the rectangle covered by +the data block.) +.VE 8.4 .AP int height in Specifies the height of the image area to be affected (for \fBTk_PhotoPutBlock\fR) or the desired image height (for @@ -135,6 +145,17 @@ to the addresses of the bytes containing the red, green, blue and alpha have other values, e.g., for images that are stored as separate red, green and blue planes. .PP +.VS 8.4 +The \fIcompRule\fR parameter to \fBTk_PhotoPutBlock\fR specifies a +compositing rule that says what to do with transparent pixels. The +value TK_PHOTO_COMPOSITE_OVERLAY says that the previous contents of +the photo image should show through, and the value +TK_PHOTO_COMPOSITE_SET says that the previous contents of the photo +image should be completely ignored, and the values from the block be +copied directly across. The behavior in Tk8.3 and earlier was +equivalent to having TK_PHOTO_COMPOSITE_OVERLAY as a compositing rule. +.VE 8.4 +.PP The value given for the \fIwidth\fR and \fIheight\fR parameters to \fBTk_PhotoPutBlock\fR do not have to correspond to the values specified in \fIblock\fR. If they are smaller, \fBTk_PhotoPutBlock\fR extracts a @@ -193,6 +214,16 @@ calls to \fBTk_PhotoPutBlock\fR, \fBTk_PhotoPutZoomedBlock\fR or \fBTk_PhotoGetSize\fR returns the dimensions of the image in *\fIwidthPtr\fR and *\fIheightPtr\fR. +.SH PORTABILITY +.VS 8.4 +.PP +In Tk 8.3 and earlier, \fBTk_PhotoPutBlock\fR and +\fBTk_PhotoPutZoomedBlock\fR had different signatures. If you want to +compile code that uses the old interface against 8.4 without updating +your code, compile it with the flag -DUSE_OLD_PHOTO_PUT_BLOCK. Code +linked using Stubs against older versions of Tk will continue to work. +.VE 8.4 + .SH CREDITS .PP The code for the photo image type was developed by Paul Mackerras, diff --git a/doc/photo.n b/doc/photo.n index 5e16f92..83a5966 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -'\" RCS: @(#) $Id: photo.n,v 1.10 2002/03/14 10:19:40 dkf Exp $ +'\" RCS: @(#) $Id: photo.n,v 1.11 2002/06/14 13:35:47 dkf Exp $ '\" .so man.macros .TH photo n 4.0 Tk "Tk Built-In Commands" @@ -189,6 +189,18 @@ only every \fIx\fRth pixel in the X direction and \fIy\fRth pixel in the Y direction. Negative values will cause the image to be flipped about the Y or X axes, respectively. If \fIy\fR is not given, the default value is the same as \fIx\fR. +.TP +\fB\-compositingrule \fIrule\fR +.VS 8.4 +Specifies how transparent pixels in the source image are combined with +the destination image. When a compositing rule of \fIoverlay\fR is +set, the old contents of the destination image are visible, as if the +source image were printed on a piece of transparent film and placed +over the top of the destination. When a compositing rule of \fIset\R +is set, the old contents of the destination image are discarded and +the source image is used as-is. The default compositing rule is +\fIoverlay\fR. +.VE 8.4 .RE .TP \fIimageName \fBdata ?\fIoption value(s) ...\fR? |