misc/libfreetype/src/autofit/afwarp.h
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
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
/*  afwarp.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
/*    Auto-fitter warping algorithm (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 2006, 2007 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
#ifndef __AFWARP_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __AFWARP_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#include "afhints.h"
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
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#define AF_WARPER_SCALE
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
#define AF_WARPER_FLOOR( x )  ( (x) & ~63 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#define AF_WARPER_CEIL( x )   AF_WARPER_FLOOR( (x) + 63 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  typedef FT_Int32  AF_WarpScore;
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
  typedef struct  AF_WarperRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
    FT_Pos        x1, x2;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
    FT_Pos        t1, t2;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
    FT_Pos        x1min, x1max;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
    FT_Pos        x2min, x2max;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
    FT_Pos        w0, wmin, wmax;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
    FT_Fixed      best_scale;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
    FT_Pos        best_delta;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
    AF_WarpScore  best_score;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
    AF_WarpScore  best_distort;
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
  } AF_WarperRec, *AF_Warper;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  FT_LOCAL( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  af_warper_compute( AF_Warper      warper,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
                     AF_GlyphHints  hints,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
                     AF_Dimension   dim,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
                     FT_Fixed      *a_scale,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
                     FT_Fixed      *a_delta );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
FT_END_HEADER
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
#endif /* __AFWARP_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
/* END */