5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
22
23
24
25
26
27
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
107
108
109
110
111
113#define FT_COMPONENT smooth
124#define FT_RENDER_POOL_SIZE 16384L
128#define FT_ERR_XCAT( x, y ) x ## y
131#define FT_BEGIN_STMNT do {
132#define FT_END_STMNT } while ( 0
)
134#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) )
135#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) )
136#define FT_ABS( a ) ( (a) < 0
? -(a) : (a) )
140
141
142
143
144#define FT_HYPOT( x, y )
147 x > y ? x + ( 3
* y >> 3
)
148 : y + ( 3
* x >> 3
) )
155#ifdef FT_DEBUG_LEVEL_TRACE
164#define FT_CHAR_BIT CHAR_BIT
165#define FT_UINT_MAX UINT_MAX
166#define FT_INT_MAX INT_MAX
167#define FT_ULONG_MAX ULONG_MAX
169#define ADD_INT( a, b )
170 (int)( (unsigned int)(a) + (unsigned int)(b) )
172#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var)
175#define ft_memset memset
180#define Smooth_Err_Ok 0
181#define Smooth_Err_Invalid_Outline -1
182#define Smooth_Err_Cannot_Render_Glyph -2
183#define Smooth_Err_Invalid_Argument -3
184#define Smooth_Err_Raster_Overflow -4
186#define FT_BEGIN_HEADER
190#define QT_FT_BEGIN_HEADER
191#define QT_FT_END_HEADER
192#include <private/qrasterdefs_p.h>
193#include <private/qgrayraster_p.h>
196#define FT_Pos QT_FT_Pos
197#define FT_Vector QT_FT_Vector
198#define FT_BBox QT_FT_BBox
199#define FT_Bitmap QT_FT_Bitmap
200#define FT_Outline QT_FT_Outline
201#define FT_Outline_Funcs QT_FT_Outline_Funcs
202#define FT_Outline_MoveTo_Func QT_FT_Outline_MoveTo_Func
203#define FT_Outline_LineTo_Func QT_FT_Outline_LineTo_Func
204#define FT_Outline_ConicTo_Func QT_FT_Outline_ConicTo_Func
205#define FT_Outline_CubicTo_Func QT_FT_Outline_CubicTo_Func
206#define FT_Span QT_FT_Span
207#define FT_Raster QT_FT_Raster
208#define FT_Raster_Params QT_FT_Raster_Params
209#define FT_Raster_Funcs QT_FT_Raster_Funcs
210#define FT_Raster_Span_Func QT_FT_Raster_Span_Func
211#define FT_Raster_New_Func QT_FT_Raster_New_Func
212#define FT_Raster_Reset_Func QT_FT_Raster_Reset_Func
213#define FT_Raster_Set_Mode_Func QT_FT_Raster_Set_Mode_Func
214#define FT_Raster_Render_Func QT_FT_Raster_Render_Func
215#define FT_Raster_Done_Func QT_FT_Raster_Done_Func
216#define FT_CURVE_TAG QT_FT_CURVE_TAG
217#define FT_CURVE_TAG_ON QT_FT_CURVE_TAG_ON
218#define FT_CURVE_TAG_CONIC QT_FT_CURVE_TAG_CONIC
219#define FT_CURVE_TAG_CUBIC QT_FT_CURVE_TAG_CUBIC
220#define FT_OUTLINE_EVEN_ODD_FILL QT_FT_OUTLINE_EVEN_ODD_FILL
221#define FT_RASTER_FLAG_AA QT_FT_RASTER_FLAG_AA
222#define FT_RASTER_FLAG_DIRECT QT_FT_RASTER_FLAG_DIRECT
223#define FT_GLYPH_FORMAT_OUTLINE QT_FT_GLYPH_FORMAT_OUTLINE
225#define gray_TRaster_ TRaster_
226#define ft_grays_raster QT_MANGLE_NAMESPACE( qt_ft_grays_raster )
233#define FT_INT64 long long
237#define FALL_THROUGH __attribute__(( fallthrough ))
241#define FALL_THROUGH ( (void)0
)
249#define FT_UNUSED( x ) (x) = (x)
254#ifdef FT_DEBUG_LEVEL_TRACE
257 FT_Message(
const char* fmt,
264 vfprintf( stderr, fmt, ap );
285#define FT_TRACE5( varformat ) FT_Message varformat
288#define FT_TRACE7( varformat ) FT_Message varformat
291#define FT_ERROR( varformat ) FT_Message varformat
295 ( FT_Throw( FT_ERR_CAT( Smooth_Err_, e ),
298 FT_ERR_CAT( Smooth_Err_, e ) )
302#define FT_TRACE5( x ) do { } while ( 0
)
303#define FT_TRACE7( x ) do { } while ( 0
)
304#define FT_ERROR( x ) do { } while ( 0
)
310#define FT_Trace_Enable() do { } while ( 0
)
311#define FT_Trace_Disable() do { } while ( 0
)
314#define FT_DEFINE_OUTLINE_FUNCS( class_,
316 conic_to_, cubic_to_,
328#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_,
329 raster_new_, raster_reset_,
330 raster_set_mode_, raster_render_,
347#include FT_CONFIG_CONFIG_H
349#include <freetype/internal/ftobjs.h>
350#include <freetype/internal/ftdebug.h>
351#include <freetype/internal/ftcalc.h>
352#include <freetype/ftoutln.h>
365#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0
, count )
379#ifndef FT_STATIC_RASTER
381#define RAS_ARG gray_PWorker worker
382#define RAS_ARG_ gray_PWorker worker,
384#define RAS_VAR worker
385#define RAS_VAR_ worker,
410#define UPSCALE( x ) ( (x) >> ( 6
- PIXEL_BITS ) )
411#define DOWNSCALE( x ) ( (x) * ( 64
>> PIXEL_BITS ) )
419#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder )
421 (quotient) = (type)( (dividend) / (divisor) );
422 (remainder) = (type)( (dividend) % (divisor) );
423 if ( (remainder) < 0
)
426 (remainder) += (type)(divisor);
430#if defined( __GNUC__
) && __GNUC__
< 7
&& defined( __arm__ )
437#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder )
439 (quotient) = (type)( (dividend) / (divisor) );
440 (remainder) = (type)( (dividend) - (quotient) * (divisor) );
441 if ( (remainder) < 0
)
444 (remainder) += (type)(divisor);
463#define FT_UDIVPREP( c, b )
464 FT_Int64 b ## _r = c ? (FT_Int64)0xFFFFFFFF
/ ( b ) : 0
465#define FT_UDIV( a, b )
466 (TCoord)( ( (FT_UInt64)( a ) * (FT_UInt64)( b ## _r ) ) >> 32
)
474#define FT_FILL_RULE( coverage, area, fill )
476 coverage = (int)( area >> ( PIXEL_BITS * 2
+ 1
- 8
) );
477 if ( coverage & fill )
478 coverage = ~coverage;
479 if ( coverage > 255
&& fill & INT_MIN )
486#define FT_GRAY_SET( d, s, count )
488 unsigned char* q = d;
505
506
507
543#define FT_MAX_GRAY_POOL ( 2048
/ sizeof ( TCell ) )
548#define FT_MAX_GRAY_SPANS 256
551#if defined( _MSC_VER )
555#pragma warning( push )
556#pragma warning( disable : 4324
)
581 } gray_TWorker, *gray_PWorker;
583#if defined( _MSC_VER )
584#pragma warning( pop )
587#ifndef FT_STATIC_RASTER
590 static gray_TWorker ras;
595#define CELL_MAX_X_VALUE INT_MAX
598#define FT_INTEGRATE( ras, a, b )
599 ras.cell->cover = ADD_INT( ras.cell->cover, a ),
600 ras.cell->area = ADD_INT( ras.cell->area, (a) * (TArea)(b) )
607 } gray_TRaster, *gray_PRaster;
610#ifdef FT_DEBUG_LEVEL_TRACE
615 gray_dump_cells( RAS_ARG )
620 for ( y = ras.min_ey; y < ras.max_ey; y++ )
622 PCell cell = ras.ycells[y - ras.min_ey];
627 for ( ; cell != ras.cell_null; cell = cell->next )
628 printf(
" (%3d, c:%4d, a:%6d)",
629 cell->x, cell->cover, cell->area );
638
639
640
704
705
706
708 gray_render_scanline( RAS_ARG_ TCoord ey,
714 TCoord ex1, ex2, fx1, fx2, first, dy, delta, mod;
725 gray_set_cell( RAS_VAR_ ex2, ey );
745 p = ( ONE_PIXEL - fx1 ) * dy;
760 FT_DIV_MOD( TCoord, p, dx, delta, mod );
762 FT_INTEGRATE( ras, delta, fx1 + first );
765 gray_set_cell( RAS_VAR_ ex1, ey );
773 FT_DIV_MOD( TCoord, p, dx, lift, rem );
779 if ( mod >= (TCoord)dx )
785 FT_INTEGRATE( ras, delta, ONE_PIXEL );
788 gray_set_cell( RAS_VAR_ ex1, ey );
789 }
while ( ex1 != ex2 );
792 fx1 = ONE_PIXEL - first;
795 FT_INTEGRATE( ras, y2 - y1, fx1 + fx2 );
800
801
802
804 gray_render_line( RAS_ARG_ TPos to_x,
807 TCoord ey1, ey2, fy1, fy2, first, delta, mod;
808 TPos p, dx, dy, x, x2;
812 ey1 = TRUNC( ras.y );
816 if ( ( ey1 >= ras.max_ey && ey2 >= ras.max_ey ) ||
817 ( ey1 < ras.min_ey && ey2 < ras.min_ey ) )
820 fy1 = FRACT( ras.y );
826 gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, to_x, fy2 );
836 TCoord ex = TRUNC( ras.x );
837 TCoord two_fx = FRACT( ras.x ) << 1;
852 FT_INTEGRATE( ras, delta, two_fx);
855 gray_set_cell( RAS_VAR_ ex, ey1 );
857 delta = first + first - ONE_PIXEL;
860 FT_INTEGRATE( ras, delta, two_fx);
863 gray_set_cell( RAS_VAR_ ex, ey1 );
866 delta = fy2 - ONE_PIXEL + first;
867 FT_INTEGRATE( ras, delta, two_fx);
875 p = ( ONE_PIXEL - fy1 ) * dx;
889 FT_DIV_MOD( TCoord, p, dy, delta, mod );
892 gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, x, first );
895 gray_set_cell( RAS_VAR_ TRUNC( x ), ey1 );
903 FT_DIV_MOD( TCoord, p, dy, lift, rem );
909 if ( mod >= (TCoord)dy )
916 gray_render_scanline( RAS_VAR_ ey1,
917 x, ONE_PIXEL - first,
922 gray_set_cell( RAS_VAR_ TRUNC( x ), ey1 );
923 }
while ( ey1 != ey2 );
926 gray_render_scanline( RAS_VAR_ ey1,
927 x, ONE_PIXEL - first,
938
939
940
946 TCoord fx1, fy1, fx2, fy2;
947 TCoord ex1, ey1, ex2, ey2;
967 if ( ex1 == ex2 && ey1 == ey2 )
997 }
while ( ey1 != ey_stop );
1015 }
while ( ey1 != ey_stop );
1070
1083 }
while ( ex1 != ex2 || ey1 != ey2 );
1086 fx2 =
FRACT( to_x );
1087 fy2 =
FRACT( to_y );
1099
1100
1101
1102
1106#define LEFT_SHIFT( a, b ) (FT_Int64)( (FT_UInt64)(a) << (b) )
1114 TPos ax, ay, bx, by, dx, dy;
1132 if ( (
TRUNC( p0.y ) >=
ras.max_ey &&
1146 ax = p2.x - p1.x - bx;
1147 ay = p2.y - p1.y - by;
1156 gray_render_line(
RAS_VAR_ p2.x, p2.y );
1170 count = 0x10000U >> shift;
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1237 }
while ( --count );
1243
1244
1245
1246
1248 gray_split_conic( FT_Vector* base )
1253 base[4].x = base[2].x;
1254 a = base[0].x + base[1].x;
1255 b = base[1].x + base[2].x;
1257 base[2].x = ( a + b ) >> 2;
1260 base[4].y = base[2].y;
1261 a = base[0].y + base[1].y;
1262 b = base[1].y + base[2].y;
1264 base[2].y = ( a + b ) >> 2;
1270 gray_render_conic( RAS_ARG_
const FT_Vector* control,
1271 const FT_Vector* to )
1273 FT_Vector bez_stack[16 * 2 + 1];
1274 FT_Vector* arc = bez_stack;
1279 arc[0].x = UPSCALE( to->x );
1280 arc[0].y = UPSCALE( to->y );
1281 arc[1].x = UPSCALE( control->x );
1282 arc[1].y = UPSCALE( control->y );
1287 if ( ( TRUNC( arc[0].y ) >= ras.max_ey &&
1288 TRUNC( arc[1].y ) >= ras.max_ey &&
1289 TRUNC( arc[2].y ) >= ras.max_ey ) ||
1290 ( TRUNC( arc[0].y ) < ras.min_ey &&
1291 TRUNC( arc[1].y ) < ras.min_ey &&
1292 TRUNC( arc[2].y ) < ras.min_ey ) )
1299 dx = FT_ABS( arc[2].x + arc[0].x - 2 * arc[1].x );
1300 dy = FT_ABS( arc[2].y + arc[0].y - 2 * arc[1].y );
1308 while ( dx > ONE_PIXEL / 4 )
1319 int split = draw & ( -draw );
1322 while ( ( split >>= 1 ) )
1324 gray_split_conic( arc );
1328 gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
1338
1339
1340
1341
1342
1343
1344
1351 base[6].x = base[3].x;
1352 a = base[0].x + base[1].x;
1353 b = base[1].x + base[2].x;
1354 c = base[2].x + base[3].x;
1361 base[3].x = ( a + c ) >> 3;
1363 base[6].y = base[3].y;
1364 a = base[0].y + base[1].y;
1365 b = base[1].y + base[2].y;
1366 c = base[2].y + base[3].y;
1373 base[3].y = ( a + c ) >> 3;
1388 arc[1].x =
UPSCALE( control2->x );
1389 arc[1].y =
UPSCALE( control2->y );
1390 arc[2].x =
UPSCALE( control1->x );
1391 arc[2].y =
UPSCALE( control1->y );
1415 if (
FT_ABS( 2 * arc[0].x - 3 * arc[1].x + arc[3].x ) >
ONE_PIXEL / 2 ||
1421 gray_render_line(
RAS_VAR_ arc[0].x, arc[0].y );
1423 if ( arc == bez_stack )
1430 gray_split_cubic( arc );
1440 gray_PWorker worker = (gray_PWorker)worker_;
1462 gray_PWorker worker = (gray_PWorker)worker_;
1476 gray_PWorker worker = (gray_PWorker)worker_;
1479 gray_render_conic(
RAS_VAR_ control, to );
1491 gray_PWorker worker = (gray_PWorker)worker_;
1494 gray_render_cubic(
RAS_VAR_ control1, control2, to );
1503
1504
1505
1506
1507
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1545#define SCALED( x ) ( (x) * ( 1L
<< shift ) - delta )
1568 return FT_THROW( Invalid_Outline );
1570 if ( !func_interface )
1571 return FT_THROW( Invalid_Argument );
1573 shift = func_interface->shift;
1574 delta = func_interface->delta;
1577 for ( n = 0; n < outline->n_contours; n++ )
1579 FT_TRACE5((
"FT_Outline_Decompose: Contour %d\n", n ));
1582 last = outline->contours[n];
1584 goto Invalid_Outline;
1586 limit = outline->points + last;
1588 v_start = outline->points[first];
1589 v_start.x =
SCALED( v_start.x );
1590 v_start.y =
SCALED( v_start.y );
1592 v_last = outline->points[last];
1593 v_last.x =
SCALED( v_last.x );
1594 v_last.y =
SCALED( v_last.y );
1596 v_control = v_start;
1598 point = outline->points + first;
1599 tags = outline->tags + first;
1617 if ( last_tag != tag )
1618 goto Invalid_Outline;
1623 v_start.x = ( v_start.x + v_last.x ) / 2;
1624 v_start.y = ( v_start.y + v_last.y ) / 2;
1633 v_start.x / 64.0, v_start.y / 64.0 ));
1634 error = func_interface->move_to( &v_start, user );
1638 while ( point < limit )
1651 vec.x =
SCALED( point->x );
1652 vec.y =
SCALED( point->y );
1655 vec.x / 64.0, vec.y / 64.0 ));
1656 error = func_interface->line_to( &vec, user );
1663 v_control.x =
SCALED( point->x );
1664 v_control.y =
SCALED( point->y );
1667 if ( point < limit )
1677 vec.x =
SCALED( point->x );
1678 vec.y =
SCALED( point->y );
1683 " with control (%.2f, %.2f)\n",
1684 vec.x / 64.0, vec.y / 64.0,
1685 v_control.x / 64.0, v_control.y / 64.0 ));
1686 error = func_interface->conic_to( &v_control, &vec, user );
1693 goto Invalid_Outline;
1695 v_middle.x = ( v_control.x + vec.x ) / 2;
1696 v_middle.y = ( v_control.y + vec.y ) / 2;
1699 " with control (%.2f, %.2f)\n",
1700 v_middle.x / 64.0, v_middle.y / 64.0,
1701 v_control.x / 64.0, v_control.y / 64.0 ));
1702 error = func_interface->conic_to( &v_control, &v_middle, user );
1711 " with control (%.2f, %.2f)\n",
1712 v_start.x / 64.0, v_start.y / 64.0,
1713 v_control.x / 64.0, v_control.y / 64.0 ));
1714 error = func_interface->conic_to( &v_control, &v_start, user );
1722 if ( point + 1 > limit ||
1724 goto Invalid_Outline;
1729 vec1.x =
SCALED( point[-2].x );
1730 vec1.y =
SCALED( point[-2].y );
1732 vec2.x =
SCALED( point[-1].x );
1733 vec2.y =
SCALED( point[-1].y );
1735 if ( point <= limit )
1743 vec.x =
SCALED( point->x );
1744 vec.y =
SCALED( point->y );
1748 v_middle.x = ( vec2.x + vec.x ) / 2;
1749 v_middle.y = ( vec2.y + vec.y ) / 2;
1754 goto Invalid_Outline;
1757 " with controls (%.2f, %.2f) and (%.2f, %.2f)\n",
1758 vec.x / 64.0, vec.y / 64.0,
1759 vec1.x / 64.0, vec1.y / 64.0,
1760 vec2.x / 64.0, vec2.y / 64.0 ));
1761 error = func_interface->cubic_to( &vec1, &vec2, &vec, user );
1774 " with controls (%.2f, %.2f) and (%.2f, %.2f)\n",
1775 v_start.x / 64.0, v_start.y / 64.0,
1776 vec1.x / 64.0, vec1.y / 64.0,
1777 vec2.x / 64.0, vec2.y / 64.0 ));
1778 error = func_interface->cubic_to( &vec1, &vec2, &v_start, user );
1786 v_start.x / 64.0, v_start.y / 64.0 ));
1787 error = func_interface->line_to( &v_start, user );
1794 FT_TRACE5((
"FT_Outline_Decompose: Done\n", n ));
1798 FT_TRACE5((
"FT_Outline_Decompose: Error 0x%x\n", error ));
1802 return FT_THROW( Invalid_Outline );
1830 error = FT_Outline_Decompose( &
ras.outline, &func_interface, &
ras );
1834 FT_TRACE7(( error == Smooth_Err_Raster_Overflow
1835 ?
"band [%d..%d]: to be bisected\n"
1836 :
"band [%d..%d]: %td cell%s remaining\n",
1839 ras.cell_null - ras.cell_free,
1840 ras.cell_null - ras.cell_free == 1 ?
"" :
"s" ));
1869 if ( cover != 0 && cell
->x > x )
1876 area = cover - cell
->area;
1881 line[cell
->x] = (
unsigned char)coverage;
1906 if ( coverage == 0 || len <= 0 )
1911 FT_Span* last = span + *n - 1;
1914 if ( last->y == y &&
1915 last->x + last->len == x &&
1916 last->coverage == coverage )
1933 span[*n].coverage = (
unsigned char)coverage;
1962 if ( cover != 0 && cell
->x > x )
1965 gray_add_span(
RAS_VAR_ span, &n, x, cell
->x - x, y, coverage );
1969 area = cover - cell
->area;
1974 gray_add_span(
RAS_VAR_ span, &n, cell
->x, 1, y, coverage );
2018 for ( i = 0; i < count; ++i )
2021 n = ( (size_t)count *
sizeof ( PCell ) +
sizeof ( TCell ) - 1 )
2028 error = gray_convert_glyph_inner(
RAS_VAR_ continued );
2033 if (
ras.render_span )
2038 if ( band == bands )
2054 FT_TRACE7((
"gray_convert_glyph: rotten glyph\n" ));
2055 error =
FT_THROW( Raster_Overflow );
2076 const FT_Bitmap* target_map = params->target;
2078#ifndef FT_STATIC_RASTER
2079 gray_TWorker worker[1];
2084 return FT_THROW( Invalid_Argument );
2088 return FT_THROW( Cannot_Render_Glyph );
2091 return FT_THROW( Invalid_Outline );
2094 if ( outline->n_points == 0 || outline->n_contours == 0 )
2097 if ( !outline->contours || !outline->points )
2098 return FT_THROW( Invalid_Outline );
2100 if ( outline->n_points !=
2101 outline->contours[outline->n_contours - 1] + 1 )
2102 return FT_THROW( Invalid_Outline );
2104 ras.outline = *outline;
2108 if ( !params->gray_spans )
2123 const FT_Vector* limit = vec + outline->n_points;
2125 TPos xMin = vec->x, yMin = vec->y;
2126 TPos xMax = vec->x, yMax = vec->y;
2129 for ( vec++; vec < limit; vec++ )
2131 xMin =
FT_MIN( xMin, vec->x );
2132 yMin =
FT_MIN( yMin, vec->y );
2133 xMax =
FT_MAX( xMax, vec->x );
2134 yMax =
FT_MAX( yMax, vec->y );
2148 return FT_THROW( Invalid_Argument );
2151 if ( !target_map->width || !target_map->rows )
2154 if ( !target_map->buffer )
2155 return FT_THROW( Invalid_Argument );
2157 if ( target_map->pitch < 0 )
2161 + ( target_map->rows - 1 ) * (
unsigned int)target_map->pitch;
2183 ras.buffer = (PCell)malloc( estimate *
sizeof ( TCell ) );
2217 gray_PRaster raster = (gray_PRaster)malloc(
sizeof ( gray_TRaster ) );
2222 return FT_THROW( Raster_Overflow );
2239 gray_raster_new(
void* memory_,
2240 FT_Raster* araster_ )
2242 FT_Memory memory = (FT_Memory)memory_;
2243 gray_PRaster* araster = (gray_PRaster*)araster_;
2246 gray_PRaster raster = NULL;
2249 if ( !FT_NEW( raster ) )
2250 raster->memory = memory;
2259 gray_raster_done( FT_Raster raster )
2261 FT_Memory memory = (FT_Memory)((gray_PRaster)raster)->memory;
2272 unsigned char* pool_base,
2273 unsigned long pool_size )
#define __has_attribute(x)
#define FT_CURVE_TAG_CUBIC
static void gray_render_conic(RAS_ARG_ const FT_Vector *control, const FT_Vector *to)
static int gray_raster_new(FT_Raster *araster)
#define FT_RASTER_FLAG_AA
#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, raster_reset_, raster_set_mode_, raster_render_, raster_done_)
#define FT_Raster_Span_Func
static void gray_render_line(RAS_ARG_ TPos to_x, TPos to_y)
#define FT_UDIVPREP(c, b)
static int gray_conic_to(const FT_Vector *control, const FT_Vector *to, void *worker_)
#define FT_CURVE_TAG_CONIC
#define FT_Raster_Render_Func
#define FT_OUTLINE_EVEN_ODD_FILL
static int FT_Outline_Decompose(const FT_Outline *outline, const FT_Outline_Funcs *func_interface, void *user)
unsigned long long FT_UInt64
#define FT_FILL_RULE(coverage, area, fill)
#define Smooth_Err_Raster_Overflow
#define FT_MEM_SET(d, s, c)
#define FT_Outline_CubicTo_Func
static int gray_cubic_to(const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to, void *worker_)
static void gray_sweep(RAS_ARG)
static int gray_convert_glyph(RAS_ARG)
#define FT_Outline_LineTo_Func
static void gray_render_cubic(RAS_ARG_ const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to)
#define FT_Raster_Reset_Func
#define FT_RASTER_FLAG_DIRECT
static void gray_sweep_direct(RAS_ARG)
#define FT_Trace_Disable()
static void gray_raster_done(FT_Raster raster)
static void gray_add_span(RAS_ARG_ FT_Span *span, int *n, TCoord x, TCoord len, TCoord y, int coverage)
#define FT_Outline_ConicTo_Func
static int gray_move_to(const FT_Vector *to, void *worker_)
static void gray_set_cell(RAS_ARG_ TCoord ex, TCoord ey)
static void gray_split_cubic(FT_Vector *base)
static int gray_raster_set_mode(FT_Raster raster, unsigned long mode, void *args)
#define FT_ERR_XCAT(x, y)
#define FT_Raster_New_Func
#define FT_INTEGRATE(ras, a, b)
#define FT_Trace_Enable()
#define FT_GRAY_SET(d, s, count)
#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_)
#define FT_MEM_ZERO(dest, count)
#define FT_Raster_Set_Mode_Func
#define FT_GLYPH_FORMAT_OUTLINE
static int gray_line_to(const FT_Vector *to, void *worker_)
#define FT_Outline_MoveTo_Func
#define FT_RENDER_POOL_SIZE
static void gray_raster_reset(FT_Raster raster, unsigned char *pool_base, unsigned long pool_size)
static int gray_raster_render(FT_Raster raster, const FT_Raster_Params *params)
#define FT_Raster_Done_Func
#define FT_MAX_GRAY_SPANS
FT_Raster_Span_Func render_span