Tk_ImageChanged(3tk)
π NAME π
okay so bestie, this is Tk_ImageChanged(3tk), from the Tk Library Procedures manual, and it's literally here to notify widgets that image needs to be redrawn. That's the whole name, no cap. π
β¨ SYNOPSIS β¨
#include <tk.h>
Tk_ImageChanged(model, x, y, width, height, imageWidth, imageHeight)
π ARGUMENTS π
Tk_ImageModel model(in) β Token for image, which was passed to image'screateProcwhen 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. Like, whenever the pixels need a glow-up. 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. No cap, that last bit is important. π«Ά
π¦ SEE ALSO π¦
Tk_CreateImageType
π KEYWORDS π
- images
- redisplay
- image size changes
and that's the page, bestie. source/version: Tk 4.0, and the manual page is Tk_ImageChanged(3tk) β no date in the footer, but the slay is eternal. Stay iconic. πβ¨
π¦ where this page comes from
- debian trixie: tk9.0-doc 9.0.1-3
- ubuntu questing: tk9.0-doc 9.0.2-1
- ubuntu resolute: tk9.0-doc 9.0.3-1
- ubuntu stonking: tk9.0-doc 9.0.4-1
- 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 on : a language model's rewrite of the original, under its terms