From 6e4aeb9ff03aef0f1cdabb1e5ee3d4d01ce1f6ee Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 20 Sep 2002 16:38:39 +0000 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ Source/art/path.m | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e32484..a2792ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-09-20 18:36 Alexander Malmberg + + * 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 * Source/art/path.m (clip_svp_callback, -_clip_add_svp:): Update diff --git a/Source/art/path.m b/Source/art/path.m index b4e6e29..0bb4b8f 100644 --- a/Source/art/path.m +++ b/Source/art/path.m @@ -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;