GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
ftgrays.c File Reference
#include "rast_soft.h"
#include <limits.h>
+ Include dependency graph for ftgrays.c:

Data Structures

struct  AACell
 
struct  AAScanline
 
struct  TRaster
 

Macros

#define ErrRaster_MemoryOverflow   -4
 
#define ErrRaster_Invalid_Mode   -2
 
#define ErrRaster_Invalid_Outline   -1
 
#define GPAC_FIX_BITS   16
 
#define PIXEL_BITS   8
 
#define PIXEL_BITS_DIFF   8 /*GPAC_FIX_BITS - PIXEL_BITS*/
 
#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_DIFF) )
 
#define DOWNSCALE(x)   ( (x) << ( PIXEL_BITS_DIFF) )
 
#define FT_MAX_GRAY_SPANS   64
 
#define AA_CELL_STEP_ALLOC   8
 
#define SWAP_CELLS(a, b, temp)
 
#define QSORT_THRESHOLD   9 /* below this size, a sub-array will be sorted */
 

Typedefs

typedef int TCoord
 
typedef long TPos
 
typedef int TArea
 

Functions

static void gray_record_cell (TRaster *raster)
 
static void gray_set_cell (TRaster *raster, TCoord ex, TCoord ey)
 
static void evg_translate_point (GF_Matrix2D *mx, EVG_Vector *pt, TPos *x, TPos *y)
 
static int gray_move_to (EVG_Vector *to, EVG_Raster raster)
 
static void gray_render_scanline (TRaster *raster, TCoord ey, TPos x1, TCoord y1, TPos x2, TCoord y2)
 
static void gray_render_line (TRaster *raster, TPos to_x, TPos to_y, int is_line)
 
static int EVG_Outline_Decompose (EVG_Outline *outline, TRaster *user)
 
static void gray_quick_sort (AACell *cells, int count)
 
static void gray_hline (TRaster *raster, TCoord x, TCoord y, TPos area, int acount, Bool zero_non_zero_rule)
 
static void gray_sweep_line (TRaster *raster, AAScanline *sl, int y, Bool zero_non_zero_rule)
 
int evg_raster_render (EVG_Raster raster, EVG_Raster_Params *params)
 
EVG_Raster evg_raster_new ()
 
void evg_raster_del (EVG_Raster raster)
 

Data Structure Documentation

struct AACell
+ Collaboration diagram for AACell:
Data Fields
TCoord x
int cover
TArea area
struct AAScanline
+ Collaboration diagram for AAScanline:
Data Fields
AACell * cells
int alloc
int num
struct TRaster
+ Collaboration diagram for TRaster:
Data Fields
AAScanline * scanlines
int max_lines
TPos min_ex
TPos max_ex
TPos min_ey
TPos max_ey
TCoord ex
TCoord ey
TPos x
TPos y
TPos last_ey
TArea area
int cover
EVG_Span gray_spans[64]
int num_gray_spans
EVG_SpanFunc render_span
void * render_span_data
GF_Matrix2D * mx

Macro Definition Documentation

#define ErrRaster_MemoryOverflow   -4
#define ErrRaster_Invalid_Mode   -2
#define ErrRaster_Invalid_Outline   -1
#define GPAC_FIX_BITS   16
#define PIXEL_BITS   8
#define PIXEL_BITS_DIFF   8 /*GPAC_FIX_BITS - PIXEL_BITS*/
#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_DIFF) )
#define DOWNSCALE (   x)    ( (x) << ( PIXEL_BITS_DIFF) )
#define FT_MAX_GRAY_SPANS   64
#define AA_CELL_STEP_ALLOC   8
#define SWAP_CELLS (   a,
  b,
  temp 
)
Value:
{ \
temp = *(a); \
*(a) = *(b); \
*(b) = temp; \
}
#define QSORT_THRESHOLD   9 /* below this size, a sub-array will be sorted */

Typedef Documentation

typedef int TCoord
typedef long TPos
typedef int TArea

Function Documentation

static void gray_record_cell ( TRaster raster)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gray_set_cell ( TRaster raster,
TCoord  ex,
TCoord  ey 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void evg_translate_point ( GF_Matrix2D mx,
EVG_Vector pt,
TPos x,
TPos y 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int gray_move_to ( EVG_Vector to,
EVG_Raster  raster 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gray_render_line ( TRaster raster,
TPos  to_x,
TPos  to_y,
int  is_line 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int EVG_Outline_Decompose ( EVG_Outline outline,
TRaster user 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gray_quick_sort ( AACell cells,
int  count 
)
static

+ Here is the caller graph for this function:

static void gray_hline ( TRaster raster,
TCoord  x,
TCoord  y,
TPos  area,
int  acount,
Bool  zero_non_zero_rule 
)
static

+ Here is the caller graph for this function:

static void gray_sweep_line ( TRaster raster,
AAScanline sl,
int  y,
Bool  zero_non_zero_rule 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int evg_raster_render ( EVG_Raster  raster,
EVG_Raster_Params params 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EVG_Raster evg_raster_new ( )

+ Here is the caller graph for this function:

void evg_raster_del ( EVG_Raster  raster)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: