Tk_ImageChanged(3)
β¨ NAME β¨
okay so this is Tk_ImageChanged(3) from the Tk Library Procedures, and it is literally here to notify widgets that image needs to be redrawn π
. That's the whole vibe, and it ate.
π¦ SYNOPSIS π¦
#include <tk.h>
Tk_ImageChanged(model, x, y, width, height, imageWidth, imageHeight)
π ARGUMENTS π
Tk_ImageModel model (in)β the token for the image, bestie. It's the token that was passed to the image'screateProcwhen the image was created π«Ά.int x (in)β X-coordinate of the upper-left corner of the region that needs redisplay, measured from the upper-left corner of the image.int y (in)β Y-coordinate of the upper-left corner of the region that needs redisplay, measured from the upper-left corner of the image.int width (in)β width of the region that needs to be redrawn, in pixels.int height (in)β height of the region that needs to be redrawn, in pixels.int imageWidth (in)β current width of the image, in pixels.int imageHeight (in)β current height of the 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 model argument identifies 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.
lowkey important, bestie: if the size changes, you must call Tk_ImageChanged to indicate the new size β even if no pixels need to be redisplayed. no cap π.
π SEE ALSO π
Tk_CreateImageTypeβ the related page, go read it too π«Ά.
β KEYWORDS β
imagesredisplayimage size changes
xoxo, source/version: Tk 4.0 Β· footer: Tk_ImageChanged(3) π«Άπ
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1994 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms