#include <ft2build.h>
#include "ftgrays.h"
#include "ftsmerrs.h"
#include "ftspic.h"
Go to the source code of this file.
Classes | |
struct | TCell_ |
struct | TWorker_ |
struct | TRaster_ |
struct | TBand_ |
Defines | |
#define | FT_COMPONENT trace_smooth |
#define | ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph |
#define | ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline |
#define | ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory |
#define | ErrRaster_Invalid_Argument Smooth_Err_Invalid_Argument |
#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 | RAS_ARG PWorker worker |
#define | RAS_ARG_ PWorker worker, |
#define | RAS_VAR worker |
#define | RAS_VAR_ worker, |
#define | PIXEL_BITS 8 |
#define | ONE_PIXEL ( 1L << PIXEL_BITS ) |
#define | PIXEL_MASK ( -1L << PIXEL_BITS ) |
#define | TRUNC(x) ( (TCoord)( (x) >> PIXEL_BITS ) ) |
#define | SUBPIXELS(x) ( (TPos)(x) << PIXEL_BITS ) |
#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) << ( PIXEL_BITS - 6 ) ) |
#define | DOWNSCALE(x) ( (x) >> ( PIXEL_BITS - 6 ) ) |
#define | FT_MAX_GRAY_SPANS 32 |
#define | ras (*worker) |
Typedefs | |
typedef long | TCoord |
typedef long | TPos |
typedef int | TArea |
typedef TCell_ * | PCell |
typedef TCell_ | TCell |
typedef TWorker_ | TWorker |
typedef TWorker_ * | PWorker |
typedef TRaster_ | TRaster |
typedef TRaster_ * | PRaster |
typedef TBand_ | TBand |
Functions | |
static void | gray_init_cells (RAS_ARG_ void *buffer, long byte_size) |
static void | gray_compute_cbox (RAS_ARG) |
static PCell | gray_find_cell (RAS_ARG) |
static void | gray_record_cell (RAS_ARG) |
static void | gray_set_cell (RAS_ARG_ TCoord ex, TCoord ey) |
static void | gray_start_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, PWorker worker) |
static int | gray_line_to (const FT_Vector *to, PWorker worker) |
static int | gray_conic_to (const FT_Vector *control, const FT_Vector *to, PWorker worker) |
static int | gray_cubic_to (const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to, PWorker worker) |
static void | gray_render_span (int y, int count, const FT_Span *spans, PWorker worker) |
static void | gray_hline (RAS_ARG_ TCoord x, TCoord y, TPos area, TCoord acount) |
static void | gray_sweep (RAS_ARG_ const FT_Bitmap *target) |
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) | |
static int | gray_convert_glyph (RAS_ARG) |
static int | gray_raster_render (PRaster 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, char *pool_base, long pool_size) |
Definition at line 262 of file ftgrays.c.
Referenced by gray_render_conic(), and gray_render_cubic().
#define ErrRaster_Invalid_Argument Smooth_Err_Invalid_Argument |
#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph |
#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline |
#define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory |
Definition at line 216 of file ftgrays.c.
Referenced by FT_DEFINE_OUTLINE_FUNCS(), and gray_convert_glyph().
#define FT_MAX_GRAY_SPANS 32 |
#define ONE_PIXEL ( 1L << PIXEL_BITS ) |
Definition at line 252 of file ftgrays.c.
Referenced by gray_render_line(), gray_render_scanline(), and gray_sweep().
#define PIXEL_BITS 8 |
#define RAS_VAR_ worker, |
Definition at line 237 of file ftgrays.c.
Referenced by gray_conic_to(), gray_convert_glyph(), gray_cubic_to(), gray_line_to(), gray_move_to(), gray_raster_render(), gray_render_conic(), gray_render_cubic(), gray_render_line(), gray_render_scanline(), gray_start_cell(), and gray_sweep().
Definition at line 255 of file ftgrays.c.
Referenced by gray_render_line(), gray_render_scanline(), and gray_start_cell().
Definition at line 261 of file ftgrays.c.
Referenced by gray_line_to(), gray_move_to(), gray_render_conic(), and gray_render_cubic().
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 | ||||
) |
Definition at line 1701 of file ftgrays.c.
References ErrRaster_Memory_Overflow, FT_Outline_Decompose(), ft_setjmp, gray_record_cell(), ras, and RAS_VAR.
static void gray_compute_cbox | ( | RAS_ARG | ) | [static] |
Definition at line 412 of file ftgrays.c.
References if(), FT_Outline_::n_points, FT_Outline_::points, ras, FT_Vector_::x, x, FT_Vector_::y, and y.
Referenced by gray_convert_glyph().
static int gray_convert_glyph | ( | RAS_ARG | ) | [static] |
Definition at line 1734 of file ftgrays.c.
References clip(), ErrRaster_Memory_Overflow, for(), FT_TRACE7, gray_compute_cbox(), gray_sweep(), if(), int, level, max, TBand_::max, TBand_::min, min, NULL, ras, RAS_VAR, RAS_VAR_, sizeof(), and top().
Referenced by gray_raster_render().
static PCell gray_find_cell | ( | RAS_ARG | ) | [static] |
Definition at line 456 of file ftgrays.c.
References TCell_::area, TCell_::cover, ft_longjmp, if(), TCell_::next, NULL, ras, TCell_::x, and x.
Referenced by gray_record_cell().
Definition at line 1231 of file ftgrays.c.
References FT_INT_MAX, FT_MAX_GRAY_SPANS, FT_OUTLINE_EVEN_ODD_FILL, FT_TRACE7, int, n, PIXEL_BITS, ras, and short.
Referenced by gray_sweep().
static void gray_init_cells | ( | RAS_ARG_ void * | buffer, | |
long | byte_size | |||
) | [static] |
Definition at line 1150 of file ftgrays.c.
References gray_render_line(), RAS_VAR_, UPSCALE, FT_Vector_::x, and FT_Vector_::y.
Definition at line 1128 of file ftgrays.c.
References gray_record_cell(), gray_start_cell(), RAS_VAR, RAS_VAR_, TRUNC, UPSCALE, FT_Vector_::x, TWorker_::x, x, FT_Vector_::y, TWorker_::y, and y.
static void gray_raster_done | ( | FT_Raster | raster | ) | [static] |
static int gray_raster_render | ( | PRaster | raster, | |
const FT_Raster_Params * | params | |||
) | [static] |
Definition at line 1890 of file ftgrays.c.
References TRaster_::band_size, TRaster_::buffer, TRaster_::buffer_size, FT_Outline_::contours, ErrRaster_Invalid_Argument, ErrRaster_Invalid_Mode, ErrRaster_Invalid_Outline, FT_RASTER_FLAG_AA, FT_RASTER_FLAG_CLIP, FT_RASTER_FLAG_DIRECT, FT_Raster_Span_Func, gray_convert_glyph(), gray_init_cells(), gray_render_span(), if(), RooFitShortHand::L(), FT_Outline_::n_contours, FT_Outline_::n_points, params, FT_Outline_::points, ras, RAS_VAR, RAS_VAR_, and TRaster_::worker.
Definition at line 2040 of file ftgrays.c.
References TRaster_::band_size, TRaster_::buffer, TRaster_::buffer_size, int, long, NULL, sizeof(), and TRaster_::worker.
static void gray_record_cell | ( | RAS_ARG | ) | [static] |
Definition at line 495 of file ftgrays.c.
References TCell_::area, TCell_::cover, gray_find_cell(), ras, and RAS_VAR.
Referenced by FT_DEFINE_OUTLINE_FUNCS(), gray_move_to(), and gray_set_cell().
Definition at line 869 of file ftgrays.c.
References DOWNSCALE, Draw(), gray_render_line(), gray_split_conic(), level, max, min, ras, RAS_VAR_, top(), TRUNC, UPSCALE, FT_Vector_::x, FT_Vector_::y, and y.
Referenced by gray_conic_to().
static void gray_render_cubic | ( | RAS_ARG_ const FT_Vector * | control1, | |
const FT_Vector * | control2, | |||
const FT_Vector * | to | |||
) | [static] |
Definition at line 1006 of file ftgrays.c.
References DOWNSCALE, Draw(), gray_render_line(), gray_split_cubic(), level, max, min, ras, RAS_VAR_, top(), TRUNC, UPSCALE, FT_Vector_::x, FT_Vector_::y, and y.
Referenced by gray_cubic_to().
Definition at line 692 of file ftgrays.c.
References Rgl::Pad::End(), gray_render_scanline(), gray_set_cell(), int, max, min, ONE_PIXEL, p, ras, RAS_VAR_, SUBPIXELS, TRUNC, x, and x2.
Referenced by gray_line_to(), gray_render_conic(), and gray_render_cubic().
Definition at line 1180 of file ftgrays.c.
References FT_Bitmap_::buffer, FT_Span_::coverage, for(), FT_MEM_SET, if(), FT_Span_::len, p, FT_Bitmap_::pitch, FT_Bitmap_::rows, TWorker_::target, and FT_Span_::x.
Referenced by gray_raster_render().
Definition at line 513 of file ftgrays.c.
References gray_record_cell(), ras, and RAS_VAR.
Referenced by gray_render_line(), gray_render_scanline(), and gray_start_cell().
static void gray_split_conic | ( | FT_Vector * | base | ) | [static] |
Definition at line 849 of file ftgrays.c.
References a, b, FT_Vector_::x, and FT_Vector_::y.
Referenced by gray_render_conic().
static void gray_split_cubic | ( | FT_Vector * | base | ) | [static] |
Definition at line 978 of file ftgrays.c.
References a, b, c, d, FT_Vector_::x, and FT_Vector_::y.
Referenced by gray_render_cubic().
Definition at line 560 of file ftgrays.c.
References gray_set_cell(), ras, RAS_VAR_, and SUBPIXELS.
Referenced by gray_move_to().
static void gray_sweep | ( | RAS_ARG_ const FT_Bitmap * | target | ) | [static] |