third_party/cairo/src/cairo-bentley-ottmann-rectilinear.c
static inline cairo_status_t
_cairo_bo_edge_start_or_continue_trap (cairo_bo_edge_t	*left,
				       cairo_bo_edge_t  *right,
				       int               top,
				       cairo_bool_t	 do_traps,
				       void		*container)
{
    cairo_status_t status;

    if (left->deferred_trap.right == right)
	return CAIRO_STATUS_SUCCESS;

    if (left->deferred_trap.right != NULL) {
	if (right != NULL && edges_collinear (left->deferred_trap.right, right))
	{
	    /* continuation on right, so just swap edges */
	    left->deferred_trap.right = right;
	    return CAIRO_STATUS_SUCCESS;
	}

	status = _cairo_bo_edge_end_trap (left, top, do_traps, container);
	if (unlikely (status))
	    return status;
    }

    if (right != NULL && ! edges_collinear (left, right)) {
	left->deferred_trap.top = top;
	left->deferred_trap.right = right;
    }

    return CAIRO_STATUS_SUCCESS;
}
/* Start a new trapezoid at the given top y coordinate, whose edges
 * are `edge' and `edge->next'. If `edge' already has a trapezoid,
 * then either add it to the traps in `traps', if the trapezoid's
 * right edge differs from `edge->next', or do nothing if the new
 * trapezoid would be a continuation of the existing one. */
Start a new trapezoid at the given top y coordinate, whose edges
are `edge' and `edge->next'. If `edge' already has a trapezoid,
then either add it to the traps in `traps', if the trapezoid's
right edge differs from `edge->next', or do nothing if the new
trapezoid would be a continuation of the existing one.
Start a new trapezoid at the given top y coordinate whose edges are ` edge ' and ` edge - > next ' . If ` edge ' already has a trapezoid then either add it to the traps in ` traps ' if the trapezoid ' s right edge differs from ` edge - > next ' or do nothing if the new trapezoid would be a continuation of the existing one .
static inline cairo_status_t
_cairo_bo_edge_start_or_continue_trap (cairo_bo_edge_t	*left,
				       cairo_bo_edge_t  *right,
				       int               top,
				       cairo_bool_t	 do_traps,
				       void		*container)
{
    cairo_status_t status;
    if (left->deferred_trap.right == right)
	return CAIRO_STATUS_SUCCESS;
    if (left->deferred_trap.right != NULL) {
	if (right != NULL && edges_collinear (left->deferred_trap.right, right))
	{
	    left->deferred_trap.right = right;
	    return CAIRO_STATUS_SUCCESS;
	}
	status = _cairo_bo_edge_end_trap (left, top, do_traps, container);
	if (unlikely (status))
	    return status;
    }
    if (right != NULL && ! edges_collinear (left, right)) {
	left->deferred_trap.top = top;
	left->deferred_trap.right = right;
    }
    return CAIRO_STATUS_SUCCESS;
}
static inline cairo_status_t _cairo_bo_edge_start_or_continue_trap ( cairo_bo_edge_t * left , cairo_bo_edge_t * right , int top , cairo_bool_t do_traps , void * container ) { cairo_status_t status ; if ( left -> deferred_trap . right == right ) return CAIRO_STATUS_SUCCESS ; if ( left -> deferred_trap . right != NULL ) { if ( right != NULL && edges_collinear ( left -> deferred_trap . right , right ) ) { left -> deferred_trap . right = right ; return CAIRO_STATUS_SUCCESS ; } status = _cairo_bo_edge_end_trap ( left , top , do_traps , container ) ; if ( unlikely ( status ) ) return status ; } if ( right != NULL && ! edges_collinear ( left , right ) ) { left -> deferred_trap . top = top ; left -> deferred_trap . right = right ; } return CAIRO_STATUS_SUCCESS ; }
Start a new trapezoid at the given top y coordinate, whose edges
 are `edge' and `edge->next'.
Start a new trapezoid at the given top y coordinate whose edges are ` edge ' and ` edge - > next ' .
/* continuation on right, so just swap edges */