/* Initialize one edge structure given a line, starting y value and a pixel offset for the line  */
PIXMAN_EXPORT void pixman_line_fixed_edge_init(pixman_edge_t *e, int n, pixman_fixed_t y, const pixman_line_fixed_t *line, int x_off, int y_off)
/* Initialize one edge structure given a line, starting y value and a pixel offset for the line  */
PIXMAN_EXPORT void pixman_line_fixed_edge_init(pixman_edge_t *e, int n, pixman_fixed_t y, const pixman_line_fixed_t *line, int x_off, int y_off)
{
    pixman_fixed_t x_off_fixed = pixman_int_to_fixed (x_off);
    pixman_fixed_t y_off_fixed = pixman_int_to_fixed (y_off);
    const pixman_point_fixed_t *top, *bot;
    if (line->p1.y <= line->p2.y)
    {
	top = &line->p1;
	bot = &line->p2;
    }
    else
    {
	top = &line->p2;
	bot = &line->p1;
    }
    pixman_edge_init (e, n, y,
                      top->x + x_off_fixed,
                      top->y + y_off_fixed,
                      bot->x + x_off_fixed,
                      bot->y + y_off_fixed);
}