gpac/path2d.h File Reference

2D Vectorial Path functions. More...

#include <gpac/math.h>
#include <gpac/constants.h>

Classes

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

Typedefs

typedef struct _path_iterator GF_PathIterator
 path iterator

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
void gf_path_del (GF_Path *gp)
 path destructor
void gf_path_reset (GF_Path *gp)
 path reset
GF_Pathgf_path_clone (GF_Path *gp)
 path copy constuctor
GF_Err gf_path_close (GF_Path *gp)
 path close
GF_Err gf_path_add_move_to (GF_Path *gp, Fixed x, Fixed y)
 path moveTo
GF_Err gf_path_add_move_to_vec (GF_Path *gp, GF_Point2D *pt)
 starts new contour
GF_Err gf_path_add_line_to (GF_Path *gp, Fixed x, Fixed y)
 adds line to path
GF_Err gf_path_add_line_to_vec (GF_Path *gp, GF_Point2D *pt)
 adds line to path
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
GF_Err gf_path_add_cubic_to_vec (GF_Path *gp, GF_Point2D *c1, GF_Point2D *c2, GF_Point2D *pt)
 adds cubic to path
GF_Err gf_path_add_quadratic_to (GF_Path *gp, Fixed c_x, Fixed c_y, Fixed x, Fixed y)
 adds quadratic to path
GF_Err gf_path_add_quadratic_to_vec (GF_Path *gp, GF_Point2D *c, GF_Point2D *pt)
 adds quadratic to path
GF_Err gf_path_add_rect_center (GF_Path *gp, Fixed cx, Fixed cy, Fixed w, Fixed h)
 adds rectangle to path
GF_Err gf_path_add_rect (GF_Path *gp, Fixed ox, Fixed oy, Fixed w, Fixed h)
 adds rectangle to path
GF_Err gf_path_add_ellipse (GF_Path *gp, Fixed cx, Fixed cy, Fixed a_axis, Fixed b_axis)
 adds ellipse to path
GF_Err gf_path_add_bezier (GF_Path *gp, GF_Point2D *pts, u32 nb_pts)
 adds N-bezier curve to path
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
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
GF_Err gf_path_add_arc (GF_Path *gp, Fixed radius, Fixed start_angle, Fixed end_angle, u32 close_type)
 adds arc to path
GF_Err gf_path_add_subpath (GF_Path *gp, GF_Path *subpath, GF_Matrix2D *mx)
 concatenates path
GF_Err gf_path_get_control_bounds (GF_Path *gp, GF_Rect *rc)
 gets path control bounds
GF_Err gf_path_get_bounds (GF_Path *gp, GF_Rect *rc)
 gets path bounds
void gf_path_flatten (GF_Path *gp)
 flattens path
GF_Pathgf_path_get_flatten (GF_Path *gp)
 gets flatten copy of path
Bool gf_path_point_over (GF_Path *gp, Fixed x, Fixed y)
 point over path testing
Bool gf_path_is_empty (GF_Path *gp)
 path init testing
GF_PathIteratorgf_path_iterator_new (GF_Path *gp)
 path iterator constructor
void gf_path_iterator_del (GF_PathIterator *it)
 path iterator destructor
Fixed gf_path_iterator_get_length (GF_PathIterator *it)
 get path length
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
u32 gf_polygone2d_get_convexity (GF_Point2D *pts, u32 nb_pts)
GF_Pathgf_path_get_outline (GF_Path *path, GF_PenSettings pen)


Detailed Description

>

Generated on Fri Mar 27 11:14:39 2009 for libgpac by  doxygen 1.5.8