Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Typedefs | Enumerations | Functions
ftraster.c File Reference
#include <ft2build.h>
#include "ftraster.h"
#include "rastpic.h"
#include "rasterrs.h"

Go to the source code of this file.

Macros

#define RASTER_GRAY_LINES   2048
 CONFIGURATION MACROS. More...
 
#define FT_COMPONENT   trace_raster
 OTHER MACROS (do not change) More...
 
#define Raster_Err_None   FT_Err_Ok
 
#define Raster_Err_Not_Ini   Raster_Err_Raster_Uninitialized
 
#define Raster_Err_Overflow   Raster_Err_Raster_Overflow
 
#define Raster_Err_Neg_Height   Raster_Err_Raster_Negative_Height
 
#define Raster_Err_Invalid   Raster_Err_Invalid_Outline
 
#define Raster_Err_Unsupported   Raster_Err_Cannot_Render_Glyph
 
#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 FMulDiv(a, b, c)   ( (a) * (b) / (c) )
 
#define SMulDiv   FT_MulDiv
 
#define SMulDiv_No_Round   FT_MulDiv_No_Round
 
#define TRUE   1
 
#define FALSE   0
 
#define NULL   (void*)0
 
#define SUCCESS   0
 
#define FAILURE   1
 
#define MaxBezier   32 /* The maximum number of stacked Bezier curves. */
 
#define Pixel_Bits   6 /* fractional bits of *input* coordinates */
 
#define Flow_Up   0x8
 
#define Overshoot_Top   0x10
 
#define Overshoot_Bottom   0x20
 
#define AlignProfileSize   ( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )
 
#define RAS_ARGS   black_PWorker worker,
 
#define RAS_ARG   black_PWorker worker
 
#define RAS_VARS   worker,
 
#define RAS_VAR   worker
 
#define FT_UNUSED_RASTER   FT_UNUSED( worker )
 
#define FLOOR(x)   ( (x) & -ras.precision )
 
#define CEILING(x)   ( ( (x) + ras.precision - 1 ) & -ras.precision )
 
#define TRUNC(x)   ( (Long)(x) >> ras.precision_bits )
 
#define FRAC(x)   ( (x) & ( ras.precision - 1 ) )
 
#define SCALED(x)   ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half )
 
#define IS_BOTTOM_OVERSHOOT(x)   ( CEILING( x ) - x >= ras.precision_half )
 
#define IS_TOP_OVERSHOOT(x)   ( x - FLOOR( x ) >= ras.precision_half )
 
#define ras   (*worker)
 
#define SWAP_(x, y)
 

Typedefs

typedef int Int
 SIMPLE TYPE DECLARATIONS. More...
 
typedef unsigned int UInt
 
typedef short Short
 
typedef unsigned short UShort
 
typedef unsigned short * PUShort
 
typedef long Long
 
typedef longPLong
 
typedef unsigned long ULong
 
typedef unsigned char Byte
 
typedef unsigned char * PByte
 
typedef char Bool
 
typedef union Alignment_ Alignment
 
typedef union Alignment_ * PAlignment
 
typedef struct TPoint_ TPoint
 
typedef enum TStates_ TStates
 
typedef struct TProfile_ TProfile
 
typedef TProfilePProfile
 
typedef PProfile TProfileList
 
typedef PProfilePProfileList
 
typedef struct black_TBand_ black_TBand
 
typedef struct black_TWorker_ black_TWorker
 
typedef struct black_TWorker_ * black_PWorker
 
typedef void Function_Sweep_Init(RAS_ARGS Short *min, Short *max)
 
typedef void Function_Sweep_Span(RAS_ARGS Short y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, PProfile right)
 
typedef void Function_Sweep_Step(RAS_ARG)
 
typedef struct black_TRaster_ black_TRaster
 
typedef struct black_TRaster_ * black_PRaster
 
typedef void(* TSplitter) (TPoint *base)
 

Enumerations

enum  TStates_ { Unknown_State, Ascending_State, Descending_State, Flat_State }
 

Functions

 Render_Glyph (RAS_ARG)
 
 Render_Gray_Glyph (RAS_ARG)
 

Macro Definition Documentation

◆ AlignProfileSize

#define AlignProfileSize   ( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )

Definition at line 389 of file ftraster.c.

◆ CEILING

#define CEILING (   x)    ( ( (x) + ras.precision - 1 ) & -ras.precision )

Definition at line 451 of file ftraster.c.

◆ FAILURE

#define FAILURE   1

Definition at line 289 of file ftraster.c.

◆ FALSE

#define FALSE   0

Definition at line 277 of file ftraster.c.

◆ FLOOR

#define FLOOR (   x)    ( (x) & -ras.precision )

Definition at line 450 of file ftraster.c.

◆ Flow_Up

#define Flow_Up   0x8

Definition at line 337 of file ftraster.c.

◆ FMulDiv

#define FMulDiv (   a,
  b,
  c 
)    ( (a) * (b) / (c) )

Definition at line 260 of file ftraster.c.

◆ FRAC

#define FRAC (   x)    ( (x) & ( ras.precision - 1 ) )

Definition at line 453 of file ftraster.c.

◆ FT_COMPONENT

#define FT_COMPONENT   trace_raster

OTHER MACROS (do not change)

Definition at line 177 of file ftraster.c.

◆ FT_MEM_SET

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

Definition at line 250 of file ftraster.c.

◆ FT_MEM_ZERO

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

Definition at line 254 of file ftraster.c.

◆ FT_UNUSED_RASTER

#define FT_UNUSED_RASTER   FT_UNUSED( worker )

Definition at line 419 of file ftraster.c.

Referenced by Render_Gray_Glyph().

◆ IS_BOTTOM_OVERSHOOT

#define IS_BOTTOM_OVERSHOOT (   x)    ( CEILING( x ) - x >= ras.precision_half )

Definition at line 456 of file ftraster.c.

◆ IS_TOP_OVERSHOOT

#define IS_TOP_OVERSHOOT (   x)    ( x - FLOOR( x ) >= ras.precision_half )

Definition at line 457 of file ftraster.c.

◆ MaxBezier

#define MaxBezier   32 /* The maximum number of stacked Bezier curves. */

Definition at line 293 of file ftraster.c.

◆ NULL

#define NULL   (void*)0

Definition at line 281 of file ftraster.c.

◆ Overshoot_Bottom

#define Overshoot_Bottom   0x20

Definition at line 339 of file ftraster.c.

◆ Overshoot_Top

#define Overshoot_Top   0x10

Definition at line 338 of file ftraster.c.

◆ Pixel_Bits

#define Pixel_Bits   6 /* fractional bits of *input* coordinates */

Definition at line 297 of file ftraster.c.

◆ ras

#define ras   (*worker)

Definition at line 579 of file ftraster.c.

◆ RAS_ARG

#define RAS_ARG   black_PWorker worker

Definition at line 414 of file ftraster.c.

◆ RAS_ARGS

#define RAS_ARGS   black_PWorker worker,

Definition at line 413 of file ftraster.c.

◆ RAS_VAR

#define RAS_VAR   worker

Definition at line 417 of file ftraster.c.

◆ RAS_VARS

#define RAS_VARS   worker,

Definition at line 416 of file ftraster.c.

◆ Raster_Err_Invalid

#define Raster_Err_Invalid   Raster_Err_Invalid_Outline

Definition at line 242 of file ftraster.c.

◆ Raster_Err_Neg_Height

#define Raster_Err_Neg_Height   Raster_Err_Raster_Negative_Height

Definition at line 241 of file ftraster.c.

◆ Raster_Err_None

#define Raster_Err_None   FT_Err_Ok

Definition at line 238 of file ftraster.c.

◆ Raster_Err_Not_Ini

#define Raster_Err_Not_Ini   Raster_Err_Raster_Uninitialized

Definition at line 239 of file ftraster.c.

◆ Raster_Err_Overflow

#define Raster_Err_Overflow   Raster_Err_Raster_Overflow

Definition at line 240 of file ftraster.c.

◆ Raster_Err_Unsupported

#define Raster_Err_Unsupported   Raster_Err_Cannot_Render_Glyph

Definition at line 243 of file ftraster.c.

◆ RASTER_GRAY_LINES

#define RASTER_GRAY_LINES   2048

CONFIGURATION MACROS.

Definition at line 159 of file ftraster.c.

◆ SCALED

#define SCALED (   x)    ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half )

Definition at line 454 of file ftraster.c.

◆ SMulDiv

#define SMulDiv   FT_MulDiv

Definition at line 265 of file ftraster.c.

◆ SMulDiv_No_Round

#define SMulDiv_No_Round   FT_MulDiv_No_Round

Definition at line 266 of file ftraster.c.

◆ SUCCESS

#define SUCCESS   0

Definition at line 285 of file ftraster.c.

◆ SWAP_

#define SWAP_ (   x,
  y 
)
Value:
do \
{ \
Long swap = x; \
\
\
x = y; \
y = swap; \
} while ( 0 )
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x

Definition at line 1774 of file ftraster.c.

◆ TRUE

#define TRUE   1

Definition at line 273 of file ftraster.c.

◆ TRUNC

#define TRUNC (   x)    ( (Long)(x) >> ras.precision_bits )

Definition at line 452 of file ftraster.c.

Typedef Documentation

◆ Alignment

typedef union Alignment_ Alignment

◆ black_PRaster

typedef struct black_TRaster_ * black_PRaster

◆ black_PWorker

typedef struct black_TWorker_ * black_PWorker

Definition at line 425 of file ftraster.c.

◆ black_TBand

typedef struct black_TBand_ black_TBand

◆ black_TRaster

typedef struct black_TRaster_ black_TRaster

◆ black_TWorker

typedef struct black_TWorker_ black_TWorker

Definition at line 425 of file ftraster.c.

◆ Bool

typedef char Bool

Definition at line 316 of file ftraster.c.

◆ Byte

typedef unsigned char Byte

Definition at line 315 of file ftraster.c.

◆ Function_Sweep_Init

typedef void Function_Sweep_Init(RAS_ARGS Short *min, Short *max)

Definition at line 430 of file ftraster.c.

◆ Function_Sweep_Span

typedef void Function_Sweep_Span(RAS_ARGS Short y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, PProfile right)

Definition at line 434 of file ftraster.c.

◆ Function_Sweep_Step

typedef void Function_Sweep_Step(RAS_ARG)

Definition at line 441 of file ftraster.c.

◆ Int

typedef int Int

SIMPLE TYPE DECLARATIONS.

Definition at line 308 of file ftraster.c.

◆ Long

typedef long Long

Definition at line 312 of file ftraster.c.

◆ PAlignment

typedef union Alignment_ * PAlignment

◆ PByte

typedef unsigned char * PByte

Definition at line 315 of file ftraster.c.

◆ PLong

typedef long * PLong

Definition at line 312 of file ftraster.c.

◆ PProfile

typedef TProfile* PProfile

Definition at line 354 of file ftraster.c.

◆ PProfileList

Definition at line 376 of file ftraster.c.

◆ PUShort

typedef unsigned short * PUShort

Definition at line 311 of file ftraster.c.

◆ Short

typedef short Short

Definition at line 310 of file ftraster.c.

◆ TPoint

typedef struct TPoint_ TPoint

◆ TProfile

typedef struct TProfile_ TProfile

Definition at line 353 of file ftraster.c.

◆ TProfileList

Definition at line 375 of file ftraster.c.

◆ TSplitter

typedef void(* TSplitter) (TPoint *base)

Definition at line 1243 of file ftraster.c.

◆ TStates

typedef enum TStates_ TStates

◆ UInt

typedef unsigned int UInt

Definition at line 309 of file ftraster.c.

◆ ULong

typedef unsigned long ULong

Definition at line 313 of file ftraster.c.

◆ UShort

typedef unsigned short UShort

Definition at line 311 of file ftraster.c.

Enumeration Type Documentation

◆ TStates_

enum TStates_
Enumerator
Unknown_State 
Ascending_State 
Descending_State 
Flat_State 

Definition at line 343 of file ftraster.c.

Function Documentation

◆ Render_Glyph()

Render_Glyph ( RAS_ARG  )

Definition at line 3253 of file ftraster.c.

References error.

◆ Render_Gray_Glyph()

Render_Gray_Glyph ( RAS_ARG  )

Definition at line 3401 of file ftraster.c.

References FT_THROW(), and FT_UNUSED_RASTER.