... |
... |
@@ -401,9 +401,7 @@ |
401
|
401
|
typedef void
|
402
|
402
|
Function_Sweep_Span( RAS_ARGS Int y,
|
403
|
403
|
FT_F26Dot6 x1,
|
404
|
|
- FT_F26Dot6 x2,
|
405
|
|
- PProfile left,
|
406
|
|
- PProfile right );
|
|
404
|
+ FT_F26Dot6 x2 );
|
407
|
405
|
|
408
|
406
|
typedef void
|
409
|
407
|
Function_Sweep_Step( RAS_ARG );
|
... |
... |
@@ -1989,15 +1987,11 @@ |
1989
|
1987
|
static void
|
1990
|
1988
|
Vertical_Sweep_Span( RAS_ARGS Int y,
|
1991
|
1989
|
FT_F26Dot6 x1,
|
1992
|
|
- FT_F26Dot6 x2,
|
1993
|
|
- PProfile left,
|
1994
|
|
- PProfile right )
|
|
1990
|
+ FT_F26Dot6 x2 )
|
1995
|
1991
|
{
|
1996
|
1992
|
Int e1, e2;
|
1997
|
1993
|
|
1998
|
1994
|
FT_UNUSED( y );
|
1999
|
|
- FT_UNUSED( left );
|
2000
|
|
- FT_UNUSED( right );
|
2001
|
1995
|
|
2002
|
1996
|
|
2003
|
1997
|
FT_TRACE7(( " y=%d x=[% .*f;% .*f]",
|
... |
... |
@@ -2054,156 +2048,38 @@ |
2054
|
2048
|
static void
|
2055
|
2049
|
Vertical_Sweep_Drop( RAS_ARGS Int y,
|
2056
|
2050
|
FT_F26Dot6 x1,
|
2057
|
|
- FT_F26Dot6 x2,
|
2058
|
|
- PProfile left,
|
2059
|
|
- PProfile right )
|
|
2051
|
+ FT_F26Dot6 x2 )
|
2060
|
2052
|
{
|
2061
|
|
- Long e1, e2, pxl;
|
2062
|
|
- Int c1, f1;
|
|
2053
|
+ Int e1 = (Int)TRUNC( x1 );
|
|
2054
|
+ Int e2 = (Int)TRUNC( x2 );
|
|
2055
|
+ Int c1, f1;
|
2063
|
2056
|
|
2064
|
2057
|
FT_UNUSED( y );
|
2065
|
2058
|
|
2066
|
2059
|
|
2067
|
|
- FT_TRACE7(( " y=%d x=[% .*f;% .*f]",
|
2068
|
|
- y,
|
2069
|
|
- ras.precision_bits, (double)x1 / (double)ras.precision,
|
2070
|
|
- ras.precision_bits, (double)x2 / (double)ras.precision ));
|
|
2060
|
+ /* undocumented but confirmed: If the drop-out would result in a */
|
|
2061
|
+ /* pixel outside of the bounding box, use the pixel inside of the */
|
|
2062
|
+ /* bounding box instead */
|
|
2063
|
+ if ( e1 < 0 || e1 > ras.bRight )
|
|
2064
|
+ e1 = e2;
|
2071
|
2065
|
|
2072
|
|
- /* Drop-out control */
|
2073
|
|
-
|
2074
|
|
- /* e2 x2 x1 e1 */
|
2075
|
|
- /* */
|
2076
|
|
- /* ^ | */
|
2077
|
|
- /* | | */
|
2078
|
|
- /* +-------------+---------------------+------------+ */
|
2079
|
|
- /* | | */
|
2080
|
|
- /* | v */
|
2081
|
|
- /* */
|
2082
|
|
- /* pixel contour contour pixel */
|
2083
|
|
- /* center center */
|
2084
|
|
-
|
2085
|
|
- /* drop-out mode scan conversion rules (as defined in OpenType) */
|
2086
|
|
- /* --------------------------------------------------------------- */
|
2087
|
|
- /* 0 1, 2, 3 */
|
2088
|
|
- /* 1 1, 2, 4 */
|
2089
|
|
- /* 2 1, 2 */
|
2090
|
|
- /* 3 same as mode 2 */
|
2091
|
|
- /* 4 1, 2, 5 */
|
2092
|
|
- /* 5 1, 2, 6 */
|
2093
|
|
- /* 6, 7 same as mode 2 */
|
2094
|
|
-
|
2095
|
|
- e1 = CEILING( x1 );
|
2096
|
|
- e2 = FLOOR ( x2 );
|
2097
|
|
- pxl = e1;
|
2098
|
|
-
|
2099
|
|
- if ( e1 > e2 )
|
|
2066
|
+ /* otherwise check that the other pixel isn't set */
|
|
2067
|
+ else if ( e2 >=0 && e2 <= ras.bRight )
|
2100
|
2068
|
{
|
2101
|
|
- Int dropOutControl = left->flags & 7;
|
2102
|
|
-
|
2103
|
|
-
|
2104
|
|
- if ( e1 == e2 + ras.precision )
|
2105
|
|
- {
|
2106
|
|
- switch ( dropOutControl )
|
2107
|
|
- {
|
2108
|
|
- case 0: /* simple drop-outs including stubs */
|
2109
|
|
- pxl = e2;
|
2110
|
|
- break;
|
|
2069
|
+ c1 = (Int)( e2 >> 3 );
|
|
2070
|
+ f1 = (Int)( e2 & 7 );
|
2111
|
2071
|
|
2112
|
|
- case 4: /* smart drop-outs including stubs */
|
2113
|
|
- pxl = SMART( x1, x2 );
|
2114
|
|
- break;
|
2115
|
|
-
|
2116
|
|
- case 1: /* simple drop-outs excluding stubs */
|
2117
|
|
- case 5: /* smart drop-outs excluding stubs */
|
2118
|
|
-
|
2119
|
|
- /* Drop-out Control Rules #4 and #6 */
|
2120
|
|
-
|
2121
|
|
- /* The specification neither provides an exact definition */
|
2122
|
|
- /* of a `stub' nor gives exact rules to exclude them. */
|
2123
|
|
- /* */
|
2124
|
|
- /* Here the constraints we use to recognize a stub. */
|
2125
|
|
- /* */
|
2126
|
|
- /* upper stub: */
|
2127
|
|
- /* */
|
2128
|
|
- /* - P_Left and P_Right are in the same contour */
|
2129
|
|
- /* - P_Right is the successor of P_Left in that contour */
|
2130
|
|
- /* - y is the top of P_Left and P_Right */
|
2131
|
|
- /* */
|
2132
|
|
- /* lower stub: */
|
2133
|
|
- /* */
|
2134
|
|
- /* - P_Left and P_Right are in the same contour */
|
2135
|
|
- /* - P_Left is the successor of P_Right in that contour */
|
2136
|
|
- /* - y is the bottom of P_Left */
|
2137
|
|
- /* */
|
2138
|
|
- /* We draw a stub if the following constraints are met. */
|
2139
|
|
- /* */
|
2140
|
|
- /* - for an upper or lower stub, there is top or bottom */
|
2141
|
|
- /* overshoot, respectively */
|
2142
|
|
- /* - the covered interval is greater or equal to a half */
|
2143
|
|
- /* pixel */
|
2144
|
|
-
|
2145
|
|
- /* upper stub test */
|
2146
|
|
- if ( left->next == right &&
|
2147
|
|
- left->height == 1 &&
|
2148
|
|
- !( left->flags & Overshoot_Top &&
|
2149
|
|
- x2 - x1 >= ras.precision_half ) )
|
2150
|
|
- goto Exit;
|
2151
|
|
-
|
2152
|
|
- /* lower stub test */
|
2153
|
|
- if ( right->next == left &&
|
2154
|
|
- left->offset == 0 &&
|
2155
|
|
- !( left->flags & Overshoot_Bottom &&
|
2156
|
|
- x2 - x1 >= ras.precision_half ) )
|
2157
|
|
- goto Exit;
|
2158
|
|
-
|
2159
|
|
- if ( dropOutControl == 1 )
|
2160
|
|
- pxl = e2;
|
2161
|
|
- else
|
2162
|
|
- pxl = SMART( x1, x2 );
|
2163
|
|
- break;
|
2164
|
|
-
|
2165
|
|
- default: /* modes 2, 3, 6, 7 */
|
2166
|
|
- goto Exit; /* no drop-out control */
|
2167
|
|
- }
|
2168
|
|
-
|
2169
|
|
- /* undocumented but confirmed: If the drop-out would result in a */
|
2170
|
|
- /* pixel outside of the bounding box, use the pixel inside of the */
|
2171
|
|
- /* bounding box instead */
|
2172
|
|
- if ( pxl < 0 )
|
2173
|
|
- pxl = e1;
|
2174
|
|
- else if ( TRUNC( pxl ) > ras.bRight )
|
2175
|
|
- pxl = e2;
|
2176
|
|
-
|
2177
|
|
- /* check that the other pixel isn't set */
|
2178
|
|
- e1 = ( pxl == e1 ) ? e2 : e1;
|
2179
|
|
-
|
2180
|
|
- e1 = TRUNC( e1 );
|
2181
|
|
-
|
2182
|
|
- c1 = (Int)( e1 >> 3 );
|
2183
|
|
- f1 = (Int)( e1 & 7 );
|
2184
|
|
-
|
2185
|
|
- if ( e1 >= 0 && e1 <= ras.bRight &&
|
2186
|
|
- ras.bLine[c1] & ( 0x80 >> f1 ) )
|
2187
|
|
- goto Exit;
|
2188
|
|
- }
|
2189
|
|
- else
|
2190
|
|
- goto Exit;
|
|
2072
|
+ if ( ras.bLine[c1] & ( 0x80 >> f1 ) )
|
|
2073
|
+ return;
|
2191
|
2074
|
}
|
2192
|
2075
|
|
2193
|
|
- e1 = TRUNC( pxl );
|
2194
|
|
-
|
2195
|
2076
|
if ( e1 >= 0 && e1 <= ras.bRight )
|
2196
|
2077
|
{
|
2197
|
|
- FT_TRACE7(( " -> x=%ld", e1 ));
|
2198
|
|
-
|
2199
|
2078
|
c1 = (Int)( e1 >> 3 );
|
2200
|
2079
|
f1 = (Int)( e1 & 7 );
|
2201
|
2080
|
|
2202
|
2081
|
ras.bLine[c1] |= 0x80 >> f1;
|
2203
|
2082
|
}
|
2204
|
|
-
|
2205
|
|
- Exit:
|
2206
|
|
- FT_TRACE7(( " dropout=%d\n", left->flags & 7 ));
|
2207
|
2083
|
}
|
2208
|
2084
|
|
2209
|
2085
|
|
... |
... |
@@ -2237,15 +2113,10 @@ |
2237
|
2113
|
static void
|
2238
|
2114
|
Horizontal_Sweep_Span( RAS_ARGS Int y,
|
2239
|
2115
|
FT_F26Dot6 x1,
|
2240
|
|
- FT_F26Dot6 x2,
|
2241
|
|
- PProfile left,
|
2242
|
|
- PProfile right )
|
|
2116
|
+ FT_F26Dot6 x2 )
|
2243
|
2117
|
{
|
2244
|
2118
|
Long e1, e2;
|
2245
|
2119
|
|
2246
|
|
- FT_UNUSED( left );
|
2247
|
|
- FT_UNUSED( right );
|
2248
|
|
-
|
2249
|
2120
|
|
2250
|
2121
|
FT_TRACE7(( " x=%d y=[% .*f;% .*f]",
|
2251
|
2122
|
y,
|
... |
... |
@@ -2309,119 +2180,37 @@ |
2309
|
2180
|
static void
|
2310
|
2181
|
Horizontal_Sweep_Drop( RAS_ARGS Int y,
|
2311
|
2182
|
FT_F26Dot6 x1,
|
2312
|
|
- FT_F26Dot6 x2,
|
2313
|
|
- PProfile left,
|
2314
|
|
- PProfile right )
|
|
2183
|
+ FT_F26Dot6 x2 )
|
2315
|
2184
|
{
|
2316
|
|
- Long e1, e2, pxl;
|
|
2185
|
+ Int e1 = (Int)TRUNC( x1 );
|
|
2186
|
+ Int e2 = (Int)TRUNC( x2 );
|
2317
|
2187
|
PByte bits;
|
2318
|
2188
|
Int f1;
|
2319
|
2189
|
|
2320
|
2190
|
|
2321
|
|
- FT_TRACE7(( " x=%d y=[% .*f;% .*f]",
|
2322
|
|
- y,
|
2323
|
|
- ras.precision_bits, (double)x1 / (double)ras.precision,
|
2324
|
|
- ras.precision_bits, (double)x2 / (double)ras.precision ));
|
2325
|
|
-
|
2326
|
|
- /* During the horizontal sweep, we only take care of drop-outs */
|
2327
|
|
-
|
2328
|
|
- /* e1 + <-- pixel center */
|
2329
|
|
- /* | */
|
2330
|
|
- /* x1 ---+--> <-- contour */
|
2331
|
|
- /* | */
|
2332
|
|
- /* | */
|
2333
|
|
- /* x2 <--+--- <-- contour */
|
2334
|
|
- /* | */
|
2335
|
|
- /* | */
|
2336
|
|
- /* e2 + <-- pixel center */
|
|
2191
|
+ /* undocumented but confirmed: If the drop-out would result in a */
|
|
2192
|
+ /* pixel outside of the bounding box, use the pixel inside of the */
|
|
2193
|
+ /* bounding box instead */
|
|
2194
|
+ if ( e1 < 0 || e1 > ras.bTop )
|
|
2195
|
+ e1 = e2;
|
2337
|
2196
|
|
2338
|
|
- e1 = CEILING( x1 );
|
2339
|
|
- e2 = FLOOR ( x2 );
|
2340
|
|
- pxl = e1;
|
2341
|
|
-
|
2342
|
|
- if ( e1 > e2 )
|
|
2197
|
+ /* otherwise check that the other pixel isn't set */
|
|
2198
|
+ else if ( e2 >=0 && e2 <= ras.bTop )
|
2343
|
2199
|
{
|
2344
|
|
- Int dropOutControl = left->flags & 7;
|
2345
|
|
-
|
2346
|
|
-
|
2347
|
|
- if ( e1 == e2 + ras.precision )
|
2348
|
|
- {
|
2349
|
|
- switch ( dropOutControl )
|
2350
|
|
- {
|
2351
|
|
- case 0: /* simple drop-outs including stubs */
|
2352
|
|
- pxl = e2;
|
2353
|
|
- break;
|
2354
|
|
-
|
2355
|
|
- case 4: /* smart drop-outs including stubs */
|
2356
|
|
- pxl = SMART( x1, x2 );
|
2357
|
|
- break;
|
2358
|
|
-
|
2359
|
|
- case 1: /* simple drop-outs excluding stubs */
|
2360
|
|
- case 5: /* smart drop-outs excluding stubs */
|
2361
|
|
- /* see Vertical_Sweep_Drop for details */
|
2362
|
|
-
|
2363
|
|
- /* rightmost stub test */
|
2364
|
|
- if ( left->next == right &&
|
2365
|
|
- left->height == 1 &&
|
2366
|
|
- !( left->flags & Overshoot_Top &&
|
2367
|
|
- x2 - x1 >= ras.precision_half ) )
|
2368
|
|
- goto Exit;
|
2369
|
|
-
|
2370
|
|
- /* leftmost stub test */
|
2371
|
|
- if ( right->next == left &&
|
2372
|
|
- left->offset == 0 &&
|
2373
|
|
- !( left->flags & Overshoot_Bottom &&
|
2374
|
|
- x2 - x1 >= ras.precision_half ) )
|
2375
|
|
- goto Exit;
|
2376
|
|
-
|
2377
|
|
- if ( dropOutControl == 1 )
|
2378
|
|
- pxl = e2;
|
2379
|
|
- else
|
2380
|
|
- pxl = SMART( x1, x2 );
|
2381
|
|
- break;
|
2382
|
|
-
|
2383
|
|
- default: /* modes 2, 3, 6, 7 */
|
2384
|
|
- goto Exit; /* no drop-out control */
|
2385
|
|
- }
|
2386
|
|
-
|
2387
|
|
- /* undocumented but confirmed: If the drop-out would result in a */
|
2388
|
|
- /* pixel outside of the bounding box, use the pixel inside of the */
|
2389
|
|
- /* bounding box instead */
|
2390
|
|
- if ( pxl < 0 )
|
2391
|
|
- pxl = e1;
|
2392
|
|
- else if ( TRUNC( pxl ) > ras.bTop )
|
2393
|
|
- pxl = e2;
|
|
2200
|
+ bits = ras.bOrigin + ( y >> 3 ) - e2 * ras.bPitch;
|
|
2201
|
+ f1 = 0x80 >> ( y & 7 );
|
2394
|
2202
|
|
2395
|
|
- /* check that the other pixel isn't set */
|
2396
|
|
- e1 = ( pxl == e1 ) ? e2 : e1;
|
2397
|
|
-
|
2398
|
|
- e1 = TRUNC( e1 );
|
2399
|
|
-
|
2400
|
|
- bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch;
|
2401
|
|
- f1 = 0x80 >> ( y & 7 );
|
2402
|
|
-
|
2403
|
|
- if ( e1 >= 0 && e1 <= ras.bTop &&
|
2404
|
|
- *bits & f1 )
|
2405
|
|
- goto Exit;
|
2406
|
|
- }
|
2407
|
|
- else
|
2408
|
|
- goto Exit;
|
|
2203
|
+ if ( *bits & f1 )
|
|
2204
|
+ return;
|
2409
|
2205
|
}
|
2410
|
2206
|
|
2411
|
|
- e1 = TRUNC( pxl );
|
2412
|
|
-
|
2413
|
2207
|
if ( e1 >= 0 && e1 <= ras.bTop )
|
2414
|
2208
|
{
|
2415
|
|
- FT_TRACE7(( " -> y=%ld", e1 ));
|
2416
|
|
-
|
2417
|
2209
|
bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch;
|
2418
|
2210
|
f1 = 0x80 >> ( y & 7 );
|
2419
|
2211
|
|
2420
|
|
- bits[0] |= f1;
|
|
2212
|
+ *bits |= f1;
|
2421
|
2213
|
}
|
2422
|
|
-
|
2423
|
|
- Exit:
|
2424
|
|
- FT_TRACE7(( " dropout=%d\n", left->flags & 7 ));
|
2425
|
2214
|
}
|
2426
|
2215
|
|
2427
|
2216
|
|
... |
... |
@@ -2512,36 +2301,120 @@ |
2512
|
2301
|
x2 = xs;
|
2513
|
2302
|
}
|
2514
|
2303
|
|
2515
|
|
- /* if bottom ceiling exceeds top floor, it is a drop-out */
|
2516
|
|
- if ( CEILING( x1 ) > FLOOR( x2 ) )
|
|
2304
|
+ if ( CEILING( x1 ) <= FLOOR( x2 ) )
|
|
2305
|
+ ras.Proc_Sweep_Span( RAS_VARS y, x1, x2 );
|
|
2306
|
+
|
|
2307
|
+ /* otherwise, bottom ceiling > top floor, it is a drop-out */
|
|
2308
|
+ else
|
2517
|
2309
|
{
|
2518
|
2310
|
Int dropOutControl = P_Left->flags & 7;
|
2519
|
2311
|
|
2520
|
2312
|
|
2521
|
|
- if ( dropOutControl != 2 )
|
|
2313
|
+ /* Drop-out control */
|
|
2314
|
+
|
|
2315
|
+ /* e2 x2 x1 e1 */
|
|
2316
|
+ /* */
|
|
2317
|
+ /* ^ | */
|
|
2318
|
+ /* | | */
|
|
2319
|
+ /* +-------------+---------------------+------------+ */
|
|
2320
|
+ /* | | */
|
|
2321
|
+ /* | v */
|
|
2322
|
+ /* */
|
|
2323
|
+ /* pixel contour contour pixel */
|
|
2324
|
+ /* center center */
|
|
2325
|
+
|
|
2326
|
+ /* drop-out mode scan conversion rules (OpenType specs) */
|
|
2327
|
+ /* ------------------------------------------------------- */
|
|
2328
|
+ /* bit 0 exclude stubs if set */
|
|
2329
|
+ /* bit 1 ignore drop-outs if set */
|
|
2330
|
+ /* bit 2 smart rounding if set */
|
|
2331
|
+
|
|
2332
|
+ if ( dropOutControl & 2 )
|
|
2333
|
+ goto Next_Pair;
|
|
2334
|
+
|
|
2335
|
+ /* The specification neither provides an exact definition */
|
|
2336
|
+ /* of a `stub' nor gives exact rules to exclude them. */
|
|
2337
|
+ /* */
|
|
2338
|
+ /* Here the constraints we use to recognize a stub. */
|
|
2339
|
+ /* */
|
|
2340
|
+ /* upper stub: */
|
|
2341
|
+ /* */
|
|
2342
|
+ /* - P_Left and P_Right are in the same contour */
|
|
2343
|
+ /* - P_Right is the successor of P_Left in that contour */
|
|
2344
|
+ /* - y is the top of P_Left and P_Right */
|
|
2345
|
+ /* */
|
|
2346
|
+ /* lower stub: */
|
|
2347
|
+ /* */
|
|
2348
|
+ /* - P_Left and P_Right are in the same contour */
|
|
2349
|
+ /* - P_Left is the successor of P_Right in that contour */
|
|
2350
|
+ /* - y is the bottom of P_Left */
|
|
2351
|
+ /* */
|
|
2352
|
+ /* We draw a stub if the following constraints are met. */
|
|
2353
|
+ /* */
|
|
2354
|
+ /* - for an upper or lower stub, there is top or bottom */
|
|
2355
|
+ /* overshoot, respectively */
|
|
2356
|
+ /* - the covered interval is greater or equal to a half */
|
|
2357
|
+ /* pixel */
|
|
2358
|
+
|
|
2359
|
+ if ( dropOutControl & 1 )
|
2522
|
2360
|
{
|
2523
|
|
- P_Left ->X = x1;
|
2524
|
|
- P_Right->X = x2;
|
|
2361
|
+ /* rightmost stub test */
|
|
2362
|
+ if ( P_Left->next == P_Right &&
|
|
2363
|
+ P_Left->height == 1 &&
|
|
2364
|
+ !( P_Left->flags & Overshoot_Top &&
|
|
2365
|
+ x2 - x1 >= ras.precision_half ) )
|
|
2366
|
+ goto Next_Pair;
|
|
2367
|
+
|
|
2368
|
+ /* leftmost stub test */
|
|
2369
|
+ if ( P_Right->next == P_Left &&
|
|
2370
|
+ P_Left->offset == 0 &&
|
|
2371
|
+ !( P_Left->flags & Overshoot_Bottom &&
|
|
2372
|
+ x2 - x1 >= ras.precision_half ) )
|
|
2373
|
+ goto Next_Pair;
|
|
2374
|
+ }
|
2525
|
2375
|
|
2526
|
|
- /* mark profile for drop-out processing */
|
2527
|
|
- P_Left->flags |= Dropout;
|
2528
|
|
- dropouts++;
|
|
2376
|
+ /* select the pixel to set and the other pixel */
|
|
2377
|
+ if ( dropOutControl & 4 )
|
|
2378
|
+ {
|
|
2379
|
+ x2 = SMART( x1, x2 );
|
|
2380
|
+ x1 = x1 > x2 ? x2 + ras.precision : x2 - ras.precision;
|
|
2381
|
+ }
|
|
2382
|
+ else
|
|
2383
|
+ {
|
|
2384
|
+ x2 = FLOOR ( x2 );
|
|
2385
|
+ x1 = CEILING( x1 );
|
2529
|
2386
|
}
|
|
2387
|
+
|
|
2388
|
+ P_Left ->X = x2;
|
|
2389
|
+ P_Right->X = x1;
|
|
2390
|
+
|
|
2391
|
+ /* mark profile for drop-out processing */
|
|
2392
|
+ P_Left->flags |= Dropout;
|
|
2393
|
+ dropouts++;
|
2530
|
2394
|
}
|
2531
|
|
- else
|
2532
|
|
- ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right );
|
2533
|
2395
|
|
|
2396
|
+ Next_Pair:
|
2534
|
2397
|
P_Left = P_Left->link;
|
2535
|
2398
|
P_Right = P_Right->link;
|
2536
|
2399
|
}
|
2537
|
2400
|
|
2538
|
|
- /* handle drop-outs _after_ the span drawing -- */
|
2539
|
|
- /* drop-out processing has been moved out of the loop */
|
2540
|
|
- /* for performance tuning */
|
2541
|
|
- if ( dropouts > 0 )
|
2542
|
|
- goto Scan_DropOuts;
|
|
2401
|
+ /* handle drop-outs _after_ the span drawing */
|
|
2402
|
+ P_Left = draw_left;
|
|
2403
|
+ P_Right = draw_right;
|
2543
|
2404
|
|
2544
|
|
- Next_Line:
|
|
2405
|
+ while ( dropouts && P_Left && P_Right )
|
|
2406
|
+ {
|
|
2407
|
+ if ( P_Left->flags & Dropout )
|
|
2408
|
+ {
|
|
2409
|
+ ras.Proc_Sweep_Drop( RAS_VARS y, P_Left->X, P_Right->X );
|
|
2410
|
+
|
|
2411
|
+ P_Left->flags &= ~Dropout;
|
|
2412
|
+ dropouts--;
|
|
2413
|
+ }
|
|
2414
|
+
|
|
2415
|
+ P_Left = P_Left->link;
|
|
2416
|
+ P_Right = P_Right->link;
|
|
2417
|
+ }
|
2545
|
2418
|
|
2546
|
2419
|
ras.Proc_Sweep_Step( RAS_VAR );
|
2547
|
2420
|
|
... |
... |
@@ -2552,32 +2425,6 @@ |
2552
|
2425
|
}
|
2553
|
2426
|
|
2554
|
2427
|
return SUCCESS;
|
2555
|
|
-
|
2556
|
|
- Scan_DropOuts:
|
2557
|
|
-
|
2558
|
|
- P_Left = draw_left;
|
2559
|
|
- P_Right = draw_right;
|
2560
|
|
-
|
2561
|
|
- while ( P_Left && P_Right )
|
2562
|
|
- {
|
2563
|
|
- if ( P_Left->flags & Dropout )
|
2564
|
|
- {
|
2565
|
|
- P_Left->flags &= ~Dropout;
|
2566
|
|
-#if 0
|
2567
|
|
- dropouts--; /* -- this is useful when debugging only */
|
2568
|
|
-#endif
|
2569
|
|
- ras.Proc_Sweep_Drop( RAS_VARS y,
|
2570
|
|
- P_Left->X,
|
2571
|
|
- P_Right->X,
|
2572
|
|
- P_Left,
|
2573
|
|
- P_Right );
|
2574
|
|
- }
|
2575
|
|
-
|
2576
|
|
- P_Left = P_Left->link;
|
2577
|
|
- P_Right = P_Right->link;
|
2578
|
|
- }
|
2579
|
|
-
|
2580
|
|
- goto Next_Line;
|
2581
|
2428
|
}
|
2582
|
2429
|
|
2583
|
2430
|
|
... |
... |
@@ -2769,18 +2616,16 @@ |
2769
|
2616
|
Set_High_Precision( RAS_VARS ras.outline.flags &
|
2770
|
2617
|
FT_OUTLINE_HIGH_PRECISION );
|
2771
|
2618
|
|
|
2619
|
+ ras.dropOutControl = 0;
|
|
2620
|
+
|
2772
|
2621
|
if ( ras.outline.flags & FT_OUTLINE_IGNORE_DROPOUTS )
|
2773
|
|
- ras.dropOutControl = 2;
|
2774
|
|
- else
|
2775
|
|
- {
|
2776
|
|
- if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS )
|
2777
|
|
- ras.dropOutControl = 4;
|
2778
|
|
- else
|
2779
|
|
- ras.dropOutControl = 0;
|
|
2622
|
+ ras.dropOutControl |= 2;
|
2780
|
2623
|
|
2781
|
|
- if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) )
|
2782
|
|
- ras.dropOutControl += 1;
|
2783
|
|
- }
|
|
2624
|
+ if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS )
|
|
2625
|
+ ras.dropOutControl |= 4;
|
|
2626
|
+
|
|
2627
|
+ if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) )
|
|
2628
|
+ ras.dropOutControl |= 1;
|
2784
|
2629
|
|
2785
|
2630
|
FT_TRACE6(( "BW Raster: precision 1/%d, dropout mode %d\n",
|
2786
|
2631
|
ras.precision, ras.dropOutControl ));
|