I am trying to obtain the position information (for nodes, edges, and edge labels) from GraphML files written by yEd (and then draw the graph myself). My approach seems to work for nodes and edges, but somehow the edge label positions are slightly off -- I guess I am missing a piece of the puzzle.
What I currently do:
I use the x, y, width and height attributes, and assume that they point to the left-upper corner of the (bounding box of the) node or edge 'needle'. I then compute the center of the bounding box, and use that as position. This seems to work.
For edge labels, I assume that the (center) point, obtained from the (bounding box represented by) x, y, width, height attributes of y:edgeLabel represents an offset w.r.t. the position of the source-node of the edge, i.e. I add the offset to the source-node position and use the result as the center of the label. This seems to be close, but wrong. Can someone tell me what the right computation is?