ngl Fix bottom-right border render failure

The wrong index was used for offsetting the bottom border rect.

Test included.
This commit is contained in:
Benjamin Otte 2021-09-16 02:28:56 +02:00
parent 7cf5e5546b
commit 62954a0338
4 changed files with 7 additions and 1 deletions

View File

@ -1734,7 +1734,7 @@ gsk_ngl_render_job_visit_rect_border_node (GskNglRenderJob *job,
{
rgba_to_half (&colors[2], color);
gsk_ngl_render_job_draw_rect_with_color (job,
&GRAPHENE_RECT_INIT (origin->x + widths[3], origin->y + size->height - widths[2], size->width - widths[1], widths[2]),
&GRAPHENE_RECT_INIT (origin->x + widths[3], origin->y + size->height - widths[2], size->width - widths[3], widths[2]),
color);
}

View File

@ -0,0 +1,5 @@
border {
colors: red;
outline: 0 0 20 20;
widths: 0 10 10 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

View File

@ -23,6 +23,7 @@ compare_render_tests = [
'blend-difference',
'blend-invisible-child',
'blend-normal',
'border-bottom-right',
'borders-rotated',
'borders-scaled',
'clip-coordinates-2d',