Skip to content

Add 'imagepos' node attribute to control image placement

John Ellson requested to merge gh-dc616aac/1233/apocalyptech/master into master

Created by: apocalyptech

I often find myself wanting to use icons to help categorize graphviz nodes in a quick visual fashion, but I typically don't like that the image is centered right in the middle of the node. I know that I can control image placement somewhat by using HTML inside nodes, with <IMG> tags, but I generally don't like how large that makes the individual nodes.

So, this pull request adds in an "imagepos" node attribute which can align node images in one of nine positions, from Top Left to Bottom Right. It defaults to fully centered, as graphviz does currently.

Two things to note:

  1. I wasn't sure how this would interact with lib/common/htmltable.c, so for now I just set that file to hardcode the fully-centered option. It's possible I should be doing something more clever there.
  2. My distro doesn't seem to package ksh, which the documentation-generation scripts appear to use. I updated doc/infosrc/attrs, though.

Let me know if this isn't up to snuff, esp. WRT the "htmltable" stuff, though I could probably use some pointers if you'd like me to fix up that area of things.

Merge request reports