1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/freetype2/include/ftbbox.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,102 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* ftbbox.h */ 1.7 +/* */ 1.8 +/* FreeType exact bbox computation (specification). */ 1.9 +/* */ 1.10 +/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */ 1.11 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.12 +/* */ 1.13 +/* This file is part of the FreeType project, and may only be used, */ 1.14 +/* modified, and distributed under the terms of the FreeType project */ 1.15 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.16 +/* this file you indicate that you have read the license and */ 1.17 +/* understand and accept it fully. */ 1.18 +/* */ 1.19 +/***************************************************************************/ 1.20 + 1.21 + 1.22 + /*************************************************************************/ 1.23 + /* */ 1.24 + /* This component has a _single_ role: to compute exact outline bounding */ 1.25 + /* boxes. */ 1.26 + /* */ 1.27 + /* It is separated from the rest of the engine for various technical */ 1.28 + /* reasons. It may well be integrated in `ftoutln' later. */ 1.29 + /* */ 1.30 + /*************************************************************************/ 1.31 + 1.32 + 1.33 +#ifndef __FTBBOX_H__ 1.34 +#define __FTBBOX_H__ 1.35 + 1.36 + 1.37 +#include <ft2build.h> 1.38 +#include FT_FREETYPE_H 1.39 + 1.40 +#ifdef FREETYPE_H 1.41 +#error "freetype.h of FreeType 1 has been loaded!" 1.42 +#error "Please fix the directory search order for header files" 1.43 +#error "so that freetype.h of FreeType 2 is found first." 1.44 +#endif 1.45 + 1.46 + 1.47 +FT_BEGIN_HEADER 1.48 + 1.49 + 1.50 + /*************************************************************************/ 1.51 + /* */ 1.52 + /* <Section> */ 1.53 + /* outline_processing */ 1.54 + /* */ 1.55 + /*************************************************************************/ 1.56 + 1.57 + 1.58 + /*************************************************************************/ 1.59 + /* */ 1.60 + /* <Function> */ 1.61 + /* FT_Outline_Get_BBox */ 1.62 + /* */ 1.63 + /* <Description> */ 1.64 + /* Compute the exact bounding box of an outline. This is slower */ 1.65 + /* than computing the control box. However, it uses an advanced */ 1.66 + /* algorithm that returns _very_ quickly when the two boxes */ 1.67 + /* coincide. Otherwise, the outline Bézier arcs are traversed to */ 1.68 + /* extract their extrema. */ 1.69 + /* */ 1.70 + /* <Input> */ 1.71 + /* outline :: A pointer to the source outline. */ 1.72 + /* */ 1.73 + /* <Output> */ 1.74 + /* abbox :: The outline's exact bounding box. */ 1.75 + /* */ 1.76 + /* <Return> */ 1.77 + /* FreeType error code. 0~means success. */ 1.78 + /* */ 1.79 + /* <Note> */ 1.80 + /* If the font is tricky and the glyph has been loaded with */ 1.81 + /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ 1.82 + /* reasonable values for the BBox it is necessary to load the glyph */ 1.83 + /* at a large ppem value (so that the hinting instructions can */ 1.84 + /* properly shift and scale the subglyphs), then extracting the BBox, */ 1.85 + /* which can be eventually converted back to font units. */ 1.86 + /* */ 1.87 + FT_EXPORT( FT_Error ) 1.88 + FT_Outline_Get_BBox( FT_Outline* outline, 1.89 + FT_BBox *abbox ); 1.90 + 1.91 + 1.92 + /* */ 1.93 + 1.94 + 1.95 +FT_END_HEADER 1.96 + 1.97 +#endif /* __FTBBOX_H__ */ 1.98 + 1.99 + 1.100 +/* END */ 1.101 + 1.102 + 1.103 +/* Local Variables: */ 1.104 +/* coding: utf-8 */ 1.105 +/* End: */