libSBML C API  5.18.0
RenderCurve_t Class Reference

Detailed Description

render Representation of curves.

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.

See also
LineEnding_t

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_tRenderCurve_clone (const RenderCurve_t *rc)
 Creates and returns a deep copy of this RenderCurve_t object. More...
 
RenderCurve_tRenderCurve_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_tRenderCurve_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_tRenderCurve_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_tRenderCurve_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_tRenderCurve_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_tRenderCurve_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...
 

Member Function Documentation

int RenderCurve_addElement ( RenderCurve_t rc,
const RenderPoint_t rp 
)

Adds a copy of the given RenderPoint_t to this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure to which the RenderPoint_t should be added.
rpthe RenderPoint_t object to add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
RenderCurve_t * RenderCurve_clone ( const RenderCurve_t rc)

Creates and returns a deep copy of this RenderCurve_t object.

Parameters
rcthe RenderCurve_t structure.
Returns
a (deep) copy of this RenderCurve_t object.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
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.

Parameters
levelan unsigned int, the SBML Level to assign to this RenderCurve_t.
versionan unsigned int, the SBML Version to assign to this RenderCurve_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this RenderCurve_t.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute. For packages, this means that the parent object to which this package element is being added must have been created with the package namespace, or that the package namespace was added to it, even if that parent is not a package object itself.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
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.

Parameters
rcthe RenderCurve_t structure to which the RenderCubicBezier_t should be added.
Returns
a new RenderCubicBezier_t object instance.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
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.

Parameters
rcthe RenderCurve_t structure to which the RenderPoint_t should be added.
Returns
a new RenderPoint_t object instance.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
void RenderCurve_free ( RenderCurve_t rc)

Frees this RenderCurve_t object.

Parameters
rcthe RenderCurve_t structure.
RenderPoint_t * RenderCurve_getElement ( RenderCurve_t rc,
unsigned int  n 
)

Get a RenderPoint_t from the RenderCurve_t.

Parameters
rcthe RenderCurve_t structure to search.
nan unsigned int representing the index of the RenderPoint_t to retrieve.
Returns
the nth RenderPoint_t in the ListOfCurveElements_t within this RenderCurve_t or NULL if no such object exists.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
char * RenderCurve_getEndHead ( const RenderCurve_t rc)

Returns the value of the "endHead" attribute of this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure whose endHead is sought.
Returns
the value of the "endHead" attribute of this RenderCurve_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
ListOf_t * RenderCurve_getListOfElements ( RenderCurve_t rc)

Returns a ListOf_t * containing RenderPoint_t objects from this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure whose ListOfCurveElements_t is sought.
Returns
the ListOfCurveElements_t from this RenderCurve_t as a ListOf_t *.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
See also
RenderCurve_addElement()
RenderCurve_getElement()
RenderCurve_getNumElements()
RenderCurve_removeElement()
unsigned int RenderCurve_getNumElements ( RenderCurve_t rc)

Get the number of RenderPoint_t objects in this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure to query.
Returns
the number of RenderPoint_t objects in this RenderCurve_t.
char * RenderCurve_getStartHead ( const RenderCurve_t rc)

Returns the value of the "startHead" attribute of this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure whose startHead is sought.
Returns
the value of the "startHead" attribute of this RenderCurve_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
int RenderCurve_hasRequiredAttributes ( const RenderCurve_t rc)

Predicate returning 1 (true) if all the required attributes for this RenderCurve_t object have been set.

Parameters
rcthe RenderCurve_t structure.
Returns
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.

Parameters
rcthe RenderCurve_t structure.
Returns
1 (true) to indicate that all the required elements of this RenderCurve_t have been set, otherwise 0 (false) is returned.
Note
The required elements for the RenderCurve_t object are:
int RenderCurve_isSetEndHead ( const RenderCurve_t rc)

Predicate returning 1 (true) if this RenderCurve_t's "endHead" attribute is set.

Parameters
rcthe RenderCurve_t structure.
Returns
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.

Parameters
rcthe RenderCurve_t structure.
Returns
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.

Parameters
rcthe RenderCurve_t structure to search.
nan unsigned int representing the index of the RenderPoint_t to remove.
Returns
a pointer to the nth RenderPoint_t in this RenderCurve_t.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
int RenderCurve_setEndHead ( RenderCurve_t rc,
const char *  endHead 
)

Sets the value of the "endHead" attribute of this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure.
endHeadconst char * value of the "endHead" attribute to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int RenderCurve_setStartHead ( RenderCurve_t rc,
const char *  startHead 
)

Sets the value of the "startHead" attribute of this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure.
startHeadconst char * value of the "startHead" attribute to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int RenderCurve_unsetEndHead ( RenderCurve_t rc)

Unsets the value of the "endHead" attribute of this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int RenderCurve_unsetStartHead ( RenderCurve_t rc)

Unsets the value of the "startHead" attribute of this RenderCurve_t.

Parameters
rcthe RenderCurve_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: