![]() |
libgpac
Documentation of the core library of GPAC
|
import <evg.idl;
Collaboration diagram for Path:Public Member Functions | |
| Path () | |
| boolean | point_over (Point2D pt) |
| boolean | point_over (double x, double y) |
| Path | get_flatten () |
| Path | flatten () |
| Path | add_path (Path subpath, optional Matrix2D mx=null) |
| Path | arc (double radius, double start, double end, optional unsigned long close=0) |
| Path | arc_svg (double end_x, double end_y, double r_x, double r_y) |
| Path | arc_svg (double end_x, double end_y, double r_x, double r_y, optional double x_axis_rotation=0, optional boolean large_arc_flag=false, optional boolean sweep_flag=false) |
| Path | arc_bifs (double end_x, double end_y, double fa_x, double fa_y, double fb_x, double fb_y, optional boolean cw=false) |
| Path | n_bezier (Point2D pt1, Point2D pt2, Point2D pt3,...) |
| Path | ellipse (double cx, double cy, double a_axis, double b_axis) |
| Path | ellipse (Point2D center, double a_axis, double b_axis) |
| Path | rectangle (double ox, double oy, double width, double height, optional boolean centered=false) |
| Path | rectangle (Point2D o, double width, double height, optional boolean centered=false) |
| Path | quadratic_to (double c_x, double c_y, double x, double y) |
| *Path | cubic_to (double c1_x, double c1_y, double c2_x, double c2_y, double x, double y) |
| Path | line_to (double x, double y) |
| Path | move_to (double x, double y) |
| Path | close () |
| Path | reset () |
| Path | clone () |
| *Path | outline (PenSettings ps) |
| Path | transform (Matrix2D mx) |
Data Fields | |
| readonly attribute boolean | empty |
| readonly attribute boolean | zero_fill |
| readonly attribute boolean | even_fill |
| readonly attribute Rect | bounds |
| readonly attribute Rect | ctrl_bounds |
| readonly attribute boolean | is_rectangle |
Path object to describe vector graphics. Most path functions return the path object itself, so that the operations can be chained:
| Path::Path | ( | ) |
Constructor
| boolean Path::point_over | ( | Point2D | pt | ) |
checks if point is over a path - see gf_path_point_over
| pt | point to test |
| boolean Path::point_over | ( | double | x, |
| double | y | ||
| ) |
checks if point is over a path - see gf_path_point_over
| x | x-coord of point to test |
| y | y-coord of point to test |
| Path Path::get_flatten | ( | ) |
gets a flatten version of the path - see gf_path_get_flatten
| Path Path::flatten | ( | ) |
flattens the path - see gf_path_flatten
adds a path to the path - see gf_path_add_subpath
| subpath | path to add |
| mx | matrix to apply to path |
| Path Path::arc | ( | double | radius, |
| double | start, | ||
| double | end, | ||
| optional unsigned long | close = 0 |
||
| ) |
adds an arc to the path - see gf_path_add_arc
| radius | radius of the arc |
| start | start angle of the arc in radians |
| end | end angle of the arc in radians |
| close | closing type: 0 for open arc, 1 for close arc, 2 for pie |
| Path Path::arc_svg | ( | double | end_x, |
| double | end_y, | ||
| double | r_x, | ||
| double | r_y | ||
| ) |
adds an SVG arc to the path - see gf_path_add_svg_arc_to
| end_x | x-coordinate of the arc end point |
| end_y | y-coordinate of the arc end point |
| r_x | x-axis radius |
| r_y | y-axis radius |
| Path Path::arc_svg | ( | double | end_x, |
| double | end_y, | ||
| double | r_x, | ||
| double | r_y, | ||
| optional double | x_axis_rotation = 0, |
||
| optional boolean | large_arc_flag = false, |
||
| optional boolean | sweep_flag = false |
||
| ) |
adds an SVG arc to the path - see gf_path_add_svg_arc_to
| end_x | x-coordinate of the arc end point |
| end_y | y-coordinate of the arc end point |
| r_x | x-axis radius |
| r_y | y-axis radius |
| x_axis_rotation | angle for the x-axis |
| large_arc_flag | large or short arc selection |
| sweep_flag | if 1, the arc will be clockwise, otherwise counter-clockwise. |
| Path Path::arc_bifs | ( | double | end_x, |
| double | end_y, | ||
| double | fa_x, | ||
| double | fa_y, | ||
| double | fb_x, | ||
| double | fb_y, | ||
| optional boolean | cw = false |
||
| ) |
adds an arc to the path - see gf_path_add_arc_to
| end_x | x-coordinate of the arc end point |
| end_y | y-coordinate of the arc end point |
| fa_x | x-coordinate of the arc first focal point |
| fa_y | y-coordinate of the arc first focal point |
| fb_x | x-coordinate of the arc second focal point |
| fb_y | y-coordinate of the arc second focal point |
| cw | if 1, the arc will be clockwise, otherwise counter-clockwise. |
adds N-1 bezier curve - see gf_path_add_bezier. The function can take any number of points
| pt1 | first control point of the bezier curve |
| pt2 | second control point of the bezier curve |
| pt3 | last point of the curve if last point defined, otherwise next control point |
| Path Path::ellipse | ( | double | cx, |
| double | cy, | ||
| double | a_axis, | ||
| double | b_axis | ||
| ) |
adds an ellipse - see gf_path_add_ellipse
| cx | x-coordinate of the ellipse center |
| cy | y-coordinate of the ellipse center |
| a_axis | length of the horizontal ellipse axis |
| b_axis | length of the vertical ellipse axis |
adds an ellipse - see gf_path_add_ellipse
| center | ellipse center |
| a_axis | length of the horizontal ellipse axis |
| b_axis | length of the vertical ellipse axis |
| Path Path::rectangle | ( | double | ox, |
| double | oy, | ||
| double | width, | ||
| double | height, | ||
| optional boolean | centered = false |
||
| ) |
adds a rectangle - see gf_path_add_rect and gf_path_add_rect_center
| ox | x-coordinate of the rectangle center or top-left |
| oy | y-coordinate of the rectangle center or top-left |
| width | width of the rectangle |
| height | height of the rectangle |
| centered | indicates if the given coordinates are the top-left one (false) or the center ones (true) |
adds a rectangle - see gf_path_add_rect and gf_path_add_rect_center
| o | rectangle center or top-left |
| width | width of the rectangle |
| height | height of the rectangle |
| centered | indicates if the given coordinates are the top-left one (false) or the center ones (true) |
| Path Path::quadratic_to | ( | double | c_x, |
| double | c_y, | ||
| double | x, | ||
| double | y | ||
| ) |
adds a quadratic see gf_path_add_quadratic_to
| c_x | x-coordinate of the control point of the quadratic curve |
| c_y | y-coordinate of the control point of the quadratic curve |
| x | x-coordinate of the end point of the cubic quadratic |
| y | y-coordinate of the end point of the cubic quadratic |
| *Path Path::cubic_to | ( | double | c1_x, |
| double | c1_y, | ||
| double | c2_x, | ||
| double | c2_y, | ||
| double | x, | ||
| double | y | ||
| ) |
adds a cubic bezier curve to the current contour, starting from the current path point - see gf_path_add_cubic_to
| c1_x | x-coordinate of the first control point of the cubic curve |
| c1_y | y-coordinate of the first control point of the cubic curve |
| c2_x | x-coordinate of the second control point of the cubic curve |
| c2_y | y-coordinate of the second control point of the cubic curve |
| x | x-coordinate of the end point of the cubic curve |
| y | y-coordinate of the end point of the cubic curve |
| Path Path::line_to | ( | double | x, |
| double | y | ||
| ) |
adds a line - see gf_path_add_line_to
| x | x-coordinate of the point |
| y | y-coordinate of the point |
| Path Path::move_to | ( | double | x, |
| double | y | ||
| ) |
adds a move to - see gf_path_add_move_to
| x | x-coordinate of the point |
| y | y-coordinate of the point |
| Path Path::close | ( | ) |
close the path - see gf_path_close
| Path Path::reset | ( | ) |
reset the path - see gf_path_reset
| Path Path::clone | ( | ) |
clone the path - see gf_path_clone
| *Path Path::outline | ( | PenSettings | ps | ) |
generates a path outline - see gf_path_get_outline
| ps | the pen settings used to produce the outline |
transforms a path - see gf_path_add_subpath
| mx | matrix to apply to path |
| readonly attribute boolean Path::empty |
empty path flag - see gf_path_is_empty
| readonly attribute boolean Path::zero_fill |
if true, path will use zero_non_zero fill rule otherwise odd/even rule
| readonly attribute boolean Path::even_fill |
if true, path will use odd/even rule but fill only even parts
| readonly attribute Rect Path::bounds |
bounds of path - see gf_path_get_bounds
| readonly attribute Rect Path::ctrl_bounds |
control bounds of path - see gf_path_get_control_bounds
| readonly attribute boolean Path::is_rectangle |
set to true if path is a rectangle/square