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.h File Reference

2D Vectorial Path functions. More...

#include <gpac/math.h>
#include <gpac/tools.h>
+ Include dependency graph for path2d.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_Path
 2D Path Object More...
 
struct  GF_DashSettings
 Custom dash pattern. More...
 
struct  GF_PenSettings
 Pen properties. More...
 

Enumerations

enum  { GF_PATH_CURVE_ON = 1, GF_PATH_CLOSE = 5, GF_PATH_CURVE_CONIC = 0, GF_PATH_CURVE_CUBIC = 2 }
 
enum  { GF_PATH_FILL_ZERO_NONZERO = 1, GF_PATH_BBOX_DIRTY = 2, GF_PATH_FLATTENED = 4 }
 
enum  {
  GF_POLYGON_COMPLEX, GF_POLYGON_COMPLEX_CCW, GF_POLYGON_COMPLEX_CW, GF_POLYGON_CONVEX_CCW,
  GF_POLYGON_CONVEX_CW, GF_POLYGON_CONVEX_LINE
}
 
enum  { GF_PATH_LINE_CENTER = 0, GF_PATH_LINE_INSIDE, GF_PATH_LINE_OUTSIDE }
 
enum  { GF_LINE_CAP_FLAT = 0, GF_LINE_CAP_ROUND, GF_LINE_CAP_SQUARE, GF_LINE_CAP_TRIANGLE }
 
enum  { GF_LINE_JOIN_MITER = 0, GF_LINE_JOIN_ROUND, GF_LINE_JOIN_BEVEL, GF_LINE_JOIN_MITER_SVG }
 
enum  {
  GF_DASH_STYLE_PLAIN = 0, GF_DASH_STYLE_DASH, GF_DASH_STYLE_DOT, GF_DASH_STYLE_DASH_DOT,
  GF_DASH_STYLE_DASH_DASH_DOT, GF_DASH_STYLE_DASH_DOT_DOT, GF_DASH_STYLE_CUSTOM, GF_DASH_STYLE_SVG
}
 

Functions

GF_Pathgf_path_new ()
 path constructor More...
 
void gf_path_del (GF_Path *gp)
 path destructor More...
 
void gf_path_reset (GF_Path *gp)
 path reset More...
 
GF_Pathgf_path_clone (GF_Path *gp)
 path copy constuctor More...
 
GF_Err gf_path_close (GF_Path *gp)
 path close More...
 
GF_Err gf_path_add_move_to (GF_Path *gp, Fixed x, Fixed y)
 path moveTo More...
 
GF_Err gf_path_add_move_to_vec (GF_Path *gp, GF_Point2D *pt)
 starts new contour More...
 
GF_Err gf_path_add_line_to (GF_Path *gp, Fixed x, Fixed y)
 adds line to path More...
 
GF_Err gf_path_add_line_to_vec (GF_Path *gp, GF_Point2D *pt)
 adds line to path More...
 
GF_Err gf_path_add_cubic_to (GF_Path *gp, Fixed c1_x, Fixed c1_y, Fixed c2_x, Fixed c2_y, Fixed x, Fixed y)
 adds cubic to path More...
 
GF_Err gf_path_add_cubic_to_vec (GF_Path *gp, GF_Point2D *c1, GF_Point2D *c2, GF_Point2D *pt)
 adds cubic to path More...
 
GF_Err gf_path_add_quadratic_to (GF_Path *gp, Fixed c_x, Fixed c_y, Fixed x, Fixed y)
 adds quadratic to path More...
 
GF_Err gf_path_add_quadratic_to_vec (GF_Path *gp, GF_Point2D *c, GF_Point2D *pt)
 adds quadratic to path More...
 
GF_Err gf_path_add_rect_center (GF_Path *gp, Fixed cx, Fixed cy, Fixed w, Fixed h)
 adds rectangle to path More...
 
GF_Err gf_path_add_rect (GF_Path *gp, Fixed ox, Fixed oy, Fixed w, Fixed h)
 adds rectangle to path More...
 
GF_Err gf_path_add_ellipse (GF_Path *gp, Fixed cx, Fixed cy, Fixed a_axis, Fixed b_axis)
 adds ellipse to path More...
 
GF_Err gf_path_add_bezier (GF_Path *gp, GF_Point2D *pts, u32 nb_pts)
 adds N-bezier curve to path More...
 
GF_Err gf_path_add_arc_to (GF_Path *gp, Fixed end_x, Fixed end_y, Fixed fa_x, Fixed fa_y, Fixed fb_x, Fixed fb_y, Bool cw)
 adds arc as described in MPEG-4 BIFS to path More...
 
GF_Err gf_path_add_svg_arc_to (GF_Path *gp, Fixed end_x, Fixed end_y, Fixed r_x, Fixed r_y, Fixed x_axis_rotation, Bool large_arc_flag, Bool sweep_flag)
 adds arc as described in SVG to path More...
 
GF_Err gf_path_add_arc (GF_Path *gp, Fixed radius, Fixed start_angle, Fixed end_angle, u32 close_type)
 adds arc to path More...
 
GF_Err gf_path_add_subpath (GF_Path *gp, GF_Path *subpath, GF_Matrix2D *mx)
 concatenates path More...
 
GF_Err gf_path_get_control_bounds (GF_Path *gp, GF_Rect *rc)
 gets path control bounds More...
 
GF_Err gf_path_get_bounds (GF_Path *gp, GF_Rect *rc)
 gets path bounds More...
 
void gf_path_flatten (GF_Path *gp)
 flattens path More...
 
GF_Pathgf_path_get_flatten (GF_Path *gp)
 gets flatten copy of path More...
 
Bool gf_path_point_over (GF_Path *gp, Fixed x, Fixed y)
 point over path testing More...
 
Bool gf_path_is_empty (GF_Path *gp)
 path init testing More...
 
GF_PathIterator * gf_path_iterator_new (GF_Path *gp)
 path iterator constructor More...
 
void gf_path_iterator_del (GF_PathIterator *it)
 path iterator destructor More...
 
Fixed gf_path_iterator_get_length (GF_PathIterator *it)
 get path length More...
 
Bool gf_path_iterator_get_transform (GF_PathIterator *it, Fixed offset, Bool follow_tangent, GF_Matrix2D *mat, Bool smooth_edges, Fixed length_after_point)
 gets transformation matrix at given point on path More...
 
u32 gf_polygone2d_get_convexity (GF_Point2D *pts, u32 nb_pts)
 
GF_Pathgf_path_get_outline (GF_Path *path, GF_PenSettings pen)
 

Detailed Description

>