/* Step an edge by any amount (including negative values)  */
PIXMAN_EXPORT void pixman_edge_step(pixman_edge_t *e, int n)
/* Step an edge by any amount (including negative values)  */
PIXMAN_EXPORT void pixman_edge_step(pixman_edge_t *e, int n)
{
    pixman_fixed_48_16_t ne;
    e->x += n * e->stepx;
    ne = e->e + n * (pixman_fixed_48_16_t) e->dx;
    if (n >= 0)
    {
	if (ne > 0)
	{
	    int nx = (ne + e->dy - 1) / e->dy;
	    e->e = ne - nx * (pixman_fixed_48_16_t) e->dy;
	    e->x += nx * e->signdx;
	}
    }
    else
    {
	if (ne <= -e->dy)
	{
	    int nx = (-ne) / e->dy;
	    e->e = ne + nx * (pixman_fixed_48_16_t) e->dy;
	    e->x -= nx * e->signdx;
	}
    }
}