refix: orig_points must be saved before any adjustment

This commit is contained in:
Michiharu Ariza 2019-04-02 13:10:36 -07:00
parent ee58f6012e
commit 8801b80d72
1 changed files with 6 additions and 5 deletions

View File

@ -596,6 +596,12 @@ struct gvar
&iterator)) &iterator))
return false; return false;
/* Save original points for inferred delta calculation */
contour_point_vector_t orig_points;
orig_points.resize (points.length);
for (unsigned int i = 0; i < orig_points.length; i++)
orig_points[i] = points[i];
contour_point_vector_t deltas; /* flag is used to indicate referenced point */ contour_point_vector_t deltas; /* flag is used to indicate referenced point */
deltas.resize (points.length); deltas.resize (points.length);
@ -636,11 +642,6 @@ struct gvar
} }
/* infer deltas for unreferenced points */ /* infer deltas for unreferenced points */
contour_point_vector_t orig_points;
orig_points.resize (points.length);
for (unsigned int i = 0; i < orig_points.length; i++)
orig_points[i] = points[i];
unsigned int start_point = 0; unsigned int start_point = 0;
for (unsigned int c = 0; c < end_points.length; c++) for (unsigned int c = 0; c < end_points.length; c++)
{ {