diff options
Diffstat (limited to 'src/base/ftbbox.c')
-rw-r--r-- | src/base/ftbbox.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index 532ab13..2de592d 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -4,7 +4,7 @@ /* */ /* FreeType bbox computation (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2006 by */ +/* Copyright 1996-2001, 2002, 2004, 2006, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ @@ -29,6 +29,7 @@ #include FT_IMAGE_H #include FT_OUTLINE_H #include FT_INTERNAL_CALC_H +#include FT_INTERNAL_OBJECTS_H typedef struct TBBox_Rec_ @@ -139,7 +140,7 @@ /* */ /* <Description> */ /* This function is used as a `conic_to' emitter during */ - /* FT_Raster_Decompose(). It checks a conic Bezier curve with the */ + /* FT_Outline_Decompose(). It checks a conic Bezier curve with the */ /* current bounding box, and computes its extrema if necessary to */ /* update it. */ /* */ @@ -506,7 +507,7 @@ /* */ /* <Description> */ /* This function is used as a `cubic_to' emitter during */ - /* FT_Raster_Decompose(). It checks a cubic Bezier curve with the */ + /* FT_Outline_Decompose(). It checks a cubic Bezier curve with the */ /* current bounding box, and computes its extrema if necessary to */ /* update it. */ /* */ @@ -559,6 +560,13 @@ return 0; } +FT_DEFINE_OUTLINE_FUNCS(bbox_interface, + (FT_Outline_MoveTo_Func) BBox_Move_To, + (FT_Outline_LineTo_Func) BBox_Move_To, + (FT_Outline_ConicTo_Func)BBox_Conic_To, + (FT_Outline_CubicTo_Func)BBox_Cubic_To, + 0, 0 + ) /* documentation is in ftbbox.h */ @@ -628,18 +636,13 @@ /* the two boxes are different, now walk over the outline to */ /* get the Bezier arc extrema. */ - static const FT_Outline_Funcs bbox_interface = - { - (FT_Outline_MoveTo_Func) BBox_Move_To, - (FT_Outline_LineTo_Func) BBox_Move_To, - (FT_Outline_ConicTo_Func)BBox_Conic_To, - (FT_Outline_CubicTo_Func)BBox_Cubic_To, - 0, 0 - }; - FT_Error error; TBBox_Rec user; +#ifdef FT_CONFIG_OPTION_PIC + FT_Outline_Funcs bbox_interface; + Init_Class_bbox_interface(&bbox_interface); +#endif user.bbox = bbox; |