[dense] Populate headers for 'dense' module
* src/dense/ftdenserend.h (ft_dense_renderer_class): New Structures * src/dense/ftdense.h (dense_worker): New Structure (dense_render_line, dense_render_quadratic, dense_render_cubic): New function declarations (ft_dense_raster): Export dense raster funcs * src/dense/ftdenseerrs.h: Add module error setup
This commit is contained in:
parent
a78906fb4e
commit
f681099918
|
@ -1,7 +1,59 @@
|
|||
/* Dense rasterizer header*/
|
||||
|
||||
#ifndef FTDENSE_H_
|
||||
#define FTDENSE_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include <freetype/ftimage.h>
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
#ifndef FT_EXPORT_VAR
|
||||
#define FT_EXPORT_VAR( x ) extern x
|
||||
#endif
|
||||
FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_dense_raster;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/** The array used to store signed area differences. */
|
||||
float* m_a;
|
||||
/** The number of elements in m_a. */
|
||||
int m_a_size;
|
||||
/** The width of the current raster in pixels. */
|
||||
int m_w;
|
||||
/** The height of the current raster in pixels. */
|
||||
int m_h;
|
||||
/** The x origin of the raster. */
|
||||
int m_origin_x;
|
||||
/** The y origin of the raster. */
|
||||
int m_origin_y;
|
||||
|
||||
FT_Pos prev_x, prev_y;
|
||||
|
||||
FT_Outline outline;
|
||||
} dense_worker;
|
||||
|
||||
void dense_render_line( dense_worker* worker, FT_Pos to_x, FT_Pos to_y );
|
||||
void dense_render_quadratic( dense_worker* worker,
|
||||
FT_Vector* control,
|
||||
FT_Vector* to );
|
||||
void dense_render_cubic( dense_worker* worker,
|
||||
FT_Vector* control_1,
|
||||
FT_Vector* control_2,
|
||||
FT_Vector* to );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTDENSE_H_ */
|
||||
|
||||
/* END */
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
/** Common error defines */
|
||||
|
||||
/* Dense Renderer Error Codes */
|
||||
#ifndef FTDENSEERRS_H_
|
||||
#define FTDENSEERRS_H_
|
||||
|
||||
#include <freetype/ftmoderr.h>
|
||||
|
||||
#undef FTERRORS_H_
|
||||
|
||||
#undef FT_ERR_PREFIX
|
||||
#define FT_ERR_PREFIX Dense_Err_
|
||||
#define FT_ERR_BASE FT_Mod_Err_Dense
|
||||
|
||||
#include <freetype/fterrors.h>
|
||||
|
||||
#endif /* FTDENSEERRS_H_ */
|
||||
|
||||
/* END */
|
||||
|
|
|
@ -1,7 +1,27 @@
|
|||
|
||||
/* Dense renderer interface (specification) */
|
||||
#ifndef FTDENSEREND_H_
|
||||
#define FTDENSEREND_H_
|
||||
|
||||
|
||||
#include <freetype/ftmodapi.h>
|
||||
#include <freetype/ftrender.h>
|
||||
#include <freetype/internal/ftobjs.h>
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @renderer:
|
||||
* ft_dense_renderer_class
|
||||
*
|
||||
* @description:
|
||||
* Renderer to convert @FT_Outline to bitmaps.
|
||||
*
|
||||
*/
|
||||
FT_DECLARE_RENDERER( ft_dense_renderer_class )
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTDENSEREND_H_ */
|
||||
|
||||
/* END */
|
||||
|
|
Loading…
Reference in New Issue