e = size;
        node1.rect = [
            0 = ['x' = pos.x - size.x / 2; 'y' = pos.y - size.y / 2;];
            1 = ['x' = pos.x + size.x / 2; 'y' = pos.y + size.y / 2;];
        ];
    }
    for (eid in graph2.edges) {
        edge2 = graph2.edges[eid];
        if (edge2.attr.id) {
            if (~(edge1 = graph.edges[ston (edge2.attr.id)]))
                continue;
        } else if (graph == graph2)
            edge1 = edge2;
        edge1.draws = gt.unpackalldraw (gt, edge2.attr);
    }
    graph.draws = gt.unpackalldraw (gt, graph2.graphattr);
    t1 = split (graph2.graphattr.bb, ',');
    graph.rect[0].x = ston (t1[0]);
    graph.rect[0].y = ston (t1[1]);
    graph.rect[1].x = ston (t1[2]);
    graph.rect[1].y = ston (t1[3]);
    if (gt.graph ~= graph2)
        return;
    # strip position and size info from the attributes
    for (gid in graph2.graphdict) {
        sgraph2 = graph2.graphs[graph2.graphdict[gid]];
        gt.removealldraw (gt, sgraph2.graphattr);
        if (sgraph2.graphattr.bb)
            remove ('bb', sgraph2.graphattr);
    }
    for (nid in graph2.nodedict) {
        node2 = graph2.nodes[graph2.nodedict[nid]];
        gt.removealldraw (gt, node2.attr);
        if (node2.attr.rects)
            remove ('rects', node2.attr);
        remove ('pos', node2.attr);
        remove ('width', node2.attr);
        remove ('height', node2.attr);
    }
    for (eid in graph2.edges) {
        edge2 = graph2.edges[eid];
        gt.removealldraw (gt, edge2.attr);
        if (edge2.attr.pos)
            remove ('pos', edge2.attr);
        if (edge2.attr.lp)
            remove ('lp', edge2.attr);
    }
    gt.removealldraw (gt, graph2.graphattr);
    remove ('bb', graph2.graphattr);
    if (graph2.graphattr.lp)
        remove ('lp', graph2.graphattr);
};
#
# draw directive parsing
#
dotty.protogt.unpackalldraw = function (gt, attr) {
    local o, did;

    o = [];
    if (attr._draw_)
        o._draw_ = gt.unpackdraw (gt, attr._draw_);
    if (attr._ldraw_)
        o._ldraw_ = gt.unpackdraw (gt, attr._ldraw_);
    if (attr._hdraw_)
        o._hdraw_ = gt.unpackdraw (gt, attr._hdraw_);
    if (attr._tdraw_)
        o._tdraw_ = gt.unpackdraw (gt, attr._tdraw_);
    if (attr._hldraw_)
        o._hldraw_ = gt.unpackdraw (gt, attr._hldraw_);
    if (attr._tldraw_)
        o._tldraw_ = gt.unpackdraw (gt, attr._tldraw_);
    for (did in o)
        if (o[did].ep) {
            o.ep = o[did].ep;
            break;
        }
    return o;
};
dotty.protogt.removealldraw = function (gt, attr) {
    if (attr._draw_)
        remove ('_draw_', attr);
    if (attr._ldraw_)
        remove ('_ldraw_', attr);
    if (attr._hdraw_)
        remove ('_hdraw_', attr);
    if (attr._tdraw_)
        remove ('_tdraw_', attr);
    if (attr._hldraw_)
        remove ('_hldraw_', attr);
    if (attr._tldraw_)
        remove ('_tldraw_', attr);
};
dotty.protogt.unpackdraw = function (gt, attr) {
    local oo, o, tt, t, n, i, j, s, l, ep;

    oo = [];
    t = split (attr, ' ', 0);
    n = tablesize (t);
    if (t[n - 1] == '') {
  