zenilib
0.5.3.0
|
#include <ft2build.h>
#include <FT_STROKER_H>
#include <FT_TRIGONOMETRY_H>
#include <FT_OUTLINE_H>
#include <FT_INTERNAL_MEMORY_H>
#include <FT_INTERNAL_DEBUG_H>
#include <FT_INTERNAL_OBJECTS_H>
#include "basepic.h"
Go to the source code of this file.
Macros | |
#define | FT_ARC_CUBIC_ANGLE ( FT_ANGLE_PI / 2 ) |
#define | FT_EPSILON 2 |
#define | FT_IS_SMALL(x) ( (x) > -FT_EPSILON && (x) < FT_EPSILON ) |
#define | FT_SIDE_TO_ROTATE(s) ( FT_ANGLE_PI2 - (s) * FT_ANGLE_PI ) |
#define | FT_SMALL_CONIC_THRESHOLD ( FT_ANGLE_PI / 6 ) |
#define | FT_SMALL_CUBIC_THRESHOLD ( FT_ANGLE_PI / 8 ) |
#define | FT_STROKE_TAG_BEGIN_END ( FT_STROKE_TAG_BEGIN | FT_STROKE_TAG_END ) |
Typedefs | |
typedef struct FT_StrokeBorderRec_ * | FT_StrokeBorder |
typedef struct FT_StrokeBorderRec_ | FT_StrokeBorderRec |
typedef struct FT_StrokerRec_ | FT_StrokerRec |
typedef enum FT_StrokeTags_ | FT_StrokeTags |
Enumerations | |
enum | FT_StrokeTags_ { FT_STROKE_TAG_ON = 1, FT_STROKE_TAG_CUBIC = 2, FT_STROKE_TAG_BEGIN = 4, FT_STROKE_TAG_END = 8 } |
Variables | |
const FT_Glyph_Class | ft_outline_glyph_class |
#define FT_ARC_CUBIC_ANGLE ( FT_ANGLE_PI / 2 ) |
Definition at line 521 of file ftstroke.c.
Referenced by ft_stroke_border_arcto().
#define FT_EPSILON 2 |
Definition at line 65 of file ftstroke.c.
#define FT_IS_SMALL | ( | x | ) | ( (x) > -FT_EPSILON && (x) < FT_EPSILON ) |
Definition at line 67 of file ftstroke.c.
Referenced by ft_conic_is_small_enough(), ft_cubic_is_small_enough(), ft_stroke_border_lineto(), FT_Stroker_ConicTo(), and FT_Stroker_CubicTo().
#define FT_SIDE_TO_ROTATE | ( | s | ) | ( FT_ANGLE_PI2 - (s) * FT_ANGLE_PI ) |
Definition at line 759 of file ftstroke.c.
Referenced by ft_stroker_arcto(), ft_stroker_cap(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), ft_stroker_inside(), and ft_stroker_outside().
#define FT_SMALL_CONIC_THRESHOLD ( FT_ANGLE_PI / 6 ) |
Definition at line 62 of file ftstroke.c.
Referenced by ft_conic_is_small_enough(), and FT_Stroker_ConicTo().
#define FT_SMALL_CUBIC_THRESHOLD ( FT_ANGLE_PI / 8 ) |
Definition at line 63 of file ftstroke.c.
Referenced by ft_cubic_is_small_enough(), and FT_Stroker_CubicTo().
#define FT_STROKE_TAG_BEGIN_END ( FT_STROKE_TAG_BEGIN | FT_STROKE_TAG_END ) |
Definition at line 300 of file ftstroke.c.
Referenced by ft_stroker_add_reverse_left().
typedef struct FT_StrokeBorderRec_ * FT_StrokeBorder |
typedef struct FT_StrokeBorderRec_ FT_StrokeBorderRec |
typedef struct FT_StrokerRec_ FT_StrokerRec |
typedef enum FT_StrokeTags_ FT_StrokeTags |
enum FT_StrokeTags_ |
Enumerator | |
---|---|
FT_STROKE_TAG_ON | |
FT_STROKE_TAG_CUBIC | |
FT_STROKE_TAG_BEGIN | |
FT_STROKE_TAG_END |
Definition at line 291 of file ftstroke.c.
Definition at line 180 of file ftstroke.c.
References FT_Angle_Diff().
Referenced by ft_cubic_is_small_enough(), and FT_Stroker_CubicTo().
|
static |
Definition at line 98 of file ftstroke.c.
References FT_Angle, FT_Angle_Diff(), FT_Atan2(), FT_BOOL, FT_IS_SMALL, ft_pos_abs(), FT_SMALL_CONIC_THRESHOLD, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_ConicTo().
Definition at line 78 of file ftstroke.c.
References FT_Pos, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_ConicTo().
|
static |
Definition at line 188 of file ftstroke.c.
References FT_Angle, FT_Angle_Diff(), ft_angle_mean(), FT_Atan2(), FT_BOOL, FT_IS_SMALL, ft_pos_abs(), FT_SMALL_CUBIC_THRESHOLD, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_CubicTo().
Definition at line 149 of file ftstroke.c.
References d, FT_Pos, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_CubicTo().
FT_Glyph_Stroke | ( | FT_Glyph * | pglyph, |
FT_Stroker | stroker, | ||
FT_Bool | destroy | ||
) |
Definition at line 2258 of file ftstroke.c.
References FT_GlyphRec_::clazz, error, FALSE, FT_Done_Glyph(), FT_Err_Invalid_Argument, FT_Glyph_Copy(), FT_Outline_Done(), FT_OUTLINE_GLYPH_CLASS_GET, FT_Outline_New(), FT_Stroker_Export(), FT_Stroker_GetCounts(), FT_Stroker_ParseOutline(), FT_UNUSED, FT_GlyphRec_::library, library, FT_Outline_::n_contours, FT_Outline_::n_points, NULL, and FT_OutlineGlyphRec_::outline.
FT_Glyph_StrokeBorder | ( | FT_Glyph * | pglyph, |
FT_Stroker | stroker, | ||
FT_Bool | inside, | ||
FT_Bool | destroy | ||
) |
Definition at line 2333 of file ftstroke.c.
References FT_GlyphRec_::clazz, error, FALSE, FT_Done_Glyph(), FT_Err_Invalid_Argument, FT_Glyph_Copy(), FT_Outline_Done(), FT_Outline_GetOutsideBorder(), FT_OUTLINE_GLYPH_CLASS_GET, FT_Outline_New(), FT_STROKER_BORDER_LEFT, FT_STROKER_BORDER_RIGHT, FT_Stroker_ExportBorder(), FT_Stroker_GetBorderCounts(), FT_Stroker_ParseOutline(), FT_UNUSED, FT_GlyphRec_::library, library, FT_Outline_::n_contours, FT_Outline_::n_points, NULL, and FT_OutlineGlyphRec_::outline.
FT_Outline_GetInsideBorder | ( | FT_Outline * | outline | ) |
Definition at line 31 of file ftstroke.c.
References FT_ORIENTATION_TRUETYPE, FT_Outline_Get_Orientation(), FT_STROKER_BORDER_LEFT, and FT_STROKER_BORDER_RIGHT.
FT_Outline_GetOutsideBorder | ( | FT_Outline * | outline | ) |
Definition at line 44 of file ftstroke.c.
References FT_ORIENTATION_TRUETYPE, FT_Outline_Get_Orientation(), FT_STROKER_BORDER_LEFT, and FT_STROKER_BORDER_RIGHT.
Referenced by FT_Glyph_StrokeBorder().
Definition at line 71 of file ftstroke.c.
Referenced by ft_conic_is_small_enough(), ft_cubic_is_small_enough(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), ft_stroker_inside(), and ft_stroker_outside().
|
static |
Definition at line 525 of file ftstroke.c.
References error, FT_Angle, FT_ANGLE_PI2, FT_ARC_CUBIC_ANGLE, FT_Cos(), FT_Err_Ok, FT_MulDiv(), FT_Sin(), ft_stroke_border_cubicto(), FT_Vector_From_Polar(), FT_Vector_::x, and FT_Vector_::y.
Referenced by ft_stroker_arcto().
|
static |
Definition at line 347 of file ftstroke.c.
References FALSE, FT_ASSERT, FT_STROKE_TAG_BEGIN, and FT_STROKE_TAG_END.
Referenced by ft_stroke_border_moveto(), and FT_Stroker_EndSubPath().
|
static |
Definition at line 455 of file ftstroke.c.
References error, FALSE, FT_ASSERT, ft_stroke_border_grow(), FT_STROKE_TAG_ON, and vec.
Referenced by FT_Stroker_ConicTo().
|
static |
Definition at line 487 of file ftstroke.c.
References error, FALSE, FT_ASSERT, ft_stroke_border_grow(), FT_STROKE_TAG_CUBIC, FT_STROKE_TAG_ON, and vec.
Referenced by ft_stroke_border_arcto(), and FT_Stroker_CubicTo().
|
static |
Definition at line 634 of file ftstroke.c.
References FALSE, and FT_FREE.
Referenced by FT_Stroker_Done().
|
static |
Definition at line 701 of file ftstroke.c.
References FT_Outline_::contours, for(), FT_ARRAY_COPY, FT_ASSERT, FT_CURVE_TAG_CONIC, FT_CURVE_TAG_CUBIC, FT_CURVE_TAG_ON, FT_Outline_Check(), FT_STROKE_TAG_CUBIC, FT_STROKE_TAG_END, FT_STROKE_TAG_ON, idx, FT_Outline_::n_contours, FT_Outline_::n_points, FT_Outline_::points, and FT_Outline_::tags.
Referenced by FT_Stroker_ExportBorder().
|
static |
Definition at line 650 of file ftstroke.c.
References error, FT_Err_Ok, FT_STROKE_TAG_BEGIN, FT_STROKE_TAG_END, and TRUE.
Referenced by FT_Stroker_GetBorderCounts(), and FT_Stroker_GetCounts().
|
static |
Definition at line 317 of file ftstroke.c.
References error, FT_Err_Ok, and FT_RENEW_ARRAY.
Referenced by ft_stroke_border_conicto(), ft_stroke_border_cubicto(), ft_stroke_border_lineto(), and ft_stroker_add_reverse_left().
|
static |
Definition at line 610 of file ftstroke.c.
Referenced by FT_Stroker_New().
|
static |
Definition at line 413 of file ftstroke.c.
References error, FT_ASSERT, FT_Err_Ok, FT_IS_SMALL, ft_stroke_border_grow(), FT_STROKE_TAG_ON, vec, FT_Vector_::x, and FT_Vector_::y.
Referenced by ft_stroke_border_moveto(), ft_stroker_cap(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), ft_stroker_inside(), FT_Stroker_LineTo(), and ft_stroker_outside().
|
static |
Definition at line 595 of file ftstroke.c.
References FALSE, ft_stroke_border_close(), and ft_stroke_border_lineto().
Referenced by ft_stroker_subpath_start().
|
static |
|
static |
Definition at line 1790 of file ftstroke.c.
References error, FALSE, FT_ASSERT, FT_Err_Ok, ft_stroke_border_grow(), FT_STROKE_TAG_BEGIN, FT_STROKE_TAG_BEGIN_END, and FT_STROKE_TAG_END.
Referenced by FT_Stroker_EndSubPath().
|
static |
Definition at line 876 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_Angle_Diff(), FT_ANGLE_PI, FT_Err_Ok, FT_SIDE_TO_ROTATE, and ft_stroke_border_arcto().
Referenced by ft_stroker_cap(), and ft_stroker_outside().
FT_Stroker_BeginSubPath | ( | FT_Stroker | stroker, |
FT_Vector * | to, | ||
FT_Bool | open | ||
) |
Definition at line 1758 of file ftstroke.c.
References FT_BOOL, FT_Err_Ok, FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, and TRUE.
Referenced by FT_Stroker_ParseOutline().
|
static |
Definition at line 903 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_ANGLE_PI, FT_Err_Ok, FT_SIDE_TO_ROTATE, ft_stroke_border_lineto(), ft_stroker_arcto(), FT_STROKER_LINECAP_BUTT, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINECAP_SQUARE, FT_Vector_From_Polar(), FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_EndSubPath().
FT_Stroker_ConicTo | ( | FT_Stroker | stroker, |
FT_Vector * | control, | ||
FT_Vector * | to | ||
) |
Definition at line 1353 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_Angle_Diff(), FT_ANGLE_PI, FT_Atan2(), FT_Bool, ft_conic_is_small_enough(), ft_conic_split(), FT_Cos(), FT_DivFix(), FT_Err_Ok, FT_IS_SMALL, FT_MulFix(), ft_pos_abs(), FT_SIDE_TO_ROTATE, FT_Sin(), FT_SMALL_CONIC_THRESHOLD, ft_stroke_border_conicto(), ft_stroke_border_lineto(), FT_STROKER_LINEJOIN_ROUND, ft_stroker_process_corner(), ft_stroker_subpath_start(), FT_Vector_From_Polar(), FT_Vector_Length(), TRUE, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_ParseOutline().
FT_Stroker_CubicTo | ( | FT_Stroker | stroker, |
FT_Vector * | control1, | ||
FT_Vector * | control2, | ||
FT_Vector * | to | ||
) |
Definition at line 1548 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_Angle_Diff(), ft_angle_mean(), FT_ANGLE_PI, FT_Atan2(), FT_Bool, FT_Cos(), ft_cubic_is_small_enough(), ft_cubic_split(), FT_DivFix(), FT_Err_Ok, FT_IS_SMALL, FT_MulFix(), ft_pos_abs(), FT_SIDE_TO_ROTATE, FT_Sin(), FT_SMALL_CUBIC_THRESHOLD, ft_stroke_border_cubicto(), ft_stroke_border_lineto(), FT_STROKER_LINEJOIN_ROUND, ft_stroker_process_corner(), ft_stroker_subpath_start(), FT_Vector_From_Polar(), FT_Vector_Length(), TRUE, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_ParseOutline().
FT_Stroker_Done | ( | FT_Stroker | stroker | ) |
Definition at line 858 of file ftstroke.c.
References FT_FREE, ft_stroke_border_done(), and NULL.
FT_Stroker_EndSubPath | ( | FT_Stroker | stroker | ) |
Definition at line 1857 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_Angle_Diff(), FT_ANGLE_PI, FT_Err_Ok, ft_stroke_border_close(), ft_stroker_add_reverse_left(), ft_stroker_cap(), ft_stroker_inside(), FT_Stroker_LineTo(), ft_stroker_outside(), and TRUE.
Referenced by FT_Stroker_ParseOutline().
FT_Stroker_Export | ( | FT_Stroker | stroker, |
FT_Outline * | outline | ||
) |
Definition at line 2029 of file ftstroke.c.
References FT_STROKER_BORDER_LEFT, FT_STROKER_BORDER_RIGHT, and FT_Stroker_ExportBorder().
Referenced by FT_Glyph_Stroke().
FT_Stroker_ExportBorder | ( | FT_Stroker | stroker, |
FT_StrokerBorder | border, | ||
FT_Outline * | outline | ||
) |
Definition at line 2010 of file ftstroke.c.
References ft_stroke_border_export(), FT_STROKER_BORDER_LEFT, and FT_STROKER_BORDER_RIGHT.
Referenced by FT_Glyph_StrokeBorder(), and FT_Stroker_Export().
FT_Stroker_GetBorderCounts | ( | FT_Stroker | stroker, |
FT_StrokerBorder | border, | ||
FT_UInt * | anum_points, | ||
FT_UInt * | anum_contours | ||
) |
Definition at line 1947 of file ftstroke.c.
References error, FT_Err_Invalid_Argument, and ft_stroke_border_get_counts().
Referenced by FT_Glyph_StrokeBorder().
FT_Stroker_GetCounts | ( | FT_Stroker | stroker, |
FT_UInt * | anum_points, | ||
FT_UInt * | anum_contours | ||
) |
Definition at line 1978 of file ftstroke.c.
References error, and ft_stroke_border_get_counts().
Referenced by FT_Glyph_Stroke().
|
static |
Definition at line 978 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_Angle_Diff(), FT_Bool, FT_BOOL, FT_Cos(), FT_DivFix(), FT_Err_Ok, FT_MulFix(), ft_pos_abs(), FT_SIDE_TO_ROTATE, ft_stroke_border_lineto(), FT_Tan(), FT_Vector_From_Polar(), FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_EndSubPath(), and ft_stroker_process_corner().
FT_Stroker_LineTo | ( | FT_Stroker | stroker, |
FT_Vector * | to | ||
) |
Definition at line 1280 of file ftstroke.c.
References error, FT_Angle, FT_ANGLE_PI2, FT_Atan2(), FT_Err_Ok, ft_stroke_border_lineto(), ft_stroker_process_corner(), ft_stroker_subpath_start(), FT_Vector_From_Polar(), FT_Vector_Length(), TRUE, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_EndSubPath(), and FT_Stroker_ParseOutline().
FT_Stroker_New | ( | FT_Library | library, |
FT_Stroker * | astroker | ||
) |
Definition at line 789 of file ftstroke.c.
References error, FT_Err_Invalid_Argument, FT_NEW, ft_stroke_border_init(), library, and NULL.
|
static |
Definition at line 1040 of file ftstroke.c.
References error, FALSE, FT_Angle, FT_Angle_Diff(), FT_ANGLE_PI, FT_Bool, FT_BOOL, FT_Cos(), FT_DivFix(), FT_MulFix(), ft_pos_abs(), FT_SIDE_TO_ROTATE, FT_Sin(), ft_stroke_border_lineto(), ft_stroker_arcto(), FT_STROKER_LINEJOIN_BEVEL, FT_STROKER_LINEJOIN_MITER_VARIABLE, FT_STROKER_LINEJOIN_ROUND, FT_Vector_From_Polar(), TRUE, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_EndSubPath(), and ft_stroker_process_corner().
FT_Stroker_ParseOutline | ( | FT_Stroker | stroker, |
FT_Outline * | outline, | ||
FT_Bool | opened | ||
) |
Definition at line 2044 of file ftstroke.c.
References error, FT_CURVE_TAG, FT_CURVE_TAG_CONIC, FT_CURVE_TAG_CUBIC, FT_CURVE_TAG_ON, FT_Err_Invalid_Argument, FT_Err_Invalid_Outline, FT_Err_Ok, FT_Stroker_BeginSubPath(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), FT_Stroker_EndSubPath(), FT_Stroker_LineTo(), FT_Stroker_Rewind(), vec, FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Glyph_Stroke(), and FT_Glyph_StrokeBorder().
|
static |
Definition at line 1202 of file ftstroke.c.
References error, FT_Angle, FT_Angle_Diff(), FT_Err_Ok, ft_stroker_inside(), and ft_stroker_outside().
Referenced by FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), and FT_Stroker_LineTo().
FT_Stroker_Rewind | ( | FT_Stroker | stroker | ) |
Definition at line 845 of file ftstroke.c.
References ft_stroke_border_reset().
Referenced by FT_Stroker_ParseOutline(), and FT_Stroker_Set().
FT_Stroker_Set | ( | FT_Stroker | stroker, |
FT_Fixed | radius, | ||
FT_Stroker_LineCap | line_cap, | ||
FT_Stroker_LineJoin | line_join, | ||
FT_Fixed | miter_limit | ||
) |
Definition at line 819 of file ftstroke.c.
References FT_Stroker_Rewind().
|
static |
Definition at line 1239 of file ftstroke.c.
References error, FALSE, FT_ANGLE_PI2, ft_stroke_border_moveto(), FT_Vector_From_Polar(), FT_Vector_::x, and FT_Vector_::y.
Referenced by FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), and FT_Stroker_LineTo().
const FT_Glyph_Class ft_outline_glyph_class |