mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
contour: Skip the move
When jumping between segments, we always need to skip index 0, since thats the move. This fixes the tangent checks in the rectangle tests.
This commit is contained in:
parent
6220baf230
commit
b7544636d4
@ -512,7 +512,7 @@ gsk_standard_contour_get_tangent (const GskContour *contour,
|
|||||||
if (t == 0 && direction == GSK_PATH_START)
|
if (t == 0 && direction == GSK_PATH_START)
|
||||||
{
|
{
|
||||||
/* Look at the previous segment */
|
/* Look at the previous segment */
|
||||||
if (idx > 0)
|
if (idx > 1)
|
||||||
{
|
{
|
||||||
idx--;
|
idx--;
|
||||||
t = 1;
|
t = 1;
|
||||||
@ -533,7 +533,7 @@ gsk_standard_contour_get_tangent (const GskContour *contour,
|
|||||||
}
|
}
|
||||||
else if (self->flags & GSK_PATH_CLOSED)
|
else if (self->flags & GSK_PATH_CLOSED)
|
||||||
{
|
{
|
||||||
idx = 0;
|
idx = 1;
|
||||||
t = 0;
|
t = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user