Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

Tk_ImageChanged (3tk)

Name

Tk_ImageChanged - notify widgets that image needs to be redrawn

Synopsis

#include <tk.h>

Tk_ImageChanged(imageMaster, x, y, width, height, imageWidth, imageHeight)

Description

Tk_ImageChanged(3tk)         Tk Library Procedures        Tk_ImageChanged(3tk)



______________________________________________________________________________

NAME
       Tk_ImageChanged - notify widgets that image needs to be redrawn

SYNOPSIS
       #include <tk.h>

       Tk_ImageChanged(imageMaster, x, y, width, height, imageWidth, imageHeight)

ARGUMENTS
       Tk_ImageMaster imageMaster (in)          Token  for  image,  which  was
                                                passed to  image's  createProc
                                                when the image was created.

       int x (in)                               X-coordinate   of   upper-left
                                                corner of  region  that  needs
                                                redisplay    (measured    from
                                                upper-left corner of image).

       int y (in)                               Y-coordinate   of   upper-left
                                                corner  of  region  that needs
                                                redisplay    (measured    from
                                                upper-left corner of image).

       int width (in)                           Width  of region that needs to
                                                be redrawn, in pixels.

       int height (in)                          Height of region that needs to
                                                be redrawn, in pixels.

       int imageWidth (in)                      Current  width  of  image,  in
                                                pixels.

       int imageHeight (in)                     Current height  of  image,  in
                                                pixels.
______________________________________________________________________________

DESCRIPTION
       An  image  manager calls Tk_ImageChanged for an image whenever anything
       happens that requires the image to be redrawn.  As a result of  calling
       Tk_ImageChanged,  any widgets using the image are notified so that they
       can redisplay themselves appropriately.  The imageMaster argument iden-
       tifies  the  image,  and  x, y, width, and height specify a rectangular
       region within the image that  needs  to  be  redrawn.   imageWidth  and
       imageHeight specify the image's (new) size.

       An  image  manager should call Tk_ImageChanged during its createProc to
       specify the image's initial size and to force redisplay  if  there  are
       existing  instances  for  the image.  If any of the pixel values in the
       image should change later on, Tk_ImageChanged should  be  called  again
       with  x,  y,  width,  and  height values that cover all the pixels that
       changed.  If the size of the image should change, then  Tk_ImageChanged
       must  be  called to indicate the new size, even if no pixels need to be
       redisplayed.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | runtime/tk-8     |
       +---------------+------------------+
       |Stability      | Uncommitted      |
       +---------------+------------------+

SEE ALSO
       Tk_CreateImageType

KEYWORDS
       images, redisplay, image size changes



NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source        was        downloaded        from         https://source-
       forge.net/projects/tcl/files/Tcl/8.6.7/tk8.6.7-src.tar.gz/download.

       Further information about this software can be found on the open source
       community website at https://www.tcl.tk/.



Tk                                    4.0                 Tk_ImageChanged(3tk)