diff --git a/ChangeLog b/ChangeLog index 85c5d8583..f7f4b0f84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-10-11 Alexei Podtelezhnikov + + [base] Small bbox correction. + + * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox + instead of initial point that could be `off' in conic outlines. + 2014-10-08 Alexei Podtelezhnikov [base] Fix Savannah bug #43356. diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index 91e1e811a..fd3f198be 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -433,8 +433,8 @@ FT_DEFINE_OUTLINE_FUNCS(bbox_interface, FT_Outline_Get_BBox( FT_Outline* outline, FT_BBox *abbox ) { - FT_BBox cbox; - FT_BBox bbox; + FT_BBox cbox = { 0x7FFFFFFF, 0x7FFFFFFF, -0x7FFFFFFF, -0x7FFFFFFF }; + FT_BBox bbox = { 0x7FFFFFFF, 0x7FFFFFFF, -0x7FFFFFFF, -0x7FFFFFFF }; FT_Vector* vec; FT_UShort n; @@ -458,11 +458,8 @@ FT_DEFINE_OUTLINE_FUNCS(bbox_interface, /* coincide, we exit immediately. */ vec = outline->points; - bbox.xMin = bbox.xMax = cbox.xMin = cbox.xMax = vec->x; - bbox.yMin = bbox.yMax = cbox.yMin = cbox.yMax = vec->y; - vec++; - for ( n = 1; n < outline->n_points; n++ ) + for ( n = 0; n < outline->n_points; n++ ) { FT_UPDATE_BBOX( vec, cbox);