logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

canvas::track::lines - Manage a group of rubber band lines

Bugs, Ideas, Feedback

       This document, and the package it describes, will undoubtedly contain bugs and  other  problems.   Please
       report  such  in the category canvas of the TklibTrackers [http://core.tcl.tk/tklib/reportlist].  Please
       also report any ideas for enhancements you may have for either package and/or documentation.

Class Api

::canvas::tracklinesobjectNamecanvas
              This,  the  class command, creates and configures a new instance of the tracker, named objectName.
              The instance will be connected to the specified canvas widget.

              The result of the command is the fully qualified name of the instance command.

Description

       This package provides a utility class managing the drawing of set of semi-crosshair (rubberband) lines.

Instance Api

       Instances of this class provide the following API:

       objectNamedestroy
              This method destroys the instance and releases all its internal resources.

              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.

       objectNamestartcurrentp...
              This  method  starts  the  tracking  of  a set of lines, one line per point p, which specifies the
              destination end-point of each line. All 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.

       objectNamemovecurrent
              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.

       objectNamedone
              This method ends the tracking of the current set of lines and removes them from the canvas.

Keywords

       canvas, crosshair, rubberband, tracking

tklib                                                  0.1                             canvas::track::lines(3tk)

Name

       canvas::track::lines - Manage a group of rubber band lines

Synopsis

       package require Tcl8.5

       package require Tk8.5

       package require canvas::tag?0.1?::canvas::tracklinesobjectNamecanvasobjectNamedestroyobjectNamestartcurrentp...

       objectNamemovecurrentobjectNamedone

________________________________________________________________________________________________________________

See Also