PuppyIcons 0.1
==============

A Tcl/Tk package wrapping SVG items from the 
[Puppy Icon Theme](https://github.com/puppylinux-woof-CE/puppy_icon_theme).

License
-------

BSD for the code; the icons themselves are CC0.

Dependencies
------------

    package require Tk
    package require tksvg

Usage
-----

    package require PuppyIcons
    PuppyIcons names ?pattern?
    PuppyIcons svg name
    PuppyIcons image name ?size?
    PuppyIcons image_nc name ?size?
    PuppyIcons flush
    PuppyIcons rebuild

Method `names` returns an alphabetically sorted list of icon names
matching the given `pattern`, or all, if `pattern` is omitted.

Method `svg` returns the SVG string for the icon `name`.

Method `image` creates and returns a photo image for the icon `name`.
The `size` option specifies the integer icon size. If it is negative, the
size is in pixels, otherwise in points. The default value for `size` is
16 points. The photo image is kept in an image cache for later re-use.

Method `image_nc` is similar to method `image` except that no caching is
performed, i.e. a newly created image is returned.

Method `flush` deletes all cached icon photo images.

Method `rebuild` recreates all cached icon photo images which have a size
in points. This is useful when the tk scaling factor is changed at runtime.

A utility script named `show.tcl` demonstrates the usage of this package
and displays all icons in a canvas widget.
