summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2016-06-27 19:23:59 (GMT)
committerfvogel <fvogel@noemail.net>2016-06-27 19:23:59 (GMT)
commit133d233c91a3154e37e993192788a3b6a155ec22 (patch)
treeea3e093cc01d74392d712ea814ce213931eb0471 /doc
parentf15541885ecf4876abb55d609069c30515de9837 (diff)
parentd0425f7c175862abe999cde756cf9d3b0a830058 (diff)
downloadtk-133d233c91a3154e37e993192788a3b6a155ec22.zip
tk-133d233c91a3154e37e993192788a3b6a155ec22.tar.gz
tk-133d233c91a3154e37e993192788a3b6a155ec22.tar.bz2
Fixed [4cb3dab4eb] - Improvements to the documentation of Tk_FindPhoto et al. Patch provided by Simon Bachmann.
FossilOrigin-Name: 7b7e5b5124e5b6a55dd6d8e4956fae44fe5aa62e
Diffstat (limited to 'doc')
-rw-r--r--doc/FindPhoto.314
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/FindPhoto.3 b/doc/FindPhoto.3
index 3ce3a21..2f15ea6 100644
--- a/doc/FindPhoto.3
+++ b/doc/FindPhoto.3
@@ -99,6 +99,8 @@ being written to the photo image.
particular photo image to the other procedures. The parameter is the
name of the image, that is, the name specified to the \fBimage create
photo\fR command, or assigned by that command if no name was specified.
+If \fIimageName\fR does not exist or is not a photo image,
+\fBTk_FindPhoto\fR returns NULL.
.PP
\fBTk_PhotoPutBlock\fR is used to supply blocks of image data to be
displayed. The call affects an area of the image of size
@@ -181,6 +183,18 @@ in the structure pointed to by the \fIblockPtr\fR parameter with values
that describe the address and layout of the image data that the
photo image has stored internally. The values are valid
until the image is destroyed or its size is changed.
+.PP
+It is possible to modify an image by writing directly to the data
+the \fIpixelPtr\fR field points to. The size of the image cannot be
+changed this way, though.
+Also, changes made by writing directly to \fIpixelPtr\fR will not be
+immediately visible, but only after a call to
+\fBTk_ImageChanged\fR or after an event that causes the interested
+widgets to redraw themselves.
+For these reasons usually it is preferable to make changes to
+a copy of the image data and write it back with
+\fBTk_PhotoPutBlock\fR or \fBTk_PhotoPutZoomedBlock\fR.
+.PP
\fBTk_PhotoGetImage\fR returns 1 for compatibility with the
corresponding procedure in the old photo widget.
.PP