libgpac
Documentation of the core library of GPAC
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 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_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_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_EXPORT GF_Pathgf_path_get_outline (GF_Path *path, GF_PenSettings pen)
 

Data Structure Documentation

◆ FT_StrokeBorderRec

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

◆ FT_Stroker

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

◆ FT_SMALL_CONIC_THRESHOLD

#define FT_SMALL_CONIC_THRESHOLD   ( GF_PI / 6 )

◆ FT_SMALL_CUBIC_THRESHOLD

#define FT_SMALL_CUBIC_THRESHOLD   ( GF_PI / 6 )

◆ FT_IS_SMALL

#define FT_IS_SMALL (   x)    ( (x) > -FIX_EPSILON && (x) < FIX_EPSILON )

◆ FT_ARC_CUBIC_ANGLE

#define FT_ARC_CUBIC_ANGLE   ( GF_PI / 2 )

◆ FT_SIDE_TO_ROTATE

#define FT_SIDE_TO_ROTATE (   s)    ( GF_PI2 - (s) * GF_PI )

◆ GF_PATH_DOT_LEN

#define GF_PATH_DOT_LEN   1

◆ GF_PATH_DOT_SPACE

#define GF_PATH_DOT_SPACE   2

◆ GF_PATH_DASH_LEN

#define GF_PATH_DASH_LEN   3

Enumeration Type Documentation

◆ FT_StrokeTags

Enumerator
FT_STROKE_TAG_ON 
FT_STROKE_TAG_CUBIC 
FT_STROKE_TAG_BEGIN 
FT_STROKE_TAG_END 

Function Documentation

◆ ft_stroke_border_grow()

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:

◆ ft_stroke_border_close()

static void ft_stroke_border_close ( FT_StrokeBorder  border)
static
+ Here is the caller graph for this function:

◆ ft_stroke_border_lineto()

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:

◆ ft_stroke_border_cubicto()

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:

◆ ft_stroke_border_arcto()

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:

◆ ft_stroke_border_moveto()

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:

◆ ft_stroke_border_get_counts()

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:

◆ ft_stroke_border_export()

static void ft_stroke_border_export ( FT_StrokeBorder  border,
GF_Path outline 
)
static
+ Here is the caller graph for this function:

◆ ft_stroker_arcto()

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:

◆ ft_stroker_cap()

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:

◆ ft_stroker_inside()

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:

◆ ft_stroker_outside()

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:

◆ ft_stroker_process_corner()

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:

◆ ft_stroker_subpath_start()

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:

◆ FT_Stroker_LineTo()

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:

◆ FT_Stroker_BeginSubPath()

static s32 FT_Stroker_BeginSubPath ( FT_Stroker stroker,
GF_Point2D to 
)
static
+ Here is the caller graph for this function:

◆ ft_stroker_add_reverse_left()

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:

◆ FT_Stroker_EndSubPath()

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:

◆ FT_Stroker_GetCounts()

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:

◆ FT_Stroker_ParseOutline()

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:

◆ gf_path_get_dash()

static Fixed gf_path_get_dash ( GF_PenSettings pen,
u32  dash_slot,
u32 next_slot 
)
static
+ Here is the caller graph for this function:

◆ gf_path_mergedashes()

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:

◆ evg_dash_subpath()

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:

◆ gf_path_dash()

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: