blob: 7343fdd5ef5824a8a9a4ef6a9e2c16c04642ad8b [file] [log] [blame]
Werner Lemberg1be9ebf2006-01-22 06:58:16 +00001/***************************************************************************/
2/* */
3/* afwarp.h */
4/* */
5/* Auto-fitter warping algorithm (specification). */
6/* */
Werner Lembergb1be9e82007-01-25 11:50:00 +00007/* Copyright 2006, 2007 by */
Werner Lemberg1be9ebf2006-01-22 06:58:16 +00008/* 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
David Turnerbb4edc92006-01-21 14:31:45 +000019#ifndef __AFWARP_H__
20#define __AFWARP_H__
21
22#include "afhints.h"
23
24FT_BEGIN_HEADER
25
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000026#define AF_WARPER_SCALE
David Turnerbb4edc92006-01-21 14:31:45 +000027
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000028#define AF_WARPER_FLOOR( x ) ( (x) & ~63 )
29#define AF_WARPER_CEIL( x ) AF_WARPER_FLOOR( (x) + 63 )
David Turnerbb4edc92006-01-21 14:31:45 +000030
David Turnerbb4edc92006-01-21 14:31:45 +000031
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000032 typedef FT_Int32 AF_WarpScore;
David Turnerbb4edc92006-01-21 14:31:45 +000033
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000034 typedef struct AF_WarperRec_
35 {
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000036 FT_Pos x1, x2;
37 FT_Pos t1, t2;
38 FT_Pos x1min, x1max;
39 FT_Pos x2min, x2max;
40 FT_Pos w0, wmin, wmax;
David Turnerbb4edc92006-01-21 14:31:45 +000041
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000042 FT_Fixed best_scale;
43 FT_Pos best_delta;
44 AF_WarpScore best_score;
45 AF_WarpScore best_distort;
David Turnerbb4edc92006-01-21 14:31:45 +000046
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000047 } AF_WarperRec, *AF_Warper;
48
49
50 FT_LOCAL( void )
51 af_warper_compute( AF_Warper warper,
52 AF_GlyphHints hints,
53 AF_Dimension dim,
54 FT_Fixed *a_scale,
55 FT_Fixed *a_delta );
56
David Turnerbb4edc92006-01-21 14:31:45 +000057
58FT_END_HEADER
59
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000060
David Turnerbb4edc92006-01-21 14:31:45 +000061#endif /* __AFWARP_H__ */
Werner Lemberg1be9ebf2006-01-22 06:58:16 +000062
63
64/* END */