ftbbox.h 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /***************************************************************************/
  2. /* */
  3. /* ftbbox.h */
  4. /* */
  5. /* FreeType exact bbox computation (specification). */
  6. /* */
  7. /* Copyright 1996-2001 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. FT_BEGIN_HEADER
  31. /*************************************************************************/
  32. /* */
  33. /* <Section> */
  34. /* outline_processing */
  35. /* */
  36. /*************************************************************************/
  37. /*************************************************************************/
  38. /* */
  39. /* <Function> */
  40. /* FT_Outline_Get_BBox */
  41. /* */
  42. /* <Description> */
  43. /* Computes the exact bounding box of an outline. This is slower */
  44. /* than computing the control box. However, it uses an advanced */
  45. /* algorithm which returns _very_ quickly when the two boxes */
  46. /* coincide. Otherwise, the outline Bezier arcs are walked over to */
  47. /* extract their extrema. */
  48. /* */
  49. /* <Input> */
  50. /* outline :: A pointer to the source outline. */
  51. /* */
  52. /* <Output> */
  53. /* abbox :: The outline's exact bounding box. */
  54. /* */
  55. /* <Return> */
  56. /* FreeType error code. 0 means success. */
  57. /* */
  58. FT_EXPORT( FT_Error )
  59. FT_Outline_Get_BBox( FT_Outline* outline,
  60. FT_BBox *abbox );
  61. /* */
  62. FT_END_HEADER
  63. #endif /* __FTBBOX_H__ */
  64. /* END */