@@ -1986,6 +1986,25 @@ Base and mixin classes
19861986
19871987 .. versionadded :: next
19881988
1989+ .. method :: tk_scaling(number=None, *, displayof=0)
1990+
1991+ Query or set the scaling factor used by Tk to convert between physical
1992+ units (such as points, inches or millimeters) and pixels, expressed as
1993+ the number of pixels per point (where a point is 1/72 inch).
1994+ With no argument, return the current factor; otherwise set it to the
1995+ floating-point *number *.
1996+
1997+ .. versionadded :: next
1998+
1999+ .. method :: tk_inactive(reset=False, *, displayof=0)
2000+
2001+ Return the number of milliseconds since the last time the user interacted
2002+ with the system, or ``-1 `` if the windowing system does not support this.
2003+ If *reset * is true, reset the inactivity timer to zero instead and return
2004+ ``None ``.
2005+
2006+ .. versionadded :: next
2007+
19892008 .. method :: busy(**kw)
19902009 :no-typesetting:
19912010
@@ -3775,6 +3794,15 @@ Widget classes
37753794 *yOrigin * changes by a factor of *yScale * (a factor of ``1.0 `` leaves the
37763795 coordinate unchanged).
37773796
3797+ .. method :: rotate(tagOrId, xOrigin, yOrigin, angle, /)
3798+
3799+ Rotate the coordinates of all items given by *tagOrId * in canvas
3800+ coordinate space about the origin (*xOrigin *, *yOrigin *) by *angle *
3801+ degrees anticlockwise.
3802+ Negative values of *angle * rotate clockwise.
3803+
3804+ .. versionadded :: next
3805+
37783806 .. method :: delete(*tagOrIds)
37793807
37803808 Delete each of the items given by the *tagOrIds * arguments.
@@ -3794,6 +3822,17 @@ Widget classes
37943822 For line and polygon items *string * must be a valid sequence of
37953823 coordinates.
37963824
3825+ .. method :: rchars(tagOrId, first, last, string, /)
3826+
3827+ Replace the characters (for text items) or coordinates (for line and
3828+ polygon items) in the range from *first * to *last * inclusive of each of
3829+ the items given by *tagOrId * with *string *.
3830+ For line and polygon items *string * must be a valid sequence of
3831+ coordinates.
3832+ Items that do not support indexing ignore this operation.
3833+
3834+ .. versionadded :: next
3835+
37973836 .. method :: itemcget(tagOrId, option)
37983837
37993838 Return the current value of the configuration option *option * for the
@@ -4739,6 +4778,15 @@ Widget classes
47394778 If the *postcommand * option has been specified, it is evaluated before
47404779 the menu is posted.
47414780
4781+ .. method :: postcascade(index)
4782+
4783+ Post the submenu associated with the cascade entry given by *index *,
4784+ unposting any previously posted submenu.
4785+ This has no effect if *index * does not name a cascade entry or if the
4786+ menu itself is not posted.
4787+
4788+ .. versionadded :: next
4789+
47424790 .. method :: tk_popup(x, y, entry='')
47434791
47444792 Post the menu as a popup at the root-window coordinates *x * and *y *.
@@ -6059,6 +6107,14 @@ Image classes
60596107 it is displayed as transparent and the background of whatever window it
60606108 is displayed in shows through.
60616109
6110+ .. method :: redither()
6111+
6112+ Recalculate the dithered image in each window where it is displayed.
6113+ This is useful when the image data was supplied in pieces, in which case
6114+ the dithered image may not be exactly correct.
6115+
6116+ .. versionadded :: next
6117+
60626118 .. method :: cget(option)
60636119
60646120 Return the current value of the configuration option *option *.
@@ -6126,7 +6182,7 @@ Image classes
61266182
61276183
61286184 .. method :: data(format=None, *, from_coords=None, background=None, \
6129- grayscale=False)
6185+ grayscale=False, metadata=None )
61306186
61316187 Return the image data.
61326188
@@ -6150,16 +6206,27 @@ Image classes
61506206 If *grayscale * is true, the data does not contain color information; all
61516207 pixel data is transformed into grayscale.
61526208
6209+ *metadata * is a dictionary passed to the image format driver.
6210+ It requires Tcl/Tk 9.0 or newer.
6211+
61536212 .. versionadded :: 3.13
61546213
6214+ .. versionchanged :: next
6215+ Added the *metadata * parameter.
61556216
6156- .. method :: get(x, y)
6217+
6218+ .. method :: get(x, y, *, withalpha=False)
61576219
61586220 Return the color of the pixel at coordinates (*x *, *y *) as an
61596221 ``(r, g, b) `` tuple of three integers between 0 and 255, representing the
61606222 red, green and blue components respectively.
6223+ If *withalpha * is true, the returned tuple has a fourth element giving
6224+ the alpha (opacity) value of the pixel.
6225+
6226+ .. versionchanged :: next
6227+ Added the *withalpha * parameter, which requires Tcl/Tk 9.0 or newer.
61616228
6162- .. method :: put(data, to=None)
6229+ .. method :: put(data, to=None, *, format=None, metadata=None )
61636230
61646231 Set pixels of the image to the colors given in *data *, which must be a
61656232 string or a nested sequence of horizontal rows of pixel colors (for
@@ -6172,13 +6239,25 @@ Image classes
61726239 bottom-right corner, of the region.
61736240 The default position is ``(0, 0) ``.
61746241
6242+ *format * specifies the format of the image *data *, so that only image
6243+ file format handlers whose names begin with it are tried.
6244+
6245+ *metadata * is a dictionary passed to the image format driver.
6246+ It requires Tcl/Tk 9.0 or newer.
6247+
6248+ .. versionchanged :: next
6249+ Added the *format * and *metadata * parameters.
6250+
61756251 .. method :: read(filename, format=None, *, from_coords=None, to=None, \
6176- shrink=False)
6252+ shrink=False, metadata=None )
61776253
61786254 Read image data from the file named *filename * into the image.
61796255
61806256 *format * specifies the format of the image data in the file.
61816257
6258+ *metadata * is a dictionary passed to the image format driver.
6259+ It requires Tcl/Tk 9.0 or newer.
6260+
61826261 *from_coords * specifies a rectangular sub-region of the image file data
61836262 to be copied to the destination image.
61846263 It must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, y2) ``.
@@ -6199,6 +6278,9 @@ Image classes
61996278
62006279 .. versionadded :: 3.13
62016280
6281+ .. versionchanged :: next
6282+ Added the *metadata * parameter.
6283+
62026284
62036285 .. method :: subsample(x, y='', *, from_coords=None)
62046286
@@ -6231,7 +6313,7 @@ Image classes
62316313
62326314
62336315 .. method :: write(filename, format=None, from_coords=None, *, \
6234- background=None, grayscale=False)
6316+ background=None, grayscale=False, metadata=None )
62356317
62366318 Write image data from the image to the file named *filename *.
62376319
@@ -6253,9 +6335,15 @@ Image classes
62536335 If *grayscale * is true, the data does not contain color information; all
62546336 pixel data is transformed into grayscale.
62556337
6338+ *metadata * is a dictionary passed to the image format driver.
6339+ It requires Tcl/Tk 9.0 or newer.
6340+
62566341 .. versionchanged :: 3.13
62576342 Added the *background * and *grayscale * parameters.
62586343
6344+ .. versionchanged :: next
6345+ Added the *metadata * parameter.
6346+
62596347
62606348 .. method :: zoom(x, y='', *, from_coords=None)
62616349
0 commit comments