Bug 110976 - libart's art_render doesn't fill certain paths correctly.

Patch by james.turner@crocodile-clips.com, not part of build.


git-svn-id: svn://10.0.0.236/trunk@108859 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bbaetz%cs.mcgill.ca
2001-11-24 19:50:23 +00:00
parent 9fd9013d30
commit ca87a319db

View File

@@ -105,7 +105,17 @@ art_render_svp_callback (void *callback_data, int y,
run[n_run].alpha = 0x8000;
n_run++;
}
}
} else {
if (running_sum > 0x80ff) {
run[0].x = x0;
run[0].alpha = running_sum;
run[1].x = x1;
run[1].alpha = 0x8000;
n_run = 2;
}
}
render->n_run = n_run;
@@ -172,7 +182,22 @@ art_render_svp_callback_span (void *callback_data, int y,
n_run++;
span_x[n_span++] = x1;
}
}
} else {
if (running_sum > 0x80ff) {
run[0].x = x0;
run[0].alpha = running_sum;
run[1].x = x1;
run[1].alpha = 0x8000;
n_run = 2;
/* fix the spans too */
span_x[0] = x0;
span_x[1] = x1;
n_span = 2;
}
}
render->n_run = n_run;
render->n_span = n_span;
@@ -238,7 +263,18 @@ art_render_svp_callback_opacity (void *callback_data, int y,
run[n_run].alpha = 0x8000;
n_run++;
}
}
} else {
alpha = (running_sum >> 16) & 0xff;
if (alpha) {
run[0].x = x0;
alpha = ((running_sum >> 8) * opacity + 0x80080) >> 8;
run[0].alpha = alpha;
run[1].x = x1;
run[1].alpha = 0x8000;
n_run = 2;
}
}
render->n_run = n_run;
@@ -312,7 +348,23 @@ art_render_svp_callback_opacity_span (void *callback_data, int y,
n_run++;
span_x[n_span++] = x1;
}
}
} else {
alpha = (running_sum >> 16) & 0xff;
if (alpha) {
run[0].x = x0;
alpha = ((running_sum >> 8) * opacity + 0x80080) >> 8;
run[0].alpha = alpha;
run[1].x = x1;
run[1].alpha = 0x8000;
n_run = 2;
/* fix the spans too */
span_x[0] = x0;
span_x[1] = x1;
n_span = 2;
}
}
render->n_run = n_run;
render->n_span = n_span;