Custom Shapes with tcldot: No loadimage plugin for "png:tk"

Hi everybody!

I'm trying to create a graph with custom shapes. I'm using tcldot on a Ubuntu machine, so I'm using package: libgv-tcl Version: 2.26.3-10ubuntu1.
I've got a problem with adding a node with my custom shape using a statement like this with role.png in the same folder like the script:
set node [$g addnode $name label $name shape custom shapefile role.png fontname helvetica]
$g addnode $node
I'm getting an error like this:
Warning: No loadimage plugin for "png:tk"
and standard box nodes appear in my graph.

I've tried it with different data types like bmp and gif and code variations, but it always produces the same error.

Any help or advice would be appreciated.

Thanks

Re: Custom Shapes with tcldot: No loadimage plugin for "png:tk"

In GIT now, or in tomorrow's snapshot, I've added support for GIF image loading into -Ttk output.

Actually, it just passes along the reference to the GIF file onto the Tk canvas and lets it do the work.  Tk only supports GIF and BMP, so no support for PNG with the current approach, sorry.

Example:

$ cat hello.gv
digraph{hello->world}

$ cat ab.gv
digraph{
    rankdir=LR
    node [image="hello.gif" label=""]
    a->b
}

$ dot -Tgif hello.gv -o hello.gif

$ dot -Ttk ab.gv
# Generated by graphviz version 2.33.0 (20130803.1835)
# Title: %3 Pages: 1
# a
$c create oval 4.79 227.17 139.21 4.83 -fill white -width 1 -outline black -tags {1node1}
image create photo "photo_hello.gif" -file "hello.gif"
$c create image 72.00 116.00 -image "photo_hello.gif"
# b
$c create oval 186.12 227.17 320.55 4.83 -fill white -width 1 -outline black -tags {1node2}
image create photo "photo_hello.gif" -file "hello.gif"
$c create image 253.33 116.00 -image "photo_hello.gif"
# a->b
$c create line 139.35 116 150.24 116 161.62 116 172.78 116 -fill black -width 1 -smooth bezier  -tags {1edge1}
$c create polygon 172.92 111.33 186.25 116 172.92 120.67 -fill black -width 1 -outline black -tags {1edge1}
 

 

Recent comments