From ce9dca75b1696d473e46b71fe75f0a2526971129 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 11 Jun 2016 20:11:18 +0000 Subject: Fixed [4cb3dab4eb] - Improvements to the documentation of Tk_FindPhoto et al. Patch provided by Simon Bachmann. --- doc/FindPhoto.3 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/FindPhoto.3 b/doc/FindPhoto.3 index d6ccb5b..dea7e05 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 preferrable to make changes to +a copy a 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 -- cgit v0.12 From 1c53ec442dddd830aecdcb7eaf90d19634177250 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 26 Jun 2016 20:18:50 +0000 Subject: Fixed typos --- doc/FindPhoto.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/FindPhoto.3 b/doc/FindPhoto.3 index dea7e05..e4d83f0 100644 --- a/doc/FindPhoto.3 +++ b/doc/FindPhoto.3 @@ -191,8 +191,8 @@ 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 preferrable to make changes to -a copy a of the image data and write it back with +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 -- cgit v0.12