OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* afwarp.c */ | 3 /* afwarp.c */ |
4 /* */ | 4 /* */ |
5 /* Auto-fitter warping algorithm (body). */ | 5 /* Auto-fitter warping algorithm (body). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2006, 2007, 2011 by */ | 7 /* Copyright 2006, 2007, 2011 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 new_delta = xx1 - FT_MulFix( X1, new_scale ); | 345 new_delta = xx1 - FT_MulFix( X1, new_scale ); |
346 | 346 |
347 af_warper_compute_line_best( warper, new_scale, new_delta, xx1, xx2, | 347 af_warper_compute_line_best( warper, new_scale, new_delta, xx1, xx2, |
348 base_distort, | 348 base_distort, |
349 segments, num_segments ); | 349 segments, num_segments ); |
350 } | 350 } |
351 | 351 |
352 { | 352 { |
353 FT_Fixed best_scale = warper->best_scale; | 353 FT_Fixed best_scale = warper->best_scale; |
354 FT_Pos best_delta = warper->best_delta; | 354 FT_Pos best_delta = warper->best_delta; |
355 | 355 |
356 | 356 |
357 hints->xmin_delta = FT_MulFix( X1, best_scale - org_scale ) | 357 hints->xmin_delta = FT_MulFix( X1, best_scale - org_scale ) |
358 + best_delta; | 358 + best_delta; |
359 hints->xmax_delta = FT_MulFix( X2, best_scale - org_scale ) | 359 hints->xmax_delta = FT_MulFix( X2, best_scale - org_scale ) |
360 + best_delta; | 360 + best_delta; |
361 | 361 |
362 *a_scale = best_scale; | 362 *a_scale = best_scale; |
363 *a_delta = best_delta; | 363 *a_delta = best_delta; |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 #else /* !AF_CONFIG_OPTION_USE_WARPER */ | 367 #else /* !AF_CONFIG_OPTION_USE_WARPER */ |
368 | 368 |
369 /* ANSI C doesn't like empty source files */ | 369 /* ANSI C doesn't like empty source files */ |
370 typedef int _af_warp_dummy; | 370 typedef int _af_warp_dummy; |
371 | 371 |
372 #endif /* !AF_CONFIG_OPTION_USE_WARPER */ | 372 #endif /* !AF_CONFIG_OPTION_USE_WARPER */ |
373 | 373 |
374 /* END */ | 374 /* END */ |
OLD | NEW |