Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Tips and short articles on this subject
Tcl/Tk - why does the canvas widget use a display list?
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Tcl/Tk module T219
Drawing on Canvases
Exercises, examples and other material relating to training module T219. This topic is presented on public course Tcl/Tk

Tcl - the Tk Toolkit - The Graphic Application of Tcl through Tk This course takes the programmer who's already learnt to program in Tcl forward into the ...
http://www.wellho.net/course/tkfull.html  [course]
"Tcl/Tk uses a display list when you draw on a canvas widget." OK - so what does that really mean? With most of the languages that we teach, any graphics ...
http://www.wellho.net/mouth/2211_Tcl ... list-.html  [short article]
#!/usr/bin/wish # demo of text options canvas .demo -width 400 -height 380 -background white button .end -text "done" -command exit pack .demo .end -fill ...
http://www.wellho.net/resources/ex.php4?item=t219/tktext  [code sample]
!/usr/bin/wish canvas .demo -width 350 -height 200 -background white button .end -text "done" -command exit pack .demo .end -fill both -expand true ...
http://www.wellho.net/resources/ex.php4?item=t219/can1  [code sample]
#!/usr/bin/wish canvas .demo -width 400 -height 740 -background white button .end -text "done" -command exit pack .demo .end -fill both -expand true ...
http://www.wellho.net/resources/ex.php4?item=t219/can4  [code sample]
# Draw a histogram on a canvas to display the # following data values which are sales for the # four quarters of a year set info {103.7 154.6 206.5 ...
http://www.wellho.net/resources/ex.php4?item=t219/histo  [code sample]
#!/usr/bin/wish canvas .demo -width 350 -height 200 -background white button .end -text "done" -command exit pack .demo .end -fill both -expand true ...
http://www.wellho.net/resources/ex.php4?item=t219/can2  [code sample]

Tcl/Tk GUIs consist largely of components such as buttons, labels entry boxes and sliders. Sometimes you'll need something that's much more graphic and for this you'll use a canvas widget. You can write to a canvas down to individual pixel level, and you can also draw lines, ovals, rectangles, text and polygons. This module studies the options for drawing to and manipulating a canvas, and introduces computer graphic techniques such as world to pixel co-ordinate transformations and display list manipulation.

This topic is presented on public course Tcl/Tk

Examples from our training material
can1   Drawing on a canvas
can2   Drawing shapes on a canvas and dragging them with the mouse
can3   Demo of different graphic objects
can4   Line styles on a Tk canvas
histo   Histogram drawn on a canvas - generalised code
imgoncanvas.tk   Placing a GIF on a canvas
tktext   text options in Tk - colour, font, size, centring
Pictures
Using a Tcl/Tk canvas
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Canvas basics.
Canvas and Canvas objects.
Interacting with drawing objects.
Canvas objects.
The rectangle (rect) object.
The oval object.
The polygon object.
The arc object.
The line object.
The text object.
Computer graphics - techniques.
Coordinate systems.
Clipping.
Display lists.
Hidden line and surface.
Further issues.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Tcl/Tk, Expect,Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2010: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 344596 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho