canvas canvasx
Changes an x of the window to an x of the canvas.
PATHNAME canvasx SCREENX ?GRID?
Description
Gives the x coordinate of the canvas at the x SCREENX of the window, with the scroll of the view. With GRID, rounds the result to a multiple of GRID.
Returns
A number.
Examples
% canvas .cx
> .cx canvasx 13 5
15.0
Errors
% canvas .cx2; .cx2 canvasx x
bad screen distance "x"
-errorcode NONE
% canvas .cx3; .cx3 canvasx
wrong # args: should be ".cx3 canvasx screenx ?gridspacing?"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1