| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftbbox.h */ | 3 /* ftbbox.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* FreeType exact bbox computation (specification). */ | 5 /* FreeType exact bbox computation (specification). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 1996-2001, 2003, 2007, 2011 by */ | 7 /* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| 18 | 18 |
| 19 /*************************************************************************/ | 19 /*************************************************************************/ |
| 20 /* */ | 20 /* */ |
| 21 /* This component has a _single_ role: to compute exact outline bounding */ | 21 /* This component has a _single_ role: to compute exact outline bounding */ |
| 22 /* boxes. */ | 22 /* boxes. */ |
| 23 /* */ | 23 /* */ |
| 24 /* It is separated from the rest of the engine for various technical */ | 24 /* It is separated from the rest of the engine for various technical */ |
| 25 /* reasons. It may well be integrated in `ftoutln' later. */ | 25 /* reasons. It may well be integrated in `ftoutln' later. */ |
| 26 /* */ | 26 /* */ |
| 27 /*************************************************************************/ | 27 /*************************************************************************/ |
| 28 | 28 |
| 29 | 29 |
| 30 #ifndef __FTBBOX_H__ | 30 #ifndef __FTBBOX_H__ |
| 31 #define __FTBBOX_H__ | 31 #define __FTBBOX_H__ |
| 32 | 32 |
| 33 | 33 |
| 34 #include "../ft2build.h" | 34 #include <ft2build.h> |
| 35 #include "freetype.h" | 35 #include FT_FREETYPE_H |
| 36 | 36 |
| 37 #ifdef FREETYPE_H | 37 #ifdef FREETYPE_H |
| 38 #error "freetype.h of FreeType 1 has been loaded!" | 38 #error "freetype.h of FreeType 1 has been loaded!" |
| 39 #error "Please fix the directory search order for header files" | 39 #error "Please fix the directory search order for header files" |
| 40 #error "so that freetype.h of FreeType 2 is found first." | 40 #error "so that freetype.h of FreeType 2 is found first." |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 | 43 |
| 44 FT_BEGIN_HEADER | 44 FT_BEGIN_HEADER |
| 45 | 45 |
| 46 | 46 |
| 47 /*************************************************************************/ | 47 /*************************************************************************/ |
| 48 /* */ | 48 /* */ |
| 49 /* <Section> */ | 49 /* <Section> */ |
| 50 /* outline_processing */ | 50 /* outline_processing */ |
| 51 /* */ | 51 /* */ |
| 52 /*************************************************************************/ | 52 /*************************************************************************/ |
| 53 | 53 |
| 54 | 54 |
| 55 /*************************************************************************/ | 55 /*************************************************************************/ |
| 56 /* */ | 56 /* */ |
| 57 /* <Function> */ | 57 /* <Function> */ |
| 58 /* FT_Outline_Get_BBox */ | 58 /* FT_Outline_Get_BBox */ |
| 59 /* */ | 59 /* */ |
| 60 /* <Description> */ | 60 /* <Description> */ |
| 61 /* Compute the exact bounding box of an outline. This is slower */ | 61 /* Compute the exact bounding box of an outline. This is slower */ |
| 62 /* than computing the control box. However, it uses an advanced */ | 62 /* than computing the control box. However, it uses an advanced */ |
| 63 /* algorithm which returns _very_ quickly when the two boxes */ | 63 /* algorithm that returns _very_ quickly when the two boxes */ |
| 64 /* coincide. Otherwise, the outline Bézier arcs are traversed to */ | 64 /* coincide. Otherwise, the outline Bézier arcs are traversed to */ |
| 65 /* extract their extrema. */ | 65 /* extract their extrema. */ |
| 66 /* */ | 66 /* */ |
| 67 /* <Input> */ | 67 /* <Input> */ |
| 68 /* outline :: A pointer to the source outline. */ | 68 /* outline :: A pointer to the source outline. */ |
| 69 /* */ | 69 /* */ |
| 70 /* <Output> */ | 70 /* <Output> */ |
| 71 /* abbox :: The outline's exact bounding box. */ | 71 /* abbox :: The outline's exact bounding box. */ |
| 72 /* */ | 72 /* */ |
| 73 /* <Return> */ | 73 /* <Return> */ |
| 74 /* FreeType error code. 0~means success. */ | 74 /* FreeType error code. 0~means success. */ |
| 75 /* */ | 75 /* */ |
| 76 /* <Note> */ | 76 /* <Note> */ |
| 77 /* If the font is tricky and the glyph has been loaded with */ | 77 /* If the font is tricky and the glyph has been loaded with */ |
| 78 /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ | 78 /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ |
| 79 /* reasonable values for the BBox it is necessary to load the glyph */ | 79 /* reasonable values for the BBox it is necessary to load the glyph */ |
| 80 /* at a large ppem value (so that the hinting instructions can */ | 80 /* at a large ppem value (so that the hinting instructions can */ |
| 81 /* properly shift and scale the subglyphs), then extracting the BBox */ | 81 /* properly shift and scale the subglyphs), then extracting the BBox, */ |
| 82 /* which can be eventually converted back to font units. */ | 82 /* which can be eventually converted back to font units. */ |
| 83 /* */ | 83 /* */ |
| 84 FT_EXPORT( FT_Error ) | 84 FT_EXPORT( FT_Error ) |
| 85 FT_Outline_Get_BBox( FT_Outline* outline, | 85 FT_Outline_Get_BBox( FT_Outline* outline, |
| 86 FT_BBox *abbox ); | 86 FT_BBox *abbox ); |
| 87 | 87 |
| 88 | |
| 89 /* */ | 88 /* */ |
| 90 | 89 |
| 91 | 90 |
| 92 FT_END_HEADER | 91 FT_END_HEADER |
| 93 | 92 |
| 94 #endif /* __FTBBOX_H__ */ | 93 #endif /* __FTBBOX_H__ */ |
| 95 | 94 |
| 96 | 95 |
| 97 /* END */ | 96 /* END */ |
| 98 | 97 |
| 99 | 98 |
| 100 /* Local Variables: */ | 99 /* Local Variables: */ |
| 101 /* coding: utf-8 */ | 100 /* coding: utf-8 */ |
| 102 /* End: */ | 101 /* End: */ |
| OLD | NEW |