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
path2d_stroker.c File Reference
#include <gpac/path2d.h>
+ Include dependency graph for path2d_stroker.c:

Data Structures

struct  FT_StrokeBorder
 
struct  FT_Stroker
 

Macros

#define FT_SMALL_CONIC_THRESHOLD   ( GF_PI / 6 )
 
#define FT_SMALL_CUBIC_THRESHOLD   ( GF_PI / 6 )
 
#define FT_IS_SMALL(x)   ( (x) > -FIX_EPSILON && (x) < FIX_EPSILON )
 
#define FT_ARC_CUBIC_ANGLE   ( GF_PI / 2 )
 
#define FT_SIDE_TO_ROTATE(s)   ( GF_PI2 - (s) * GF_PI )
 
#define GF_PATH_DOT_LEN   1
 
#define GF_PATH_DOT_SPACE   2
 
#define GF_PATH_DASH_LEN   3
 

Enumerations

enum  FT_StrokeTags { FT_STROKE_TAG_ON = 1, FT_STROKE_TAG_CUBIC = 2, FT_STROKE_TAG_BEGIN = 4, FT_STROKE_TAG_END = 8 }
 

Functions

static void ft_conic_split (GF_Point2D *base)
 
static Bool ft_conic_is_small_enough (GF_Point2D *base, Fixed *angle_in, Fixed *angle_out)
 
static void ft_cubic_split (GF_Point2D *base)
 
static Bool ft_cubic_is_small_enough (GF_Point2D *base, Fixed *angle_in, Fixed *angle_mid, Fixed *angle_out)
 
static s32 ft_stroke_border_grow (FT_StrokeBorder border, u32 new_points)
 
static void ft_stroke_border_close (FT_StrokeBorder border)
 
static s32 ft_stroke_border_lineto (FT_StrokeBorder border, GF_Point2D *to, Bool movable)
 
static s32 ft_stroke_border_conicto (FT_StrokeBorder border, GF_Point2D *control, GF_Point2D *to)
 
static s32 ft_stroke_border_cubicto (FT_StrokeBorder border, GF_Point2D *control1, GF_Point2D *control2, GF_Point2D *to)
 
static s32 ft_stroke_border_arcto (FT_StrokeBorder border, GF_Point2D *center, Fixed radius, Fixed angle_start, Fixed angle_diff)
 
static s32 ft_stroke_border_moveto (FT_StrokeBorder border, GF_Point2D *to)
 
static s32 ft_stroke_border_get_counts (FT_StrokeBorder border, u32 *anum_points, u32 *anum_contours)
 
static void ft_stroke_border_export (FT_StrokeBorder border, GF_Path *outline)
 
static s32 ft_stroker_arcto (FT_Stroker *stroker, s32 side)
 
static s32 ft_stroker_cap (FT_Stroker *stroker, Fixed angle, s32 side)
 
static s32 ft_stroker_inside (FT_Stroker *stroker, s32 side)
 
static s32 ft_stroker_outside (FT_Stroker *stroker, s32 side)
 
static s32 ft_stroker_process_corner (FT_Stroker *stroker)
 
static s32 ft_stroker_subpath_start (FT_Stroker *stroker, Fixed start_angle)
 
static s32 FT_Stroker_LineTo (FT_Stroker *stroker, GF_Point2D *to, Bool is_last)
 
static s32 FT_Stroker_ConicTo (FT_Stroker *stroker, GF_Point2D *control, GF_Point2D *to)
 
static s32 FT_Stroker_CubicTo (FT_Stroker *stroker, GF_Point2D *control1, GF_Point2D *control2, GF_Point2D *to)
 
static s32 FT_Stroker_BeginSubPath (FT_Stroker *stroker, GF_Point2D *to)
 
static s32 ft_stroker_add_reverse_left (FT_Stroker *stroker, Bool open)
 
static s32 FT_Stroker_EndSubPath (FT_Stroker *stroker, Bool do_close)
 
static s32 FT_Stroker_GetCounts (FT_Stroker *stroker, u32 *anum_points, u32 *anum_contours)
 
static s32 FT_Stroker_ParseOutline (FT_Stroker *stroker, GF_Path *outline)
 
static Fixed gf_path_get_dash (GF_PenSettings *pen, u32 dash_slot, u32 *next_slot)
 
static GF_Err gf_path_mergedashes (GF_Path *gp, u32 start_contour_index)
 
static GF_Err evg_dash_subpath (GF_Path *dashed, GF_Point2D *pts, u32 nb_pts, GF_PenSettings *pen, Fixed length_scale)
 
static GF_Pathgf_path_dash (GF_Path *path, GF_PenSettings *pen)
 
GF_Pathgf_path_get_outline (GF_Path *path, GF_PenSettings pen)
 

Data Structure Documentation

struct FT_StrokeBorderRec
+ Collaboration diagram for FT_StrokeBorder:
Data Fields
u32 num_points
u32 max_points
GF_Point2D * points
u8 * tags
Bool movable
s32 start
Bool valid
struct FT_Stroker
+ Collaboration diagram for FT_Stroker:
Data Fields
Fixed angle_in
Fixed angle_out
GF_Point2D center
Bool first_point
Fixed subpath_angle
GF_Point2D subpath_start
u32 line_cap
u32 line_join
Fixed miter_limit
Fixed radius
Bool valid
Bool closing
FT_StrokeBorderRec borders[2]

Macro Definition Documentation

#define FT_SMALL_CONIC_THRESHOLD   ( GF_PI / 6 )
#define FT_SMALL_CUBIC_THRESHOLD   ( GF_PI / 6 )
#define FT_IS_SMALL (   x)    ( (x) > -FIX_EPSILON && (x) < FIX_EPSILON )
#define FT_ARC_CUBIC_ANGLE   ( GF_PI / 2 )
#define FT_SIDE_TO_ROTATE (   s)    ( GF_PI2 - (s) * GF_PI )
#define GF_PATH_DOT_LEN   1
#define GF_PATH_DOT_SPACE   2
#define GF_PATH_DASH_LEN   3

Enumeration Type Documentation

Enumerator
FT_STROKE_TAG_ON 
FT_STROKE_TAG_CUBIC 
FT_STROKE_TAG_BEGIN 
FT_STROKE_TAG_END 

Function Documentation

static void ft_conic_split ( GF_Point2D base)
static

+ Here is the caller graph for this function:

static Bool ft_conic_is_small_enough ( GF_Point2D base,
Fixed angle_in,
Fixed angle_out 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ft_cubic_split ( GF_Point2D base)
static

+ Here is the caller graph for this function:

static Bool ft_cubic_is_small_enough ( GF_Point2D base,
Fixed angle_in,
Fixed angle_mid,
Fixed angle_out 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroke_border_grow ( FT_StrokeBorder  border,
u32  new_points 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ft_stroke_border_close ( FT_StrokeBorder  border)
static

+ Here is the caller graph for this function:

static s32 ft_stroke_border_lineto ( FT_StrokeBorder  border,
GF_Point2D to,
Bool  movable 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroke_border_conicto ( FT_StrokeBorder  border,
GF_Point2D control,
GF_Point2D to 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroke_border_cubicto ( FT_StrokeBorder  border,
GF_Point2D control1,
GF_Point2D control2,
GF_Point2D to 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroke_border_arcto ( FT_StrokeBorder  border,
GF_Point2D center,
Fixed  radius,
Fixed  angle_start,
Fixed  angle_diff 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroke_border_moveto ( FT_StrokeBorder  border,
GF_Point2D to 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroke_border_get_counts ( FT_StrokeBorder  border,
u32 anum_points,
u32 anum_contours 
)
static

+ Here is the caller graph for this function:

static void ft_stroke_border_export ( FT_StrokeBorder  border,
GF_Path outline 
)
static

+ Here is the caller graph for this function:

static s32 ft_stroker_arcto ( FT_Stroker stroker,
s32  side 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroker_cap ( FT_Stroker stroker,
Fixed  angle,
s32  side 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroker_inside ( FT_Stroker stroker,
s32  side 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroker_outside ( FT_Stroker stroker,
s32  side 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroker_process_corner ( FT_Stroker stroker)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 ft_stroker_subpath_start ( FT_Stroker stroker,
Fixed  start_angle 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_LineTo ( FT_Stroker stroker,
GF_Point2D to,
Bool  is_last 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_ConicTo ( FT_Stroker stroker,
GF_Point2D control,
GF_Point2D to 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_CubicTo ( FT_Stroker stroker,
GF_Point2D control1,
GF_Point2D control2,
GF_Point2D to 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_BeginSubPath ( FT_Stroker stroker,
GF_Point2D to 
)
static

+ Here is the caller graph for this function:

static s32 ft_stroker_add_reverse_left ( FT_Stroker stroker,
Bool  open 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_EndSubPath ( FT_Stroker stroker,
Bool  do_close 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_GetCounts ( FT_Stroker stroker,
u32 anum_points,
u32 anum_contours 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 FT_Stroker_ParseOutline ( FT_Stroker stroker,
GF_Path outline 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Fixed gf_path_get_dash ( GF_PenSettings pen,
u32  dash_slot,
u32 next_slot 
)
static

+ Here is the caller graph for this function:

static GF_Err gf_path_mergedashes ( GF_Path gp,
u32  start_contour_index 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err evg_dash_subpath ( GF_Path dashed,
GF_Point2D pts,
u32  nb_pts,
GF_PenSettings pen,
Fixed  length_scale 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Path* gf_path_dash ( GF_Path path,
GF_PenSettings pen 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function: