You are here

diagram 1.0

admin의 아바타


The tk canvas is a great widget: it is extremely flexible and allows you to implement all-you-could-imagine on top of it.

Consider a graphical editor in which the user edits a diagram composed of some objects (UML entities, ER entities, etc) and connectors that links these objects. In these situations, the implementor can write the diagram code directly in a tk canvas. While writing GNU Ferret ( I felt the need for a library that supports diagrams on tk. So i wrote diagram.tcl

A diagram is composed of objects and connectors. Objects are composed of an arbitrary number of tagged canvas elements (text, lines, rectangles, etc). When you declare a new object, you also set a shape for it: rectangle, ovoid, romboid, etc. The shape does not need to be visible. Connectors are orthogonal editable paths of lines connecting diagram objects.

  • example.tcl: Example
  • 첨부 파일파일 크기
    Image icon 3.png8.78 KB
    File example.tcl10.06 KB