... |
... |
@@ -441,8 +441,7 @@ |
441
|
441
|
(Bool)( x - FLOOR( x ) >= ras.precision_half )
|
442
|
442
|
|
443
|
443
|
/* Smart dropout rounding to find which pixel is closer to span ends. */
|
444
|
|
- /* To mimick Windows, symmetric cases break down indepenently of the */
|
445
|
|
- /* precision. */
|
|
444
|
+ /* To mimic Windows, symmetric cases do not depend on the precision. */
|
446
|
445
|
#define SMART( p, q ) FLOOR( ( (p) + (q) + ras.precision * 63 / 64 ) >> 1 )
|
447
|
446
|
|
448
|
447
|
#if FT_RENDER_POOL_SIZE > 2048
|
... |
... |
@@ -586,8 +585,6 @@ |
586
|
585
|
ras.precision_jitter = 2;
|
587
|
586
|
}
|
588
|
587
|
|
589
|
|
- FT_TRACE6(( "Set_High_Precision(%s)\n", High ? "true" : "false" ));
|
590
|
|
-
|
591
|
588
|
ras.precision = 1 << ras.precision_bits;
|
592
|
589
|
ras.precision_half = ras.precision >> 1;
|
593
|
590
|
ras.precision_scale = ras.precision >> Pixel_Bits;
|
... |
... |
@@ -716,7 +713,7 @@ |
716
|
713
|
ras.cProfile->flags |= Overshoot_Bottom;
|
717
|
714
|
}
|
718
|
715
|
|
719
|
|
- /* premature, the last profile in the controur must loop */
|
|
716
|
+ /* premature, the last profile in the contour must loop */
|
720
|
717
|
ras.cProfile->next = (PProfile)ras.top;
|
721
|
718
|
|
722
|
719
|
ras.num_Profs++;
|
... |
... |
@@ -2198,12 +2195,10 @@ |
2198
|
2195
|
FT_UNUSED( right );
|
2199
|
2196
|
|
2200
|
2197
|
|
2201
|
|
- /* in high-precision mode, we need 12 digits after the comma to */
|
2202
|
|
- /* represent multiples of 1/(1<<12) = 1/4096 */
|
2203
|
|
- FT_TRACE7(( " y=%d x=[% .12f;% .12f]",
|
|
2198
|
+ FT_TRACE7(( " y=%d x=[% .*f;% .*f]",
|
2204
|
2199
|
y,
|
2205
|
|
- (double)x1 / (double)ras.precision,
|
2206
|
|
- (double)x2 / (double)ras.precision ));
|
|
2200
|
+ ras.precision_bits, (double)x1 / (double)ras.precision,
|
|
2201
|
+ ras.precision_bits, (double)x2 / (double)ras.precision ));
|
2207
|
2202
|
|
2208
|
2203
|
/* Drop-out control */
|
2209
|
2204
|
|
... |
... |
@@ -2275,10 +2270,10 @@ |
2275
|
2270
|
Short c1, f1;
|
2276
|
2271
|
|
2277
|
2272
|
|
2278
|
|
- FT_TRACE7(( " y=%d x=[% .12f;% .12f]",
|
|
2273
|
+ FT_TRACE7(( " y=%d x=[% .*f;% .*f]",
|
2279
|
2274
|
y,
|
2280
|
|
- (double)x1 / (double)ras.precision,
|
2281
|
|
- (double)x2 / (double)ras.precision ));
|
|
2275
|
+ ras.precision_bits, (double)x1 / (double)ras.precision,
|
|
2276
|
+ ras.precision_bits, (double)x2 / (double)ras.precision ));
|
2282
|
2277
|
|
2283
|
2278
|
/* Drop-out control */
|
2284
|
2279
|
|
... |
... |
@@ -2458,10 +2453,10 @@ |
2458
|
2453
|
FT_UNUSED( right );
|
2459
|
2454
|
|
2460
|
2455
|
|
2461
|
|
- FT_TRACE7(( " x=%d y=[% .12f;% .12f]",
|
|
2456
|
+ FT_TRACE7(( " x=%d y=[% .*f;% .*f]",
|
2462
|
2457
|
y,
|
2463
|
|
- (double)x1 / (double)ras.precision,
|
2464
|
|
- (double)x2 / (double)ras.precision ));
|
|
2458
|
+ ras.precision_bits, (double)x1 / (double)ras.precision,
|
|
2459
|
+ ras.precision_bits, (double)x2 / (double)ras.precision ));
|
2465
|
2460
|
|
2466
|
2461
|
/* We should not need this procedure but the vertical sweep */
|
2467
|
2462
|
/* mishandles horizontal lines through pixel centers. So we */
|
... |
... |
@@ -2529,10 +2524,10 @@ |
2529
|
2524
|
Byte f1;
|
2530
|
2525
|
|
2531
|
2526
|
|
2532
|
|
- FT_TRACE7(( " x=%d y=[% .12f;% .12f]",
|
|
2527
|
+ FT_TRACE7(( " x=%d y=[% .*f;% .*f]",
|
2533
|
2528
|
y,
|
2534
|
|
- (double)x1 / (double)ras.precision,
|
2535
|
|
- (double)x2 / (double)ras.precision ));
|
|
2529
|
+ ras.precision_bits, (double)x1 / (double)ras.precision,
|
|
2530
|
+ ras.precision_bits, (double)x2 / (double)ras.precision ));
|
2536
|
2531
|
|
2537
|
2532
|
/* During the horizontal sweep, we only take care of drop-outs */
|
2538
|
2533
|
|
... |
... |
@@ -3004,6 +2999,10 @@ |
3004
|
2999
|
Int band_stack[32]; /* enough to bisect 32-bit int bands */
|
3005
|
3000
|
|
3006
|
3001
|
|
|
3002
|
+ FT_TRACE6(( "%s pass [%d..%d]\n",
|
|
3003
|
+ flipped ? "Horizontal" : "Vertical",
|
|
3004
|
+ y_min, y_max ));
|
|
3005
|
+
|
3007
|
3006
|
while ( 1 )
|
3008
|
3007
|
{
|
3009
|
3008
|
ras.minY = (Long)y_min * ras.precision;
|
... |
... |
@@ -3084,9 +3083,10 @@ |
3084
|
3083
|
ras.dropOutControl += 1;
|
3085
|
3084
|
}
|
3086
|
3085
|
|
3087
|
|
- /* Vertical Sweep */
|
3088
|
|
- FT_TRACE6(( "Vertical pass (ftraster)\n" ));
|
|
3086
|
+ FT_TRACE6(( "BW Raster: precision 1/%d, dropout mode %d\n",
|
|
3087
|
+ ras.precision, ras.dropOutControl ));
|
3089
|
3088
|
|
|
3089
|
+ /* Vertical Sweep */
|
3090
|
3090
|
ras.Proc_Sweep_Init = Vertical_Sweep_Init;
|
3091
|
3091
|
ras.Proc_Sweep_Span = Vertical_Sweep_Span;
|
3092
|
3092
|
ras.Proc_Sweep_Drop = Vertical_Sweep_Drop;
|
... |
... |
@@ -3105,8 +3105,6 @@ |
3105
|
3105
|
/* Horizontal Sweep */
|
3106
|
3106
|
if ( !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS ) )
|
3107
|
3107
|
{
|
3108
|
|
- FT_TRACE6(( "Horizontal pass (ftraster)\n" ));
|
3109
|
|
-
|
3110
|
3108
|
ras.Proc_Sweep_Init = Horizontal_Sweep_Init;
|
3111
|
3109
|
ras.Proc_Sweep_Span = Horizontal_Sweep_Span;
|
3112
|
3110
|
ras.Proc_Sweep_Drop = Horizontal_Sweep_Drop;
|