libSBML C API
5.18.0
|
The curve concept in the SBML Level 3 Render package is similar to the curves in the SBML layout. Each curve consists of a number of either straight line segments or cubic bezier elements. The two element types can also be mixed in a single curve object.
In contrast to layout curves, render curves can not have gaps and the individual coordinates of the curve elements can be specified as a combination of absolute and relative values.
Another difference to layout curves is the fact that render curves can specify decorations to be applied to the start and/or the end of the curve.
Since RenderCurve_t is derived from GraphicalPrimitive1D_t, it inherits all its attributes and methods.
Public Member Functions | |
int | RenderCurve_addElement (RenderCurve_t *rc, const RenderPoint_t *rp) |
Adds a copy of the given RenderPoint_t to this RenderCurve_t. More... | |
RenderCurve_t * | RenderCurve_clone (const RenderCurve_t *rc) |
Creates and returns a deep copy of this RenderCurve_t object. More... | |
RenderCurve_t * | RenderCurve_create (unsigned int level, unsigned int version, unsigned int pkgVersion) |
Creates a new RenderCurve_t using the given SBML Level, Version and “render” package version. More... | |
RenderCubicBezier_t * | RenderCurve_createCubicBezier (RenderCurve_t *rc) |
Creates a new RenderCubicBezier_t object, adds it to this RenderCurve_t object and returns the RenderCubicBezier_t object created. More... | |
RenderPoint_t * | RenderCurve_createPoint (RenderCurve_t *rc) |
Creates a new RenderPoint_t object, adds it to this RenderCurve_t object and returns the RenderPoint_t object created. More... | |
void | RenderCurve_free (RenderCurve_t *rc) |
Frees this RenderCurve_t object. More... | |
RenderPoint_t * | RenderCurve_getElement (RenderCurve_t *rc, unsigned int n) |
Get a RenderPoint_t from the RenderCurve_t. More... | |
char * | RenderCurve_getEndHead (const RenderCurve_t *rc) |
Returns the value of the "endHead" attribute of this RenderCurve_t. More... | |
ListOf_t * | RenderCurve_getListOfElements (RenderCurve_t *rc) |
Returns a ListOf_t * containing RenderPoint_t objects from this RenderCurve_t. More... | |
unsigned int | RenderCurve_getNumElements (RenderCurve_t *rc) |
Get the number of RenderPoint_t objects in this RenderCurve_t. More... | |
char * | RenderCurve_getStartHead (const RenderCurve_t *rc) |
Returns the value of the "startHead" attribute of this RenderCurve_t. More... | |
int | RenderCurve_hasRequiredAttributes (const RenderCurve_t *rc) |
Predicate returning 1 (true) if all the required attributes for this RenderCurve_t object have been set. More... | |
int | RenderCurve_hasRequiredElements (const RenderCurve_t *rc) |
Predicate returning 1 (true) if all the required elements for this RenderCurve_t object have been set. More... | |
int | RenderCurve_isSetEndHead (const RenderCurve_t *rc) |
Predicate returning 1 (true) if this RenderCurve_t's "endHead" attribute is set. More... | |
int | RenderCurve_isSetStartHead (const RenderCurve_t *rc) |
Predicate returning 1 (true) if this RenderCurve_t's "startHead" attribute is set. More... | |
RenderPoint_t * | RenderCurve_removeElement (RenderCurve_t *rc, unsigned int n) |
Removes the nth RenderPoint_t from this RenderCurve_t and returns a pointer to it. More... | |
int | RenderCurve_setEndHead (RenderCurve_t *rc, const char *endHead) |
Sets the value of the "endHead" attribute of this RenderCurve_t. More... | |
int | RenderCurve_setStartHead (RenderCurve_t *rc, const char *startHead) |
Sets the value of the "startHead" attribute of this RenderCurve_t. More... | |
int | RenderCurve_unsetEndHead (RenderCurve_t *rc) |
Unsets the value of the "endHead" attribute of this RenderCurve_t. More... | |
int | RenderCurve_unsetStartHead (RenderCurve_t *rc) |
Unsets the value of the "startHead" attribute of this RenderCurve_t. More... | |
int RenderCurve_addElement | ( | RenderCurve_t * | rc, |
const RenderPoint_t * | rp | ||
) |
Adds a copy of the given RenderPoint_t to this RenderCurve_t.
rc | the RenderCurve_t structure to which the RenderPoint_t should be added. |
rp | the RenderPoint_t object to add. |
RenderCurve_t * RenderCurve_clone | ( | const RenderCurve_t * | rc | ) |
Creates and returns a deep copy of this RenderCurve_t object.
rc | the RenderCurve_t structure. |
RenderCurve_t * RenderCurve_create | ( | unsigned int | level, |
unsigned int | version, | ||
unsigned int | pkgVersion | ||
) |
Creates a new RenderCurve_t using the given SBML Level, Version and “render” package version.
level | an unsigned int, the SBML Level to assign to this RenderCurve_t. |
version | an unsigned int, the SBML Version to assign to this RenderCurve_t. |
pkgVersion | an unsigned int, the SBML Render Version to assign to this RenderCurve_t. |
RenderCubicBezier_t * RenderCurve_createCubicBezier | ( | RenderCurve_t * | rc | ) |
Creates a new RenderCubicBezier_t object, adds it to this RenderCurve_t object and returns the RenderCubicBezier_t object created.
rc | the RenderCurve_t structure to which the RenderCubicBezier_t should be added. |
RenderPoint_t * RenderCurve_createPoint | ( | RenderCurve_t * | rc | ) |
Creates a new RenderPoint_t object, adds it to this RenderCurve_t object and returns the RenderPoint_t object created.
rc | the RenderCurve_t structure to which the RenderPoint_t should be added. |
void RenderCurve_free | ( | RenderCurve_t * | rc | ) |
Frees this RenderCurve_t object.
rc | the RenderCurve_t structure. |
RenderPoint_t * RenderCurve_getElement | ( | RenderCurve_t * | rc, |
unsigned int | n | ||
) |
Get a RenderPoint_t from the RenderCurve_t.
rc | the RenderCurve_t structure to search. |
n | an unsigned int representing the index of the RenderPoint_t to retrieve. |
NULL
if no such object exists.char * RenderCurve_getEndHead | ( | const RenderCurve_t * | rc | ) |
Returns the value of the "endHead" attribute of this RenderCurve_t.
rc | the RenderCurve_t structure whose endHead is sought. |
ListOf_t * RenderCurve_getListOfElements | ( | RenderCurve_t * | rc | ) |
Returns a ListOf_t * containing RenderPoint_t objects from this RenderCurve_t.
rc | the RenderCurve_t structure whose ListOfCurveElements_t is sought. |
unsigned int RenderCurve_getNumElements | ( | RenderCurve_t * | rc | ) |
Get the number of RenderPoint_t objects in this RenderCurve_t.
rc | the RenderCurve_t structure to query. |
char * RenderCurve_getStartHead | ( | const RenderCurve_t * | rc | ) |
Returns the value of the "startHead" attribute of this RenderCurve_t.
rc | the RenderCurve_t structure whose startHead is sought. |
int RenderCurve_hasRequiredAttributes | ( | const RenderCurve_t * | rc | ) |
Predicate returning 1
(true) if all the required attributes for this RenderCurve_t object have been set.
rc | the RenderCurve_t structure. |
1
(true) to indicate that all the required attributes of this RenderCurve_t have been set, otherwise 0
(false) is returned. int RenderCurve_hasRequiredElements | ( | const RenderCurve_t * | rc | ) |
Predicate returning 1
(true) if all the required elements for this RenderCurve_t object have been set.
rc | the RenderCurve_t structure. |
1
(true) to indicate that all the required elements of this RenderCurve_t have been set, otherwise 0
(false) is returned.int RenderCurve_isSetEndHead | ( | const RenderCurve_t * | rc | ) |
Predicate returning 1
(true) if this RenderCurve_t's "endHead" attribute is set.
rc | the RenderCurve_t structure. |
1
(true) if this RenderCurve_t's "endHead" attribute has been set, otherwise 0
(false) is returned. int RenderCurve_isSetStartHead | ( | const RenderCurve_t * | rc | ) |
Predicate returning 1
(true) if this RenderCurve_t's "startHead" attribute is set.
rc | the RenderCurve_t structure. |
1
(true) if this RenderCurve_t's "startHead" attribute has been set, otherwise 0
(false) is returned. RenderPoint_t * RenderCurve_removeElement | ( | RenderCurve_t * | rc, |
unsigned int | n | ||
) |
Removes the nth RenderPoint_t from this RenderCurve_t and returns a pointer to it.
rc | the RenderCurve_t structure to search. |
n | an unsigned int representing the index of the RenderPoint_t to remove. |
int RenderCurve_setEndHead | ( | RenderCurve_t * | rc, |
const char * | endHead | ||
) |
Sets the value of the "endHead" attribute of this RenderCurve_t.
rc | the RenderCurve_t structure. |
endHead | const char * value of the "endHead" attribute to be set. |
int RenderCurve_setStartHead | ( | RenderCurve_t * | rc, |
const char * | startHead | ||
) |
Sets the value of the "startHead" attribute of this RenderCurve_t.
rc | the RenderCurve_t structure. |
startHead | const char * value of the "startHead" attribute to be set. |
int RenderCurve_unsetEndHead | ( | RenderCurve_t * | rc | ) |
Unsets the value of the "endHead" attribute of this RenderCurve_t.
rc | the RenderCurve_t structure. |
int RenderCurve_unsetStartHead | ( | RenderCurve_t * | rc | ) |
Unsets the value of the "startHead" attribute of this RenderCurve_t.
rc | the RenderCurve_t structure. |