Use correct x coordinate for final span on a row, and place the last entry of clip_index correctly.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14496 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2002-09-20 16:38:39 +00:00
parent 22002b701b
commit 3f71ce768e
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2002-09-20 18:36 Alexander Malmberg <alexander@malmberg.org>
* Source/art/path.m (clip_svp_callback): Use correct x coordinate
for final span.
(-_clip_add_svp:): Place the last entry at the correct place
in clip_index.
2002-09-20 18:05 Alexander Malmberg <alexander@malmberg.org>
* Source/art/path.m (clip_svp_callback, -_clip_add_svp:): Update

View file

@ -693,8 +693,9 @@ static void clip_svp_callback(void *data, int y, int start,
ci->span_size += 16;
ci->span = realloc(ci->span, sizeof(unsigned int) * ci->span_size);
}
ci->span[ci->num_span++] = ci->x1;
if (ci->x1 > ci->maxx) ci->maxx = ci->x1;
x = ci->x1 - ci->x0;
ci->span[ci->num_span++] = x;
if (x > ci->maxx) ci->maxx = x;
}
}
@ -732,7 +733,7 @@ static void clip_svp_callback(void *data, int y, int start,
art_svp_render_aa(svp, clip_x0, clip_y0, clip_x1, clip_y1, clip_svp_callback, &ci);
clip_span = ci.span;
clip_index = ci.index;
clip_index[clip_sy] = clip_num_span = ci.num_span;
clip_index[clip_sy - ci.first_y] = clip_num_span = ci.num_span;
clip_y1 = clip_y0 + ci.last_y;
clip_y0 += ci.first_y;