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