summaryrefslogtreecommitdiffstats
path: root/doc/FindPhoto.3
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2002-06-14 13:35:46 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2002-06-14 13:35:46 (GMT)
commit800371951994b2cb1817cf287544ce5db5d1c98c (patch)
treec4ad54b29f443e940a51b7b0ca0a9c57e5b65adc /doc/FindPhoto.3
parentf57c1943cc89b76d669b5a80b9fb0a94a600f180 (diff)
downloadtk-800371951994b2cb1817cf287544ce5db5d1c98c.zip
tk-800371951994b2cb1817cf287544ce5db5d1c98c.tar.gz
tk-800371951994b2cb1817cf287544ce5db5d1c98c.tar.bz2
TIP#98 implementation; improved photo image copy and GIF frame access
Diffstat (limited to 'doc/FindPhoto.3')
-rw-r--r--doc/FindPhoto.337
1 files changed, 34 insertions, 3 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,