00001 /***************************************************************************/ 00002 /* */ 00003 /* ftbbox.h */ 00004 /* */ 00005 /* FreeType exact bbox computation (specification). */ 00006 /* */ 00007 /* Copyright 1996-2001, 2003, 2007 by */ 00008 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 00009 /* */ 00010 /* This file is part of the FreeType project, and may only be used, */ 00011 /* modified, and distributed under the terms of the FreeType project */ 00012 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 00013 /* this file you indicate that you have read the license and */ 00014 /* understand and accept it fully. */ 00015 /* */ 00016 /***************************************************************************/ 00017 00018 00019 /*************************************************************************/ 00020 /* */ 00021 /* This component has a _single_ role: to compute exact outline bounding */ 00022 /* boxes. */ 00023 /* */ 00024 /* It is separated from the rest of the engine for various technical */ 00025 /* reasons. It may well be integrated in `ftoutln' later. */ 00026 /* */ 00027 /*************************************************************************/ 00028 00029 00030 #ifndef __FTBBOX_H__ 00031 #define __FTBBOX_H__ 00032 00033 00034 #include <ft2build.h> 00035 #include FT_FREETYPE_H 00036 00037 #ifdef FREETYPE_H 00038 #error "freetype.h of FreeType 1 has been loaded!" 00039 #error "Please fix the directory search order for header files" 00040 #error "so that freetype.h of FreeType 2 is found first." 00041 #endif 00042 00043 00044 FT_BEGIN_HEADER 00045 00046 00047 /*************************************************************************/ 00048 /* */ 00049 /* <Section> */ 00050 /* outline_processing */ 00051 /* */ 00052 /*************************************************************************/ 00053 00054 00055 /*************************************************************************/ 00056 /* */ 00057 /* <Function> */ 00058 /* FT_Outline_Get_BBox */ 00059 /* */ 00060 /* <Description> */ 00061 /* Compute the exact bounding box of an outline. This is slower */ 00062 /* than computing the control box. However, it uses an advanced */ 00063 /* algorithm which returns _very_ quickly when the two boxes */ 00064 /* coincide. Otherwise, the outline Bézier arcs are traversed to */ 00065 /* extract their extrema. */ 00066 /* */ 00067 /* <Input> */ 00068 /* outline :: A pointer to the source outline. */ 00069 /* */ 00070 /* <Output> */ 00071 /* abbox :: The outline's exact bounding box. */ 00072 /* */ 00073 /* <Return> */ 00074 /* FreeType error code. 0~means success. */ 00075 /* */ 00076 FT_EXPORT( FT_Error ) 00077 FT_Outline_Get_BBox( FT_Outline* outline, 00078 FT_BBox *abbox ); 00079 00080 00081 /* */ 00082 00083 00084 FT_END_HEADER 00085 00086 #endif /* __FTBBOX_H__ */ 00087 00088 00089 /* END */ 00090 00091 00092 /* Local Variables: */ 00093 /* coding: utf-8 */ 00094 /* End: */