pointf p2;
bezier *newspl;
node_t *tn, *hn;
- int start, end, i;
+ int start, end, i, clipTail, clipHead;
graph_t *g;
edge_t *orig;
inside_t inside_context;
hn = tn;
tn = tmp;
}
+ if (tn == orig->tail) {
+ clipTail = ED_tail_port(orig).clip;
+ clipHead = ED_head_port(orig).clip;
+ }
+ else { /* fe and orig are reversed */
+ clipTail = ED_head_port(orig).clip;
+ clipHead = ED_tail_port(orig).clip;
+ }
/* spline may be interior to node */
- if(ED_tail_port(orig).clip && ND_shape(tn) && ND_shape(tn)->fns->insidefn) {
+ if(clipTail && ND_shape(tn) && ND_shape(tn)->fns->insidefn) {
inside_context.s.n = tn;
inside_context.s.bp = ED_tail_port(orig).bp;
for (start = 0; start < pn - 4; start += 3) {
shape_clip0(&inside_context, tn, &ps[start], TRUE);
} else
start = 0;
- if(ED_head_port(orig).clip && ND_shape(hn) && ND_shape(hn)->fns->insidefn) {
+ if(clipHead && ND_shape(hn) && ND_shape(hn)->fns->insidefn) {
inside_context.s.n = hn;
inside_context.s.bp = ED_head_port(orig).bp;
for (end = pn - 4; end > 0; end -= 3) {