Eina_Bezier_Group(3)

NAME
Eina_Bezier_Group - Bezier Curve

SYNOPSIS

  Data Structures
struct _Eina_Bezier

  Typedefs
typedef struct _Eina_Bezier Eina_Bezier
Floating point cubic bezier curve.

  Functions
EINA_API void eina_bezier_values_set (Eina_Bezier *b, double start_x, double start_y, double ctrl_start_x, double ctrl_start_y, double ctrl_end_x, double ctrl_end_y, double end_x, double end_y)
Sets the values of the points of the given floating point cubic bezier curve.
EINA_API void eina_bezier_values_get (const Eina_Bezier *b, double *start_x, double *start_y, double *ctrl_start_x, double *ctrl_start_y, double *ctrl_end_x, double *ctrl_end_y, double *end_x, double *end_y)
Gets the values of the points of the given floating point cubic bezier curve.
EINA_API double eina_bezier_length_get (const Eina_Bezier *b)
Calculates the approximate length of the given floating point cubic bezier curve.
EINA_API double eina_bezier_t_at (const Eina_Bezier *b, double len)
Returns the relative position on a bezier at a given length.
EINA_API void eina_bezier_point_at (const Eina_Bezier *b, double t, double *px, double *py)
Gets the point on the bezier curve at position t.
EINA_API double eina_bezier_angle_at (const Eina_Bezier *b, double t)
Determines the slope of the bezier at a given position.
EINA_API void eina_bezier_split_at_length (const Eina_Bezier *b, double len, Eina_Bezier *left, Eina_Bezier *right)
Splits the bezier at a given length.
EINA_API void eina_bezier_bounds_get (const Eina_Bezier *b, double *x, double *y, double *w, double *h)
Calculates the bounding box for the bezier.
EINA_API void eina_bezier_on_interval (Eina_Bezier *b, double t0, double t1, Eina_Bezier *result)
Finds the bezier between the given interval.

Detailed Description

Function Documentation

  EINA_API void eina_bezier_values_set (Eina_Bezier * b, double start_x, double start_y, double ctrl_start_x, double ctrl_start_y, double ctrl_end_x, double ctrl_end_y, double end_x, double end_y)

Sets the values of the points of the given floating point cubic bezier curve.

Parameters
    b The floating point bezier.
    start_x The x coordinate of the start point.
    start_y The y coordinate of the start point.
    ctrl_start_x The x coordinate of the 1st control point.
    ctrl_start_y The y coordinate of the 1st control point.
    ctrl_end_x The X coordinate of the 2nd control point.
    ctrl_end_y The Y coordinate of the 2nd control point.
    end_x The X coordinate of the end point.
    end_y The Y coordinate of the end point.

b. No check is done on b.

Since
    1.16

  EINA_API void eina_bezier_values_get (const Eina_Bezier * b, double * start_x, double * start_y, double * ctrl_start_x, double * ctrl_start_y, double * ctrl_end_x, double * ctrl_end_y, double * end_x, double * end_y)

Gets the values of the points of the given floating point cubic bezier curve.

Parameters
    b The floating point bezier.
    start_x x coordinate of start point.
    start_y y coordinate of start point.
    ctrl_start_x x coordinate of 1st control point.
    ctrl_start_y y coordinate of 1st control point.
    ctrl_end_x x coordinate of 2nd control point.
    ctrl_end_y y coordinate of 2nd control point.
    end_x x coordinate of end point.
    end_y y coordinate of end point.

b. No check is done on b.

Since
    1.16

  EINA_API double eina_bezier_length_get (const Eina_Bezier * b)

Calculates the approximate length of the given floating point cubic bezier curve.

Parameters
    b The floating point bezier.

Returns
    The bezier's length.

The curve length is approximated using the Alpha max plus beta min algorithm, which is designed to give fast results with a maximum error of less than 7% compared with the correct value.

No check is done on b.

Since
    1.16

Referenced by eina_bezier_t_at().

  EINA_API double eina_bezier_t_at (const Eina_Bezier * b, double len)

Returns the relative position on a bezier at a given length.

Parameters
    b The floating point bezier.
    len The length along the bezier curve.

Returns
    The relative position from 0.0 to 1.0.

Calculates the proportional location on b as a number from 0.0 to 1.0 that corresponds to a distance len along it. Returns 1.0 if len is equal or greater than the bezier's length.

No check is done on b.

Since
    1.16

References eina_bezier_length_get(), and EINA_DBL_EQ.

Referenced by eina_bezier_split_at_length().

  EINA_API void eina_bezier_point_at (const Eina_Bezier * b, double t, double * px, double * py)

Gets the point on the bezier curve at position t.

Parameters
    b The floating point bezier.
    t The floating point position between 0.0 and 1.0.
    px The corresponding point's X coordinate.
    py The corresponding point's Y coordinate.

No check is done on b.

Since
    1.16

References _Eina_Bezier::x, and _Eina_Bezier::y.

  EINA_API double eina_bezier_angle_at (const Eina_Bezier * b, double t)

Determines the slope of the bezier at a given position.

Parameters
    b The floating point bezier.
    t The position along the bezier between 0.0 and 1.0.

No check is done on b.

Since
    1.16

  EINA_API void eina_bezier_split_at_length (const Eina_Bezier * b, double len, Eina_Bezier * left, Eina_Bezier * right)

Splits the bezier at a given length.

Parameters
    b The floating point bezier.
    len The length along the bezier to make the split.
    left The resultant split's left portion of the bezier.
    right The resultant split's right portion of the bezier.

No check is done on b.

Since
    1.16

References eina_bezier_t_at().

  EINA_API void eina_bezier_bounds_get (const Eina_Bezier * b, double * x, double * y, double * w, double * h)

Calculates the bounding box for the bezier.

Parameters
    b The floating point bezier.
    x The X coordinate of the bounding box.
    y The Y coordinate of the bounding box.
    w The width of the bounding box.
    h The height of the bounding box.

No check is done on b.

Since
    1.17

  EINA_API void eina_bezier_on_interval (Eina_Bezier * b, double t0, double t1, Eina_Bezier * result)

Finds the bezier between the given interval.

Parameters
    b The floating point bezier.
    t0 The start of the interval.
    t1 The end of the interval.
    result The resulting bezier.

No check is done on b.

Since
    1.17

References EINA_DBL_EQ.

Author

Generated automatically by Doxygen for EFL from the source code.