ReactOS 0.4.16-dev-1067-ge98bba2
ftgrays.c File Reference
#include <ft2build.h>
#include "ftgrays.h"
#include "ftsmerrs.h"
Include dependency graph for ftgrays.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TCell_
 
struct  TPixmap_
 
struct  gray_TWorker_
 
struct  gray_TRaster_
 

Macros

#define FT_COMPONENT   smooth
 
#define Smooth_Err_Invalid_Mode   Smooth_Err_Cannot_Render_Glyph
 
#define Smooth_Err_Memory_Overflow   Smooth_Err_Out_Of_Memory
 
#define ErrRaster_Memory_Overflow   Smooth_Err_Out_Of_Memory
 
#define FT_MEM_SET(d, s, c)   ft_memset( d, s, c )
 
#define FT_MEM_ZERO(dest, count)   FT_MEM_SET( dest, 0, count )
 
#define FT_ZERO(p)   FT_MEM_ZERO( p, sizeof ( *(p) ) )
 
#define RAS_ARG   gray_PWorker worker
 
#define RAS_ARG_   gray_PWorker worker,
 
#define RAS_VAR   worker
 
#define RAS_VAR_   worker,
 
#define PIXEL_BITS   8
 
#define ONE_PIXEL   ( 1 << PIXEL_BITS )
 
#define TRUNC(x)   ( (TCoord)( (x) >> PIXEL_BITS ) )
 
#define SUBPIXELS(x)   ( (TPos)(x) * ONE_PIXEL )
 
#define FLOOR(x)   ( (x) & -ONE_PIXEL )
 
#define CEILING(x)   ( ( (x) + ONE_PIXEL - 1 ) & -ONE_PIXEL )
 
#define ROUND(x)   ( ( (x) + ONE_PIXEL / 2 ) & -ONE_PIXEL )
 
#define UPSCALE(x)   ( (x) * ( ONE_PIXEL >> 6 ) )
 
#define DOWNSCALE(x)   ( (x) >> ( PIXEL_BITS - 6 ) )
 
#define FT_DIV_MOD(type, dividend, divisor, quotient, remainder)
 
#define FT_UDIVPREP(c, b)
 
#define FT_UDIV(a, b)
 
#define FT_MAX_GRAY_POOL   ( 2048 / sizeof ( TCell ) )
 
#define ras   (*worker)
 

Typedefs

typedef long TPos
 
typedef int TCoord
 
typedef int TArea
 
typedef struct TCell_PCell
 
typedef struct TCell_ TCell
 
typedef struct TPixmap_ TPixmap
 
typedef struct gray_TWorker_ gray_TWorker
 
typedef struct gray_TWorker_gray_PWorker
 
typedef struct gray_TRaster_ gray_TRaster
 
typedef struct gray_TRaster_gray_PRaster
 

Functions

static void gray_record_cell (RAS_ARG)
 
static void gray_set_cell (RAS_ARG_ TCoord ex, TCoord ey)
 
static void gray_render_scanline (RAS_ARG_ TCoord ey, TPos x1, TCoord y1, TPos x2, TCoord y2)
 
static void gray_render_line (RAS_ARG_ TPos to_x, TPos to_y)
 
static void gray_split_conic (FT_Vector *base)
 
static void gray_render_conic (RAS_ARG_ const FT_Vector *control, const FT_Vector *to)
 
static void gray_split_cubic (FT_Vector *base)
 
static void gray_render_cubic (RAS_ARG_ const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to)
 
static int gray_move_to (const FT_Vector *to, gray_PWorker worker)
 
static int gray_line_to (const FT_Vector *to, gray_PWorker worker)
 
static int gray_conic_to (const FT_Vector *control, const FT_Vector *to, gray_PWorker worker)
 
static int gray_cubic_to (const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to, gray_PWorker worker)
 
static void gray_hline (RAS_ARG_ TCoord x, TCoord y, TArea coverage, TCoord acount)
 
static void gray_sweep (RAS_ARG)
 
 FT_DEFINE_OUTLINE_FUNCS (func_interface,(FT_Outline_MoveTo_Func) gray_move_to,(FT_Outline_LineTo_Func) gray_line_to,(FT_Outline_ConicTo_Func) gray_conic_to,(FT_Outline_CubicTo_Func) gray_cubic_to, 0, 0) static int gray_convert_glyph_inner(RAS_ARG
 
 if (ft_setjmp(ras.jump_buffer)==0)
 
 FT_TRACE7 (("band [%d..%d]: to be bisected\n", ras.min_ey, ras.max_ey))
 
static int gray_convert_glyph (RAS_ARG)
 
static int gray_raster_render (FT_Raster raster, const FT_Raster_Params *params)
 
static int gray_raster_new (FT_Memory memory, FT_Raster *araster)
 
static void gray_raster_done (FT_Raster raster)
 
static void gray_raster_reset (FT_Raster raster, unsigned char *pool_base, unsigned long pool_size)
 
static int gray_raster_set_mode (FT_Raster raster, unsigned long mode, void *args)
 

Variables

int continued
 
 else
 
return error
 

Macro Definition Documentation

◆ CEILING

#define CEILING (   x)    ( ( (x) + ONE_PIXEL - 1 ) & -ONE_PIXEL )

Definition at line 339 of file ftgrays.c.

◆ DOWNSCALE

#define DOWNSCALE (   x)    ( (x) >> ( PIXEL_BITS - 6 ) )

Definition at line 344 of file ftgrays.c.

◆ ErrRaster_Memory_Overflow

#define ErrRaster_Memory_Overflow   Smooth_Err_Out_Of_Memory

Definition at line 284 of file ftgrays.c.

◆ FLOOR

#define FLOOR (   x)    ( (x) & -ONE_PIXEL )

Definition at line 338 of file ftgrays.c.

◆ FT_COMPONENT

#define FT_COMPONENT   smooth

Definition at line 91 of file ftgrays.c.

◆ FT_DIV_MOD

#define FT_DIV_MOD (   type,
  dividend,
  divisor,
  quotient,
  remainder 
)
Value:
(quotient) = (type)( (dividend) / (divisor) ); \
(remainder) = (type)( (dividend) % (divisor) ); \
if ( (remainder) < 0 ) \
{ \
(quotient)--; \
(remainder) += (type)(divisor); \
} \
#define FT_END_STMNT
Definition: ftconfig.h:352
#define FT_BEGIN_STMNT
Definition: ftconfig.h:351
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint divisor
Definition: glext.h:6313
double __cdecl remainder(double, double)
Definition: remainder.c:75

Definition at line 355 of file ftgrays.c.

◆ FT_MAX_GRAY_POOL

#define FT_MAX_GRAY_POOL   ( 2048 / sizeof ( TCell ) )

Definition at line 432 of file ftgrays.c.

◆ FT_MEM_SET

#define FT_MEM_SET (   d,
  s,
  c 
)    ft_memset( d, s, c )

Definition at line 291 of file ftgrays.c.

◆ FT_MEM_ZERO

#define FT_MEM_ZERO (   dest,
  count 
)    FT_MEM_SET( dest, 0, count )

Definition at line 295 of file ftgrays.c.

◆ FT_UDIV

#define FT_UDIV (   a,
  b 
)
Value:
( ( (unsigned long)( a ) * (unsigned long)( b ## _r ) ) >> \
( sizeof( long ) * FT_CHAR_BIT - PIXEL_BITS ) )
#define FT_CHAR_BIT
Definition: ftconfig.h:69
#define PIXEL_BITS
Definition: ftgrays.c:328
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define long
Definition: qsort.c:33

Definition at line 391 of file ftgrays.c.

◆ FT_UDIVPREP

#define FT_UDIVPREP (   c,
  b 
)
Value:
long b ## _r = c ? (long)( FT_ULONG_MAX >> PIXEL_BITS ) / ( b ) \
: 0
#define FT_ULONG_MAX
Definition: ftstdlib.h:68
const GLubyte * c
Definition: glext.h:8905
#define b
Definition: ke_i.h:79

Definition at line 388 of file ftgrays.c.

◆ FT_ZERO

#define FT_ZERO (   p)    FT_MEM_ZERO( p, sizeof ( *(p) ) )

Definition at line 299 of file ftgrays.c.

◆ ONE_PIXEL

#define ONE_PIXEL   ( 1 << PIXEL_BITS )

Definition at line 335 of file ftgrays.c.

◆ PIXEL_BITS

#define PIXEL_BITS   8

Definition at line 328 of file ftgrays.c.

◆ ras

#define ras   (*worker)

Definition at line 477 of file ftgrays.c.

◆ RAS_ARG

#define RAS_ARG   gray_PWorker worker

Definition at line 311 of file ftgrays.c.

◆ RAS_ARG_

#define RAS_ARG_   gray_PWorker worker,

Definition at line 312 of file ftgrays.c.

◆ RAS_VAR

#define RAS_VAR   worker

Definition at line 314 of file ftgrays.c.

◆ RAS_VAR_

#define RAS_VAR_   worker,

Definition at line 315 of file ftgrays.c.

◆ ROUND

#define ROUND (   x)    ( ( (x) + ONE_PIXEL / 2 ) & -ONE_PIXEL )

Definition at line 340 of file ftgrays.c.

◆ Smooth_Err_Invalid_Mode

#define Smooth_Err_Invalid_Mode   Smooth_Err_Cannot_Render_Glyph

Definition at line 282 of file ftgrays.c.

◆ Smooth_Err_Memory_Overflow

#define Smooth_Err_Memory_Overflow   Smooth_Err_Out_Of_Memory

Definition at line 283 of file ftgrays.c.

◆ SUBPIXELS

#define SUBPIXELS (   x)    ( (TPos)(x) * ONE_PIXEL )

Definition at line 337 of file ftgrays.c.

◆ TRUNC

#define TRUNC (   x)    ( (TCoord)( (x) >> PIXEL_BITS ) )

Definition at line 336 of file ftgrays.c.

◆ UPSCALE

#define UPSCALE (   x)    ( (x) * ( ONE_PIXEL >> 6 ) )

Definition at line 343 of file ftgrays.c.

Typedef Documentation

◆ gray_PRaster

◆ gray_PWorker

◆ gray_TRaster

◆ gray_TWorker

◆ PCell

typedef struct TCell_* PCell

Definition at line 410 of file ftgrays.c.

◆ TArea

typedef int TArea

Definition at line 407 of file ftgrays.c.

◆ TCell

typedef struct TCell_ TCell

◆ TCoord

typedef int TCoord

Definition at line 406 of file ftgrays.c.

◆ TPixmap

◆ TPos

typedef long TPos

Definition at line 405 of file ftgrays.c.

Function Documentation

◆ FT_DEFINE_OUTLINE_FUNCS()

FT_DEFINE_OUTLINE_FUNCS ( func_interface  ,
(FT_Outline_MoveTo_Func gray_move_to,
(FT_Outline_LineTo_Func gray_line_to,
(FT_Outline_ConicTo_Func gray_conic_to,
(FT_Outline_CubicTo_Func gray_cubic_to,
,
 
)

◆ FT_TRACE7()

FT_TRACE7 ( ("band [%d..%d]: to be bisected\n", ras.min_ey, ras.max_ey)  )

◆ gray_conic_to()

static int gray_conic_to ( const FT_Vector control,
const FT_Vector to,
gray_PWorker  worker 
)
static

Definition at line 1211 of file ftgrays.c.

1214 {
1216 return 0;
1217 }
static void gray_render_conic(RAS_ARG_ const FT_Vector *control, const FT_Vector *to)
Definition: ftgrays.c:996
#define RAS_VAR_
Definition: ftgrays.c:315
Definition: dialog.c:52

◆ gray_convert_glyph()

static int gray_convert_glyph ( RAS_ARG  )
static

Definition at line 1667 of file ftgrays.c.

1668 {
1669 const TCoord yMin = ras.min_ey;
1670 const TCoord yMax = ras.max_ey;
1671
1672#ifdef __REACTOS__
1674 if (!buffer)
1675 return 1;
1676 {
1677#else
1679#endif
1680 size_t height = (size_t)( yMax - yMin );
1681 size_t n = FT_MAX_GRAY_POOL / 8;
1682 TCoord y;
1683 TCoord bands[32]; /* enough to accommodate bisections */
1684 TCoord* band;
1685
1686 int continued = 0;
1687
1688
1689 /* set up vertical bands */
1690 if ( height > n )
1691 {
1692 /* two divisions rounded up */
1693 n = ( height + n - 1 ) / n;
1694 height = ( height + n - 1 ) / n;
1695 }
1696
1697 /* memory management */
1698 n = ( height * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) / sizeof ( TCell );
1699
1700 ras.cells = buffer + n;
1701 ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - n );
1702 ras.ycells = (PCell*)buffer;
1703
1704 for ( y = yMin; y < yMax; )
1705 {
1706 ras.min_ey = y;
1707 y += height;
1708 ras.max_ey = FT_MIN( y, yMax );
1709
1710 band = bands;
1711 band[1] = ras.min_ey;
1712 band[0] = ras.max_ey;
1713
1714 do
1715 {
1716 TCoord width = band[0] - band[1];
1717 int error;
1718
1719
1720 FT_MEM_ZERO( ras.ycells, height * sizeof ( PCell ) );
1721
1722 ras.num_cells = 0;
1723 ras.invalid = 1;
1724 ras.min_ey = band[1];
1725 ras.max_ey = band[0];
1726
1727 error = gray_convert_glyph_inner( RAS_VAR, continued );
1728 continued = 1;
1729
1730 if ( !error )
1731 {
1733 band--;
1734 continue;
1735 }
1736 else if ( error != ErrRaster_Memory_Overflow )
1737#ifdef __REACTOS__
1738 {
1739 free(buffer);
1740 return 1;
1741 }
1742#else
1743 return 1;
1744#endif
1745
1746 /* render pool overflow; we will reduce the render band by half */
1747 width >>= 1;
1748
1749 /* this should never happen even with tiny rendering pool */
1750 if ( width == 0 )
1751 {
1752 FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" ));
1753#ifdef __REACTOS__
1754 free(buffer);
1755#endif
1756 return 1;
1757 }
1758
1759 band++;
1760 band[1] = band[0];
1761 band[0] += width;
1762 } while ( band >= bands );
1763 }
1764
1765#ifdef __REACTOS__
1766 free(buffer);
1767 }
1768#endif
1769 return 0;
1770 }
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
__kernel_size_t size_t
Definition: linux.h:237
#define FT_TRACE7(varformat)
Definition: ftdebug.h:192
#define ErrRaster_Memory_Overflow
Definition: ftgrays.c:284
int TCoord
Definition: ftgrays.c:406
static void gray_sweep(RAS_ARG)
Definition: ftgrays.c:1296
#define RAS_VAR
Definition: ftgrays.c:314
#define ras
Definition: ftgrays.c:477
struct TCell_ * PCell
Definition: ftgrays.c:410
return error
Definition: ftgrays.c:1662
#define FT_MAX_GRAY_POOL
Definition: ftgrays.c:432
#define FT_MEM_ZERO(dest, count)
Definition: ftgrays.c:295
int continued
Definition: ftgrays.c:1633
#define FT_MIN(a, b)
Definition: ftobjs.h:70
ft_ptrdiff_t FT_PtrDist
Definition: fttypes.h:336
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by gray_raster_render().

◆ gray_cubic_to()

static int gray_cubic_to ( const FT_Vector control1,
const FT_Vector control2,
const FT_Vector to,
gray_PWorker  worker 
)
static

Definition at line 1221 of file ftgrays.c.

1225 {
1226 gray_render_cubic( RAS_VAR_ control1, control2, to );
1227 return 0;
1228 }
static void gray_render_cubic(RAS_ARG_ const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to)
Definition: ftgrays.c:1089

◆ gray_hline()

static void gray_hline ( RAS_ARG_ TCoord  x,
TCoord  y,
TArea  coverage,
TCoord  acount 
)
static

Definition at line 1232 of file ftgrays.c.

1236 {
1237 /* scale the coverage from 0..(ONE_PIXEL*ONE_PIXEL*2) to 0..256 */
1238 coverage >>= PIXEL_BITS * 2 + 1 - 8;
1239 if ( coverage < 0 )
1240 coverage = -coverage - 1;
1241
1242 /* compute the line's coverage depending on the outline fill rule */
1243 if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
1244 {
1245 coverage &= 511;
1246
1247 if ( coverage >= 256 )
1248 coverage = 511 - coverage;
1249 }
1250 else
1251 {
1252 /* normal non-zero winding rule */
1253 if ( coverage >= 256 )
1254 coverage = 255;
1255 }
1256
1257 if ( ras.render_span ) /* for FT_RASTER_FLAG_DIRECT only */
1258 {
1259 FT_Span span;
1260
1261
1262 span.x = (short)x;
1263 span.len = (unsigned short)acount;
1264 span.coverage = (unsigned char)coverage;
1265
1266 ras.render_span( y, 1, &span, ras.render_span_data );
1267 }
1268 else
1269 {
1270 unsigned char* q = ras.target.origin - ras.target.pitch * y + x;
1271 unsigned char c = (unsigned char)coverage;
1272
1273
1274 /* For small-spans it is faster to do it by ourselves than
1275 * calling `memset'. This is mainly due to the cost of the
1276 * function call.
1277 */
1278 switch ( acount )
1279 {
1280 case 7: *q++ = c;
1281 case 6: *q++ = c;
1282 case 5: *q++ = c;
1283 case 4: *q++ = c;
1284 case 3: *q++ = c;
1285 case 2: *q++ = c;
1286 case 1: *q = c;
1287 case 0: break;
1288 default:
1289 FT_MEM_SET( q, c, acount );
1290 }
1291 }
1292 }
unsigned char
Definition: typeof.h:29
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define FT_MEM_SET(d, s, c)
Definition: ftgrays.c:291
#define FT_OUTLINE_EVEN_ODD_FILL
Definition: ftimage.h:430
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLenum GLenum GLvoid GLvoid GLvoid * span
Definition: glext.h:5664
#define c
Definition: ke_i.h:80

Referenced by gray_sweep().

◆ gray_line_to()

static int gray_line_to ( const FT_Vector to,
gray_PWorker  worker 
)
static

Definition at line 1202 of file ftgrays.c.

1204 {
1205 gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) );
1206 return 0;
1207 }
#define UPSCALE(x)
Definition: ftgrays.c:343
static void gray_render_line(RAS_ARG_ TPos to_x, TPos to_y)
Definition: ftgrays.c:702
FT_Pos x
Definition: ftimage.h:78
FT_Pos y
Definition: ftimage.h:79

◆ gray_move_to()

static int gray_move_to ( const FT_Vector to,
gray_PWorker  worker 
)
static

Definition at line 1183 of file ftgrays.c.

1185 {
1186 TPos x, y;
1187
1188
1189 /* start to a new position */
1190 x = UPSCALE( to->x );
1191 y = UPSCALE( to->y );
1192
1193 gray_set_cell( RAS_VAR_ TRUNC( x ), TRUNC( y ) );
1194
1195 ras.x = x;
1196 ras.y = y;
1197 return 0;
1198 }
long TPos
Definition: ftgrays.c:405
#define TRUNC(x)
Definition: ftgrays.c:336
static void gray_set_cell(RAS_ARG_ TCoord ex, TCoord ey)
Definition: ftgrays.c:567

◆ gray_raster_done()

static void gray_raster_done ( FT_Raster  raster)
static

Definition at line 1971 of file ftgrays.c.

1972 {
1974
1975
1976 FT_FREE( raster );
1977 }
#define FT_FREE(ptr)
Definition: ftmemory.h:328
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:65
static char memory[1024 *256]
Definition: process.c:116

◆ gray_raster_new()

static int gray_raster_new ( FT_Memory  memory,
FT_Raster araster 
)
static

Definition at line 1952 of file ftgrays.c.

1954 {
1956 gray_PRaster raster = NULL;
1957
1958
1959 *araster = 0;
1960 if ( !FT_ALLOC( raster, sizeof ( gray_TRaster ) ) )
1961 {
1962 raster->memory = memory;
1963 *araster = (FT_Raster)raster;
1964 }
1965
1966 return error;
1967 }
#define NULL
Definition: types.h:112
struct FT_RasterRec_ * FT_Raster
Definition: ftimage.h:821
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:302
int FT_Error
Definition: fttypes.h:299
void * memory
Definition: ftgrays.c:485

◆ gray_raster_render()

static int gray_raster_render ( FT_Raster  raster,
const FT_Raster_Params params 
)
static

Definition at line 1774 of file ftgrays.c.

1776 {
1777 const FT_Outline* outline = (const FT_Outline*)params->source;
1778 const FT_Bitmap* target_map = params->target;
1779 FT_BBox clip;
1780
1781#ifndef FT_STATIC_RASTER
1782#ifdef __REACTOS__
1783 gray_TWorker *worker;
1784#else
1785 gray_TWorker worker[1];
1786#endif
1787#endif
1788
1789
1790 if ( !raster )
1791 return FT_THROW( Invalid_Argument );
1792
1793 /* this version does not support monochrome rendering */
1794 if ( !( params->flags & FT_RASTER_FLAG_AA ) )
1795 return FT_THROW( Invalid_Mode );
1796
1797 if ( !outline )
1798 return FT_THROW( Invalid_Outline );
1799
1800 /* return immediately if the outline is empty */
1801 if ( outline->n_points == 0 || outline->n_contours <= 0 )
1802 return 0;
1803
1804 if ( !outline->contours || !outline->points )
1805 return FT_THROW( Invalid_Outline );
1806
1807 if ( outline->n_points !=
1808 outline->contours[outline->n_contours - 1] + 1 )
1809 return FT_THROW( Invalid_Outline );
1810
1811#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1812 worker = malloc(sizeof(*worker));
1813 if (!worker)
1814 return FT_THROW(Out_Of_Memory);
1815#endif /* !defined(FT_STATIC_RASTER) && defined(__REACTOS__) */
1816
1817 ras.outline = *outline;
1818
1819 if ( params->flags & FT_RASTER_FLAG_DIRECT )
1820 {
1821 if ( !params->gray_spans )
1822#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1823 {
1824 free(worker);
1825 return 0;
1826 }
1827#else
1828 return 0;
1829#endif
1830
1831 ras.render_span = (FT_Raster_Span_Func)params->gray_spans;
1832 ras.render_span_data = params->user;
1833 }
1834 else
1835 {
1836 /* if direct mode is not set, we must have a target bitmap */
1837 if ( !target_map )
1838#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1839 {
1840 free(worker);
1841 return FT_THROW( Invalid_Argument );
1842 }
1843#else
1844 return FT_THROW( Invalid_Argument );
1845#endif
1846
1847 /* nothing to do */
1848 if ( !target_map->width || !target_map->rows )
1849#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1850 {
1851 free(worker);
1852 return 0;
1853 }
1854#else
1855 return 0;
1856#endif
1857
1858 if ( !target_map->buffer )
1859#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1860 {
1861 free(worker);
1862 return FT_THROW( Invalid_Argument );
1863 }
1864#else
1865 return FT_THROW( Invalid_Argument );
1866#endif
1867
1868 if ( target_map->pitch < 0 )
1869 ras.target.origin = target_map->buffer;
1870 else
1871 ras.target.origin = target_map->buffer
1872 + ( target_map->rows - 1 ) * (unsigned int)target_map->pitch;
1873
1874 ras.target.pitch = target_map->pitch;
1875
1876 ras.render_span = (FT_Raster_Span_Func)NULL;
1877 ras.render_span_data = NULL;
1878 }
1879
1880 /* compute clipping box */
1881 if ( params->flags & FT_RASTER_FLAG_DIRECT &&
1882 params->flags & FT_RASTER_FLAG_CLIP )
1883 clip = params->clip_box;
1884 else
1885 {
1886 /* compute clip box from target pixmap */
1887 clip.xMin = 0;
1888 clip.yMin = 0;
1889 clip.xMax = (FT_Pos)target_map->width;
1890 clip.yMax = (FT_Pos)target_map->rows;
1891 }
1892
1893 /* clip to target bitmap, exit if nothing to do */
1894 ras.min_ex = clip.xMin;
1895 ras.min_ey = clip.yMin;
1896 ras.max_ex = clip.xMax;
1897 ras.max_ey = clip.yMax;
1898
1899 if ( ras.max_ex <= ras.min_ex || ras.max_ey <= ras.min_ey )
1900#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1901 {
1902 free(worker);
1903 return 0;
1904 }
1905#else
1906 return 0;
1907#endif
1908
1909#if !defined(FT_STATIC_RASTER) && defined(__REACTOS__)
1910 {
1912 free(worker);
1913 return error;
1914 }
1915#else
1916 return gray_convert_glyph( RAS_VAR );
1917#endif
1918 }
#define FT_THROW(e)
Definition: ftdebug.h:241
static int gray_convert_glyph(RAS_ARG)
Definition: ftgrays.c:1667
#define FT_RASTER_FLAG_AA
Definition: ftimage.h:963
#define FT_Raster_Span_Func
Definition: ftimage.h:896
#define FT_RASTER_FLAG_CLIP
Definition: ftimage.h:965
#define FT_RASTER_FLAG_DIRECT
Definition: ftimage.h:964
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:58
GLenum const GLfloat * params
Definition: glext.h:5645
if(dx< 0)
Definition: linetemp.h:194
Definition: mesh.c:5330

◆ gray_raster_reset()

static void gray_raster_reset ( FT_Raster  raster,
unsigned char pool_base,
unsigned long  pool_size 
)
static

Definition at line 1983 of file ftgrays.c.

1986 {
1987 FT_UNUSED( raster );
1988 FT_UNUSED( pool_base );
1989 FT_UNUSED( pool_size );
1990 }
#define FT_UNUSED(arg)
Definition: ftconfig.h:100

◆ gray_raster_set_mode()

static int gray_raster_set_mode ( FT_Raster  raster,
unsigned long  mode,
void args 
)
static

Definition at line 1994 of file ftgrays.c.

1997 {
1998 FT_UNUSED( raster );
1999 FT_UNUSED( mode );
2000 FT_UNUSED( args );
2001
2002
2003 return 0; /* nothing to do */
2004 }
GLenum mode
Definition: glext.h:6217
Definition: match.c:390

◆ gray_record_cell()

static void gray_record_cell ( RAS_ARG  )
static

Definition at line 522 of file ftgrays.c.

523 {
524 PCell *pcell, cell;
525 TCoord x = ras.ex;
526
527
528 pcell = &ras.ycells[ras.ey - ras.min_ey];
529 for (;;)
530 {
531 cell = *pcell;
532 if ( !cell || cell->x > x )
533 break;
534
535 if ( cell->x == x )
536 goto Found;
537
538 pcell = &cell->next;
539 }
540
541 if ( ras.num_cells >= ras.max_cells )
542 ft_longjmp( ras.jump_buffer, 1 );
543
544 /* insert new cell */
545 cell = ras.cells + ras.num_cells++;
546 cell->x = x;
547 cell->area = ras.area;
548 cell->cover = ras.cover;
549
550 cell->next = *pcell;
551 *pcell = cell;
552
553 return;
554
555 Found:
556 /* update old cell */
557 cell->area += ras.area;
558 cell->cover += ras.cover;
559 }
return Found
Definition: dirsup.c:1270
#define ft_longjmp
Definition: ftstdlib.h:162
TCoord cover
Definition: ftgrays.c:415
PCell next
Definition: ftgrays.c:417
TCoord x
Definition: ftgrays.c:414
TArea area
Definition: ftgrays.c:416

Referenced by gray_set_cell(), and if().

◆ gray_render_conic()

static void gray_render_conic ( RAS_ARG_ const FT_Vector control,
const FT_Vector to 
)
static

Definition at line 996 of file ftgrays.c.

998 {
999 FT_Vector bez_stack[16 * 2 + 1]; /* enough to accommodate bisections */
1000 FT_Vector* arc = bez_stack;
1001 TPos dx, dy;
1002 int draw, split;
1003
1004
1005 arc[0].x = UPSCALE( to->x );
1006 arc[0].y = UPSCALE( to->y );
1007 arc[1].x = UPSCALE( control->x );
1008 arc[1].y = UPSCALE( control->y );
1009 arc[2].x = ras.x;
1010 arc[2].y = ras.y;
1011
1012 /* short-cut the arc that crosses the current band */
1013 if ( ( TRUNC( arc[0].y ) >= ras.max_ey &&
1014 TRUNC( arc[1].y ) >= ras.max_ey &&
1015 TRUNC( arc[2].y ) >= ras.max_ey ) ||
1016 ( TRUNC( arc[0].y ) < ras.min_ey &&
1017 TRUNC( arc[1].y ) < ras.min_ey &&
1018 TRUNC( arc[2].y ) < ras.min_ey ) )
1019 {
1020 ras.x = arc[0].x;
1021 ras.y = arc[0].y;
1022 return;
1023 }
1024
1025 dx = FT_ABS( arc[2].x + arc[0].x - 2 * arc[1].x );
1026 dy = FT_ABS( arc[2].y + arc[0].y - 2 * arc[1].y );
1027 if ( dx < dy )
1028 dx = dy;
1029
1030 /* We can calculate the number of necessary bisections because */
1031 /* each bisection predictably reduces deviation exactly 4-fold. */
1032 /* Even 32-bit deviation would vanish after 16 bisections. */
1033 draw = 1;
1034 while ( dx > ONE_PIXEL / 4 )
1035 {
1036 dx >>= 2;
1037 draw <<= 1;
1038 }
1039
1040 /* We use decrement counter to count the total number of segments */
1041 /* to draw starting from 2^level. Before each draw we split as */
1042 /* many times as there are trailing zeros in the counter. */
1043 do
1044 {
1045 split = 1;
1046 while ( ( draw & split ) == 0 )
1047 {
1048 gray_split_conic( arc );
1049 arc += 2;
1050 split <<= 1;
1051 }
1052
1053 gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
1054 arc -= 2;
1055
1056 } while ( --draw );
1057 }
static LPSTR * split(LPSTR s, LPINT args)
Definition: cmdcons.c:163
static void gray_split_conic(FT_Vector *base)
Definition: ftgrays.c:976
#define ONE_PIXEL
Definition: ftgrays.c:335
#define FT_ABS(a)
Definition: ftobjs.h:73
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97

Referenced by gray_conic_to().

◆ gray_render_cubic()

static void gray_render_cubic ( RAS_ARG_ const FT_Vector control1,
const FT_Vector control2,
const FT_Vector to 
)
static

Definition at line 1089 of file ftgrays.c.

1092 {
1093 FT_Vector bez_stack[16 * 3 + 1]; /* enough to accommodate bisections */
1094 FT_Vector* arc = bez_stack;
1095 TPos dx, dy, dx_, dy_;
1096 TPos dx1, dy1, dx2, dy2;
1097 TPos L, s, s_limit;
1098
1099
1100 arc[0].x = UPSCALE( to->x );
1101 arc[0].y = UPSCALE( to->y );
1102 arc[1].x = UPSCALE( control2->x );
1103 arc[1].y = UPSCALE( control2->y );
1104 arc[2].x = UPSCALE( control1->x );
1105 arc[2].y = UPSCALE( control1->y );
1106 arc[3].x = ras.x;
1107 arc[3].y = ras.y;
1108
1109 /* short-cut the arc that crosses the current band */
1110 if ( ( TRUNC( arc[0].y ) >= ras.max_ey &&
1111 TRUNC( arc[1].y ) >= ras.max_ey &&
1112 TRUNC( arc[2].y ) >= ras.max_ey &&
1113 TRUNC( arc[3].y ) >= ras.max_ey ) ||
1114 ( TRUNC( arc[0].y ) < ras.min_ey &&
1115 TRUNC( arc[1].y ) < ras.min_ey &&
1116 TRUNC( arc[2].y ) < ras.min_ey &&
1117 TRUNC( arc[3].y ) < ras.min_ey ) )
1118 {
1119 ras.x = arc[0].x;
1120 ras.y = arc[0].y;
1121 return;
1122 }
1123
1124 for (;;)
1125 {
1126 /* Decide whether to split or draw. See `Rapid Termination */
1127 /* Evaluation for Recursive Subdivision of Bezier Curves' by Thomas */
1128 /* F. Hain, at */
1129 /* http://www.cis.southalabama.edu/~hain/general/Publications/Bezier/Camera-ready%20CISST02%202.pdf */
1130
1131 /* dx and dy are x and y components of the P0-P3 chord vector. */
1132 dx = dx_ = arc[3].x - arc[0].x;
1133 dy = dy_ = arc[3].y - arc[0].y;
1134
1135 L = FT_HYPOT( dx_, dy_ );
1136
1137 /* Avoid possible arithmetic overflow below by splitting. */
1138 if ( L > 32767 )
1139 goto Split;
1140
1141 /* Max deviation may be as much as (s/L) * 3/4 (if Hain's v = 1). */
1142 s_limit = L * (TPos)( ONE_PIXEL / 6 );
1143
1144 /* s is L * the perpendicular distance from P1 to the line P0-P3. */
1145 dx1 = arc[1].x - arc[0].x;
1146 dy1 = arc[1].y - arc[0].y;
1147 s = FT_ABS( SUB_LONG( MUL_LONG( dy, dx1 ), MUL_LONG( dx, dy1 ) ) );
1148
1149 if ( s > s_limit )
1150 goto Split;
1151
1152 /* s is L * the perpendicular distance from P2 to the line P0-P3. */
1153 dx2 = arc[2].x - arc[0].x;
1154 dy2 = arc[2].y - arc[0].y;
1155 s = FT_ABS( SUB_LONG( MUL_LONG( dy, dx2 ), MUL_LONG( dx, dy2 ) ) );
1156
1157 if ( s > s_limit )
1158 goto Split;
1159
1160 /* Split super curvy segments where the off points are so far
1161 from the chord that the angles P0-P1-P3 or P0-P2-P3 become
1162 acute as detected by appropriate dot products. */
1163 if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 ||
1164 dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 )
1165 goto Split;
1166
1167 gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
1168
1169 if ( arc == bez_stack )
1170 return;
1171
1172 arc -= 3;
1173 continue;
1174
1175 Split:
1176 gray_split_cubic( arc );
1177 arc += 3;
1178 }
1179 }
#define MUL_LONG(a, b)
Definition: ftcalc.h:477
#define SUB_LONG(a, b)
Definition: ftcalc.h:475
static void gray_split_cubic(FT_Vector *base)
Definition: ftgrays.c:1061
#define FT_HYPOT(x, y)
Definition: ftobjs.h:80
GLdouble s
Definition: gl.h:2039
#define L(x)
Definition: ntvdm.h:50

Referenced by gray_cubic_to().

◆ gray_render_line()

static void gray_render_line ( RAS_ARG_ TPos  to_x,
TPos  to_y 
)
static

Definition at line 702 of file ftgrays.c.

704 {
705 TCoord ey1, ey2, fy1, fy2, first, delta, mod;
706 TPos p, dx, dy, x, x2;
707 int incr;
708
709
710 ey1 = TRUNC( ras.y );
711 ey2 = TRUNC( to_y ); /* if (ey2 >= ras.max_ey) ey2 = ras.max_ey-1; */
712
713 /* perform vertical clipping */
714 if ( ( ey1 >= ras.max_ey && ey2 >= ras.max_ey ) ||
715 ( ey1 < ras.min_ey && ey2 < ras.min_ey ) )
716 goto End;
717
718 fy1 = (TCoord)( ras.y - SUBPIXELS( ey1 ) );
719 fy2 = (TCoord)( to_y - SUBPIXELS( ey2 ) );
720
721 /* everything is on a single scanline */
722 if ( ey1 == ey2 )
723 {
724 gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, to_x, fy2 );
725 goto End;
726 }
727
728 dx = to_x - ras.x;
729 dy = to_y - ras.y;
730
731 /* vertical line - avoid calling gray_render_scanline */
732 if ( dx == 0 )
733 {
734 TCoord ex = TRUNC( ras.x );
735 TCoord two_fx = (TCoord)( ( ras.x - SUBPIXELS( ex ) ) << 1 );
736 TArea area;
737
738
739 if ( dy > 0)
740 {
742 incr = 1;
743 }
744 else
745 {
746 first = 0;
747 incr = -1;
748 }
749
750 delta = first - fy1;
751 ras.area += (TArea)two_fx * delta;
752 ras.cover += delta;
753 ey1 += incr;
754
755 gray_set_cell( RAS_VAR_ ex, ey1 );
756
757 delta = first + first - ONE_PIXEL;
758 area = (TArea)two_fx * delta;
759 while ( ey1 != ey2 )
760 {
761 ras.area += area;
762 ras.cover += delta;
763 ey1 += incr;
764
765 gray_set_cell( RAS_VAR_ ex, ey1 );
766 }
767
768 delta = fy2 - ONE_PIXEL + first;
769 ras.area += (TArea)two_fx * delta;
770 ras.cover += delta;
771
772 goto End;
773 }
774
775 /* ok, we have to render several scanlines */
776 if ( dy > 0)
777 {
778 p = ( ONE_PIXEL - fy1 ) * dx;
780 incr = 1;
781 }
782 else
783 {
784 p = fy1 * dx;
785 first = 0;
786 incr = -1;
787 dy = -dy;
788 }
789
790 FT_DIV_MOD( TCoord, p, dy, delta, mod );
791
792 x = ras.x + delta;
793 gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, x, first );
794
795 ey1 += incr;
796 gray_set_cell( RAS_VAR_ TRUNC( x ), ey1 );
797
798 if ( ey1 != ey2 )
799 {
800 TCoord lift, rem;
801
802
803 p = ONE_PIXEL * dx;
804 FT_DIV_MOD( TCoord, p, dy, lift, rem );
805
806 do
807 {
808 delta = lift;
809 mod += rem;
810 if ( mod >= (TCoord)dy )
811 {
812 mod -= (TCoord)dy;
813 delta++;
814 }
815
816 x2 = x + delta;
818 x, ONE_PIXEL - first,
819 x2, first );
820 x = x2;
821
822 ey1 += incr;
823 gray_set_cell( RAS_VAR_ TRUNC( x ), ey1 );
824 } while ( ey1 != ey2 );
825 }
826
828 x, ONE_PIXEL - first,
829 to_x, fy2 );
830
831 End:
832 ras.x = to_x;
833 ras.y = to_y;
834 }
std::map< E_MODULE, HMODULE > mod
Definition: LocaleTests.cpp:66
int TArea
Definition: ftgrays.c:407
#define SUBPIXELS(x)
Definition: ftgrays.c:337
static void gray_render_scanline(RAS_ARG_ TCoord ey, TPos x1, TCoord y1, TPos x2, TCoord y2)
Definition: ftgrays.c:604
#define FT_DIV_MOD(type, dividend, divisor, quotient, remainder)
Definition: ftgrays.c:355
const GLint * first
Definition: glext.h:5794
GLfloat GLfloat p
Definition: glext.h:8902
static Real area(Real A[2], Real B[2], Real C[2])
Definition: polyDBG.cc:50
Definition: comerr.c:44
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710

Referenced by gray_line_to(), gray_render_conic(), and gray_render_cubic().

◆ gray_render_scanline()

static void gray_render_scanline ( RAS_ARG_ TCoord  ey,
TPos  x1,
TCoord  y1,
TPos  x2,
TCoord  y2 
)
static

Definition at line 604 of file ftgrays.c.

609 {
610 TCoord ex1, ex2, fx1, fx2, first, dy, delta, mod;
611 TPos p, dx;
612 int incr;
613
614
615 ex1 = TRUNC( x1 );
616 ex2 = TRUNC( x2 );
617
618 /* trivial case. Happens often */
619 if ( y1 == y2 )
620 {
621 gray_set_cell( RAS_VAR_ ex2, ey );
622 return;
623 }
624
625 fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) );
626 fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) );
627
628 /* everything is located in a single cell. That is easy! */
629 /* */
630 if ( ex1 == ex2 )
631 goto End;
632
633 /* ok, we'll have to render a run of adjacent cells on the same */
634 /* scanline... */
635 /* */
636 dx = x2 - x1;
637 dy = y2 - y1;
638
639 if ( dx > 0 )
640 {
641 p = ( ONE_PIXEL - fx1 ) * dy;
643 incr = 1;
644 }
645 else
646 {
647 p = fx1 * dy;
648 first = 0;
649 incr = -1;
650 dx = -dx;
651 }
652
653 FT_DIV_MOD( TCoord, p, dx, delta, mod );
654
655 ras.area += (TArea)( ( fx1 + first ) * delta );
656 ras.cover += delta;
657 y1 += delta;
658 ex1 += incr;
659 gray_set_cell( RAS_VAR_ ex1, ey );
660
661 if ( ex1 != ex2 )
662 {
663 TCoord lift, rem;
664
665
666 p = ONE_PIXEL * dy;
667 FT_DIV_MOD( TCoord, p, dx, lift, rem );
668
669 do
670 {
671 delta = lift;
672 mod += rem;
673 if ( mod >= (TCoord)dx )
674 {
675 mod -= (TCoord)dx;
676 delta++;
677 }
678
679 ras.area += (TArea)( ONE_PIXEL * delta );
680 ras.cover += delta;
681 y1 += delta;
682 ex1 += incr;
683 gray_set_cell( RAS_VAR_ ex1, ey );
684 } while ( ex1 != ex2 );
685 }
686
687 fx1 = ONE_PIXEL - first;
688
689 End:
690 dy = y2 - y1;
691
692 ras.area += (TArea)( ( fx1 + fx2 ) * dy );
693 ras.cover += dy;
694 }
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711

Referenced by gray_render_line().

◆ gray_set_cell()

static void gray_set_cell ( RAS_ARG_ TCoord  ex,
TCoord  ey 
)
static

Definition at line 567 of file ftgrays.c.

569 {
570 /* Move the cell pointer to a new position. We set the `invalid' */
571 /* flag to indicate that the cell isn't part of those we're interested */
572 /* in during the render phase. This means that: */
573 /* */
574 /* . the new vertical position must be within min_ey..max_ey-1. */
575 /* . the new horizontal position must be strictly less than max_ex */
576 /* */
577 /* Note that if a cell is to the left of the clipping region, it is */
578 /* actually set to the (min_ex-1) horizontal position. */
579
580 if ( ex < ras.min_ex )
581 ex = ras.min_ex - 1;
582
583 /* record the current one if it is valid and substantial */
584 if ( !ras.invalid && ( ras.area || ras.cover ) )
586
587 ras.area = 0;
588 ras.cover = 0;
589 ras.ex = ex;
590 ras.ey = ey;
591
592 ras.invalid = ( ey >= ras.max_ey || ey < ras.min_ey ||
593 ex >= ras.max_ex );
594 }
static void gray_record_cell(RAS_ARG)
Definition: ftgrays.c:522

Referenced by gray_move_to(), gray_render_line(), and gray_render_scanline().

◆ gray_split_conic()

static void gray_split_conic ( FT_Vector base)
static

Definition at line 976 of file ftgrays.c.

977 {
978 TPos a, b;
979
980
981 base[4].x = base[2].x;
982 b = base[1].x;
983 a = base[3].x = ( base[2].x + b ) / 2;
984 b = base[1].x = ( base[0].x + b ) / 2;
985 base[2].x = ( a + b ) / 2;
986
987 base[4].y = base[2].y;
988 b = base[1].y;
989 a = base[3].y = ( base[2].y + b ) / 2;
990 b = base[1].y = ( base[0].y + b ) / 2;
991 base[2].y = ( a + b ) / 2;
992 }
#define a
Definition: ke_i.h:78

Referenced by gray_render_conic().

◆ gray_split_cubic()

static void gray_split_cubic ( FT_Vector base)
static

Definition at line 1061 of file ftgrays.c.

1062 {
1063 TPos a, b, c, d;
1064
1065
1066 base[6].x = base[3].x;
1067 c = base[1].x;
1068 d = base[2].x;
1069 base[1].x = a = ( base[0].x + c ) / 2;
1070 base[5].x = b = ( base[3].x + d ) / 2;
1071 c = ( c + d ) / 2;
1072 base[2].x = a = ( a + c ) / 2;
1073 base[4].x = b = ( b + c ) / 2;
1074 base[3].x = ( a + b ) / 2;
1075
1076 base[6].y = base[3].y;
1077 c = base[1].y;
1078 d = base[2].y;
1079 base[1].y = a = ( base[0].y + c ) / 2;
1080 base[5].y = b = ( base[3].y + d ) / 2;
1081 c = ( c + d ) / 2;
1082 base[2].y = a = ( a + c ) / 2;
1083 base[4].y = b = ( b + c ) / 2;
1084 base[3].y = ( a + b ) / 2;
1085 }
#define d
Definition: ke_i.h:81

Referenced by gray_render_cubic().

◆ gray_sweep()

static void gray_sweep ( RAS_ARG  )
static

Definition at line 1296 of file ftgrays.c.

1297 {
1298 int y;
1299
1300
1301 for ( y = ras.min_ey; y < ras.max_ey; y++ )
1302 {
1303 PCell cell = ras.ycells[y - ras.min_ey];
1304 TCoord x = ras.min_ex;
1305 TArea cover = 0;
1306 TArea area;
1307
1308
1309 for ( ; cell != NULL; cell = cell->next )
1310 {
1311 if ( cover != 0 && cell->x > x )
1312 gray_hline( RAS_VAR_ x, y, cover, cell->x - x );
1313
1314 cover += (TArea)cell->cover * ( ONE_PIXEL * 2 );
1315 area = cover - cell->area;
1316
1317 if ( area != 0 && cell->x >= ras.min_ex )
1318 gray_hline( RAS_VAR_ cell->x, y, area, 1 );
1319
1320 x = cell->x + 1;
1321 }
1322
1323 if ( cover != 0 )
1324 gray_hline( RAS_VAR_ x, y, cover, ras.max_ex - x );
1325 }
1326 }
static void gray_hline(RAS_ARG_ TCoord x, TCoord y, TArea coverage, TCoord acount)
Definition: ftgrays.c:1232

Referenced by gray_convert_glyph().

◆ if()

if ( ft_setjmp(ras.jump_buffer)  = = 0)

Definition at line 1637 of file ftgrays.c.

1638 {
1639 if ( continued )
1641 error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
1642 if ( continued )
1644
1645 if ( !ras.invalid )
1647
1648 FT_TRACE7(( "band [%d..%d]: %d cell%s\n",
1649 ras.min_ey,
1650 ras.max_ey,
1651 ras.num_cells,
1652 ras.num_cells == 1 ? "" : "s" ));
1653 }
FT_Trace_Disable(void)
Definition: ftdebug.c:305
FT_Trace_Enable(void)
Definition: ftdebug.c:314
FT_BEGIN_HEADER FT_Outline_Decompose(FT_Outline *outline, const FT_Outline_Funcs *func_interface, void *user)
Definition: ftoutln.c:44

Variable Documentation

◆ continued

int continued
Initial value:
{
volatile int error = 0

Definition at line 1632 of file ftgrays.c.

Referenced by gray_convert_glyph(), and if().

◆ else

else
Initial value:
{
error = FT_THROW( Memory_Overflow )

Definition at line 1654 of file ftgrays.c.

◆ error

return error

Definition at line 1662 of file ftgrays.c.

Referenced by gray_convert_glyph(), gray_raster_new(), gray_raster_render(), and if().