app/core: do not offset cairo_path_data_t's headers

Stroking a rectangular selection doesn't work, for example.
This commit is contained in:
Massimo Valentini 2011-07-19 13:00:07 +02:00
parent fef951ef2e
commit d697c0bdb9
1 changed files with 7 additions and 6 deletions

View File

@ -168,15 +168,16 @@ gimp_bezier_desc_translate (GimpBezierDesc *desc,
gdouble offset_x,
gdouble offset_y)
{
gint i;
gint i, j;
g_return_if_fail (desc != NULL);
for (i = 0; i < desc->num_data; i++)
{
desc->data[i].point.x += offset_x;
desc->data[i].point.y += offset_y;
}
for (i = 0; i < desc->num_data; i += desc->data[i].header.length)
for (j = 1; j < desc->data[i].header.length; ++j)
{
desc->data[i+j].point.x += offset_x;
desc->data[i+j].point.y += offset_y;
}
}
GimpBezierDesc *