canvas::track::lines(n)
π canvas::track::lines(n) π
okay so you opened the page for canvas::track::lines(n), aka Variations on a canvas β welcome to the group chat, bestie π«Ά. itβs manual-page time, but make it make sense.
β¨ NAME β¨
canvas::track::lines β manage a group of rubber band lines. thatβs the whole vibe: it handles a little squad of rubberband lines, no cap π
.
π¦ SYNOPSIS π¦
package require Tcl 8.5
package require Tk 8.5
package require canvas::tag ?0.1?
::canvas::track lines objectName canvas
objectName destroy
objectName start current p...
objectName move current
objectName done
πΈ DESCRIPTION πΈ
this package gives you a utility class that manages the drawing of a set of semi-crosshair (rubberband) lines. itβs giving crosshair glam, lowkey β¨.
π CLASS API π
::canvas::track lines objectName canvasβ this is the class command, and it creates and configures a fresh new instance of the tracker named objectName. that instance gets connected to the canvas widget you pass in. the result of the command is the fully qualified name of the instance command. periodt.
π INSTANCE API π
instances of this class provide the following API, bestie:
π objectName destroy π
this method destroys the instance and releases all its internal resources. also important: this operation does destroy the items representing the tracked lines. it does not destroy the attached canvas. the result of the method is an empty string.
π¦ objectName start current p... π¦
this method starts the tracking of a set of lines β one line per point p, and each p specifies the destination end-point of that line. all the lines will have current as a common end-point. note that a previously tracked set of lines is removed. the result of the method is an empty string. each point is specified through a 2-element list containing its x- and y-coordinates, in this order. iykyk π
β objectName move current β
this method updates the shared end-point of all rubberbands and redraws them. the result of the method is an empty string. the point is specified through a 2-element list containing its x- and y-coordinates, in this order. slay, coordinates π .
π objectName done π
this method ends the tracking of the current set of lines and removes them from the canvas. clean exit, no drama π«Ά.
π BUGS, IDEAS, FEEDBACK π
this document, and the package it describes, will undoubtedly contain bugs and other problems β not me being shady, itβs literally in the manual. please report such in the category canvas of the Tklib Trackers http://core.tcl.tk/tklib/reportlist. please also report any ideas for enhancements you may have for either the package and/or the documentation. we love feedback, fr fr π
π₯ KEYWORDS π₯
canvas, crosshair, rubberband, tracking
source/version: tklib 0.1 β date: not listed in the original footer, so no invented date bestie. this iconic page is canvas::track::lines(n) π
β¨
π¦ where this page comes from
- alpine 3.24: tk-lib-doc 0.7-r0 Β· TCL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms