libSBML C API
5.18.0
|
The Curve_t class describes how to connect elements in a diagram defined with the use of the “layout” package. A curve is fully specified by a mandatory listOfCurveSegments element and is used in four places in the “layout” package:
In the text above, the term 'center piece' refers to either the Curve_t element of a ReactionGlyph_t, or its BoundingBox_t.
Public Member Functions | |
void | Curve_addCurveSegment (Curve_t *c, LineSegment_t *ls) |
Adds a LineSegment_t to a Curve_t. More... | |
Curve_t * | Curve_clone (const Curve_t *c) |
Curve_t * | Curve_create () |
Creates a new curve and returns the pointer to it. More... | |
CubicBezier_t * | Curve_createCubicBezier (Curve_t *c) |
Creates a new CubicBezier_t and adds it to the end of the list. More... | |
Curve_t * | Curve_createFrom (const Curve_t *temp) |
Creates a new Curve_t structure from a template. More... | |
LineSegment_t * | Curve_createLineSegment (Curve_t *c) |
Creates a new LineSegment_t and adds it to the end of the list. More... | |
void | Curve_free (Curve_t *c) |
Frees the memory taken by the Curve_t. More... | |
LineSegment_t * | Curve_getCurveSegment (const Curve_t *c, unsigned int index) |
Returns the line segment with the given index. More... | |
ListOf_t * | Curve_getListOfCurveSegments (Curve_t *c) |
Returns the ListOf_t structure that holds all the curve segments. More... | |
unsigned int | Curve_getNumCurveSegments (const Curve_t *c) |
Returns the number of line segments. More... | |
void | Curve_initDefaults (Curve_t *c) |
Does nothing since no defaults are defined for Curve_t. More... | |
LineSegment_t * | Curve_removeCurveSegment (Curve_t *c, unsigned int index) |
Removes the curve segment with the given index. More... | |
void Curve_addCurveSegment | ( | Curve_t * | c, |
LineSegment_t * | ls | ||
) |
Adds a LineSegment_t to a Curve_t.
c | the Curve_t structure. |
ls | the LineSegment_t structure to add. |
Curve_t * Curve_create | ( | ) |
Creates a new curve and returns the pointer to it.
CubicBezier_t * Curve_createCubicBezier | ( | Curve_t * | c | ) |
Creates a new CubicBezier_t and adds it to the end of the list.
A pointer to the new CubicBezier_t structure is returned.
c | the Curve_t structure. |
LineSegment_t * Curve_createLineSegment | ( | Curve_t * | c | ) |
Creates a new LineSegment_t and adds it to the end of the list.
A pointer to the new LineSegment_t structure is returned.
c | the Curve_t structure. |
void Curve_free | ( | Curve_t * | c | ) |
LineSegment_t * Curve_getCurveSegment | ( | const Curve_t * | c, |
unsigned int | index | ||
) |
Returns the line segment with the given index.
c | the Curve_t structure. |
index | the index of the curve segment to return. |
unsigned int Curve_getNumCurveSegments | ( | const Curve_t * | c | ) |
Returns the number of line segments.
c | the Curve_t structure. |
void Curve_initDefaults | ( | Curve_t * | c | ) |
LineSegment_t * Curve_removeCurveSegment | ( | Curve_t * | c, |
unsigned int | index | ||
) |
Removes the curve segment with the given index.
If the index is invalid, nothing is done.
c | the Curve_t structure. |
index | the index of the curve segment to remove. |