*
* TODO: interaction with spline=ortho
*/
+ /* True if edges geometries were computed and this edge has a geometry */
+#define HAVE_EDGE(ep) ((et != ET_NONE) && (ED_spl(ep) != NULL))
+
static void addXLabels(Agraph_t * gp)
{
Agnode_t *np;
if (ED_xlabel(ep)) {
if (ED_xlabel(ep)->set)
n_set_lbls++;
- else if (et != ET_NONE)
+ else if (HAVE_EDGE(ep))
n_elbls++;
}
if (ED_head_label(ep)) {
if (ED_head_label(ep)->set)
n_set_lbls++;
- else if (et != ET_NONE)
+ else if (HAVE_EDGE(ep))
n_elbls++;
}
if (ED_tail_label(ep)) {
if (ED_tail_label(ep)->set)
n_set_lbls++;
- else if (et != ET_NONE)
+ else if (HAVE_EDGE(ep))
n_elbls++;
}
if (ED_label(ep)) {
if (ED_label(ep)->set)
n_set_lbls++;
- else if (et != ET_NONE)
+ else if (HAVE_EDGE(ep))
n_elbls++;
}
}
if (lp->set) {
bb = addLabelObj (lp, objp, bb);
}
- else if (et != ET_NONE) {
+ else if (HAVE_EDGE(ep)) {
addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep));
xlp++;
}
if (lp->set) {
bb = addLabelObj (lp, objp, bb);
}
- else if (et != ET_NONE) {
+ else if (HAVE_EDGE(ep)) {
addXLabel (lp, objp, xlp, 1, edgeTailpoint(ep));
xlp++;
}
if (lp->set) {
bb = addLabelObj (lp, objp, bb);
}
- else if (et != ET_NONE) {
+ else if (HAVE_EDGE(ep)) {
addXLabel (lp, objp, xlp, 1, edgeHeadpoint(ep));
xlp++;
}
if (lp->set) {
bb = addLabelObj (lp, objp, bb);
}
- else if (et != ET_NONE) {
+ else if (HAVE_EDGE(ep)) {
addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep));
xlp++;
}