michael@0: /***************************************************************************/ michael@0: /* */ michael@0: /* ftbbox.h */ michael@0: /* */ michael@0: /* FreeType exact bbox computation (specification). */ michael@0: /* */ michael@0: /* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */ michael@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ michael@0: /* */ michael@0: /* This file is part of the FreeType project, and may only be used, */ michael@0: /* modified, and distributed under the terms of the FreeType project */ michael@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ michael@0: /* this file you indicate that you have read the license and */ michael@0: /* understand and accept it fully. */ michael@0: /* */ michael@0: /***************************************************************************/ michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* This component has a _single_ role: to compute exact outline bounding */ michael@0: /* boxes. */ michael@0: /* */ michael@0: /* It is separated from the rest of the engine for various technical */ michael@0: /* reasons. It may well be integrated in `ftoutln' later. */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: #ifndef __FTBBOX_H__ michael@0: #define __FTBBOX_H__ michael@0: michael@0: michael@0: #include michael@0: #include FT_FREETYPE_H michael@0: michael@0: #ifdef FREETYPE_H michael@0: #error "freetype.h of FreeType 1 has been loaded!" michael@0: #error "Please fix the directory search order for header files" michael@0: #error "so that freetype.h of FreeType 2 is found first." michael@0: #endif michael@0: michael@0: michael@0: FT_BEGIN_HEADER michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /*
*/ michael@0: /* outline_processing */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* */ michael@0: /* FT_Outline_Get_BBox */ michael@0: /* */ michael@0: /* */ michael@0: /* Compute the exact bounding box of an outline. This is slower */ michael@0: /* than computing the control box. However, it uses an advanced */ michael@0: /* algorithm that returns _very_ quickly when the two boxes */ michael@0: /* coincide. Otherwise, the outline Bézier arcs are traversed to */ michael@0: /* extract their extrema. */ michael@0: /* */ michael@0: /* */ michael@0: /* outline :: A pointer to the source outline. */ michael@0: /* */ michael@0: /* */ michael@0: /* abbox :: The outline's exact bounding box. */ michael@0: /* */ michael@0: /* */ michael@0: /* FreeType error code. 0~means success. */ michael@0: /* */ michael@0: /* */ michael@0: /* If the font is tricky and the glyph has been loaded with */ michael@0: /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ michael@0: /* reasonable values for the BBox it is necessary to load the glyph */ michael@0: /* at a large ppem value (so that the hinting instructions can */ michael@0: /* properly shift and scale the subglyphs), then extracting the BBox, */ michael@0: /* which can be eventually converted back to font units. */ michael@0: /* */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Outline_Get_BBox( FT_Outline* outline, michael@0: FT_BBox *abbox ); michael@0: michael@0: michael@0: /* */ michael@0: michael@0: michael@0: FT_END_HEADER michael@0: michael@0: #endif /* __FTBBOX_H__ */ michael@0: michael@0: michael@0: /* END */ michael@0: michael@0: michael@0: /* Local Variables: */ michael@0: /* coding: utf-8 */ michael@0: /* End: */