ftbbox.h
上传用户:yisoukefu
上传日期:2020-08-09
资源大小:39506k
文件大小:5k
源码类别:

其他游戏

开发平台:

Visual C++

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /*  ftbbox.h                                                               */
  4. /*                                                                         */
  5. /*    FreeType exact bbox computation (specification).                     */
  6. /*                                                                         */
  7. /*  Copyright 1996-2001, 2003 by                                           */
  8. /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
  9. /*                                                                         */
  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      */
  12. /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
  13. /*  this file you indicate that you have read the license and              */
  14. /*  understand and accept it fully.                                        */
  15. /*                                                                         */
  16. /***************************************************************************/
  17.   /*************************************************************************/
  18.   /*                                                                       */
  19.   /* This component has a _single_ role: to compute exact outline bounding */
  20.   /* boxes.                                                                */
  21.   /*                                                                       */
  22.   /* It is separated from the rest of the engine for various technical     */
  23.   /* reasons.  It may well be integrated in `ftoutln' later.               */
  24.   /*                                                                       */
  25.   /*************************************************************************/
  26. #ifndef __FTBBOX_H__
  27. #define __FTBBOX_H__
  28. #include <ft2build.h>
  29. #include FT_FREETYPE_H
  30. #ifdef FREETYPE_H
  31. #error "freetype.h of FreeType 1 has been loaded!"
  32. #error "Please fix the directory search order for header files"
  33. #error "so that freetype.h of FreeType 2 is found first."
  34. #endif
  35. FT_BEGIN_HEADER
  36.   /*************************************************************************/
  37.   /*                                                                       */
  38.   /* <Section>                                                             */
  39.   /*    outline_processing                                                 */
  40.   /*                                                                       */
  41.   /*************************************************************************/
  42.   /*************************************************************************/
  43.   /*                                                                       */
  44.   /* <Function>                                                            */
  45.   /*    FT_Outline_Get_BBox                                                */
  46.   /*                                                                       */
  47.   /* <Description>                                                         */
  48.   /*    Computes the exact bounding box of an outline.  This is slower     */
  49.   /*    than computing the control box.  However, it uses an advanced      */
  50.   /*    algorithm which returns _very_ quickly when the two boxes          */
  51.   /*    coincide.  Otherwise, the outline Bézier arcs are walked over to   */
  52.   /*    extract their extrema.                                             */
  53.   /*                                                                       */
  54.   /* <Input>                                                               */
  55.   /*    outline :: A pointer to the source outline.                        */
  56.   /*                                                                       */
  57.   /* <Output>                                                              */
  58.   /*    abbox   :: The outline's exact bounding box.                       */
  59.   /*                                                                       */
  60.   /* <Return>                                                              */
  61.   /*    FreeType error code.  0 means success.                             */
  62.   /*                                                                       */
  63.   FT_EXPORT( FT_Error )
  64.   FT_Outline_Get_BBox( FT_Outline*  outline,
  65.                        FT_BBox     *abbox );
  66.   /* */
  67. FT_END_HEADER
  68. #endif /* __FTBBOX_H__ */
  69. /* END */
  70. /* Local Variables: */
  71. /* coding: utf-8    */
  72. /* End:             */