Tk Library Source Code

EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]


canvas::sqmap - Canvas with map background based on square tiles

Table Of Contents


package require Tcl 8.4
package require Tk 8.4
package require snit
package require uevent::onidle
package require cache::async
package require canvas::sqmap ?0.3.1?

::canvas::sqmap pathName ?options?
canvasName image set cell image
canvasName image unset cell
canvasName flush


This package provides an extended canvas widget for the display of maps based on a set of square image tiles. The tiles are the background of the canvas, with all other canvas items added always shown in front of them. The number of tiles shown, tile size, and where to get the images to show are all configurable.




Image ownership

Note that the canvas does not take ownership of the images it shows in the background. In other words, when we say that the canvas forgets an image this means only that the association between a grid cell and shown image is broken. The image is not deleted. Managing the lifecycle of the images shown by the canvas is responsibility of the user of the canvas.

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 Tklib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.


canvas, cell, grid, image, map, square map, tile