libSBML C API  5.18.0
RenderPoint_t Class Reference

Detailed Description

render A point with both absolute and relative values

Render objects are often specified relative to the current viewport, i.e. we need a way to specify relative coordinate values in curves. For this we introduced the RenderPoint_t and the RenderCubicBezier_t class in the render extension. Those two classes are used to specify curve and polygon elements.

See also
RenderCurve_t
Polygon_t

Public Member Functions

RenderPoint_tRenderPoint_clone (const RenderPoint_t *rp)
 Creates and returns a deep copy of this RenderPoint_t object. More...
 
RenderPoint_tRenderPoint_createRenderCubicBezier (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new RenderCubicBezier_t (RenderPoint_t) using the given SBML Level, Version and “render” package version. More...
 
RenderPoint_tRenderPoint_createRenderPoint (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new RenderPoint_t (RenderPoint_t) using the given SBML Level, Version and “render” package version. More...
 
void RenderPoint_free (RenderPoint_t *rp)
 Frees this RenderPoint_t object. More...
 
const RelAbsVector_tRenderPoint_getX (const RenderPoint_t *rp)
 Returns the value of the "x" element of this RenderPoint_t. More...
 
const RelAbsVector_tRenderPoint_getY (const RenderPoint_t *rp)
 Returns the value of the "y" element of this RenderPoint_t. More...
 
const RelAbsVector_tRenderPoint_getZ (const RenderPoint_t *rp)
 Returns the value of the "z" element of this RenderPoint_t. More...
 
int RenderPoint_hasRequiredAttributes (const RenderPoint_t *rp)
 Predicate returning 1 (true) if all the required attributes for this RenderPoint_t object have been set. More...
 
int RenderPoint_isRenderCubicBezier (const RenderPoint_t *rp)
 Predicate returning 1 if this RenderPoint_t is of type RenderCubicBezier_t. More...
 
int RenderPoint_isRenderPoint (const RenderPoint_t *rp)
 Predicate returning 1 if this RenderPoint_t is of type RenderPoint_t. More...
 
int RenderPoint_isSetX (const RenderPoint_t *rp)
 Predicate returning 1 (true) if this RenderPoint_t's "x" element is set. More...
 
int RenderPoint_isSetY (const RenderPoint_t *rp)
 Predicate returning 1 (true) if this RenderPoint_t's "y" element is set. More...
 
int RenderPoint_isSetZ (const RenderPoint_t *rp)
 Predicate returning 1 (true) if this RenderPoint_t's "z" element is set. More...
 
int RenderPoint_setX (RenderPoint_t *rp, const RelAbsVector_t *x)
 Sets the value of the "x" element of this RenderPoint_t. More...
 
int RenderPoint_setY (RenderPoint_t *rp, const RelAbsVector_t *y)
 Sets the value of the "y" element of this RenderPoint_t. More...
 
int RenderPoint_setZ (RenderPoint_t *rp, const RelAbsVector_t *z)
 Sets the value of the "z" element of this RenderPoint_t. More...
 
int RenderPoint_unsetX (RenderPoint_t *rp)
 Unsets the value of the "x" element of this RenderPoint_t. More...
 
int RenderPoint_unsetY (RenderPoint_t *rp)
 Unsets the value of the "y" element of this RenderPoint_t. More...
 
int RenderPoint_unsetZ (RenderPoint_t *rp)
 Unsets the value of the "z" element of this RenderPoint_t. More...
 

Member Function Documentation

RenderPoint_t * RenderPoint_clone ( const RenderPoint_t rp)

Creates and returns a deep copy of this RenderPoint_t object.

Parameters
rpthe RenderPoint_t structure.
Returns
a (deep) copy of this RenderPoint_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.
RenderPoint_t * RenderPoint_createRenderCubicBezier ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new RenderCubicBezier_t (RenderPoint_t) using the given SBML Level, Version and “render” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this RenderPoint_t.
versionan unsigned int, the SBML Version to assign to this RenderPoint_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this RenderPoint_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.
RenderPoint_t * RenderPoint_createRenderPoint ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new RenderPoint_t (RenderPoint_t) using the given SBML Level, Version and “render” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this RenderPoint_t.
versionan unsigned int, the SBML Version to assign to this RenderPoint_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this RenderPoint_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.
void RenderPoint_free ( RenderPoint_t rp)

Frees this RenderPoint_t object.

Parameters
rpthe RenderPoint_t structure.
const RelAbsVector_t * RenderPoint_getX ( const RenderPoint_t rp)

Returns the value of the "x" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_t structure whose x is sought.
Returns
the value of the "x" element of this RenderPoint_t as a RelAbsVector_t.
const RelAbsVector_t * RenderPoint_getY ( const RenderPoint_t rp)

Returns the value of the "y" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_t structure whose y is sought.
Returns
the value of the "y" element of this RenderPoint_t as a RelAbsVector_t.
const RelAbsVector_t * RenderPoint_getZ ( const RenderPoint_t rp)

Returns the value of the "z" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_t structure whose z is sought.
Returns
the value of the "z" element of this RenderPoint_t as a RelAbsVector_t.
int RenderPoint_hasRequiredAttributes ( const RenderPoint_t rp)

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

Parameters
rpthe RenderPoint_t structure.
Returns
1 (true) to indicate that all the required attributes of this RenderPoint_t have been set, otherwise 0 (false) is returned.
Note
The required attributes for the RenderPoint_t object are:
  • "x"
  • "y"
int RenderPoint_isRenderCubicBezier ( const RenderPoint_t rp)

Predicate returning 1 if this RenderPoint_t is of type RenderCubicBezier_t.

Parameters
rpthe RenderPoint_t structure.
Returns
1 if this RenderPoint_t is of type RenderCubicBezier_t, 0 otherwise
int RenderPoint_isRenderPoint ( const RenderPoint_t rp)

Predicate returning 1 if this RenderPoint_t is of type RenderPoint_t.

Parameters
rpthe RenderPoint_t structure.
Returns
1 if this RenderPoint_t is of type RenderPoint_t, 0 otherwise
int RenderPoint_isSetX ( const RenderPoint_t rp)

Predicate returning 1 (true) if this RenderPoint_t's "x" element is set.

Parameters
rpthe RenderPoint_t structure.
Returns
1 (true) if this RenderPoint_t's "x" element has been set, otherwise 0 (false) is returned.
int RenderPoint_isSetY ( const RenderPoint_t rp)

Predicate returning 1 (true) if this RenderPoint_t's "y" element is set.

Parameters
rpthe RenderPoint_t structure.
Returns
1 (true) if this RenderPoint_t's "y" element has been set, otherwise 0 (false) is returned.
int RenderPoint_isSetZ ( const RenderPoint_t rp)

Predicate returning 1 (true) if this RenderPoint_t's "z" element is set.

Parameters
rpthe RenderPoint_t structure.
Returns
1 (true) if this RenderPoint_t's "z" element has been set, otherwise 0 (false) is returned.
int RenderPoint_setX ( RenderPoint_t rp,
const RelAbsVector_t x 
)

Sets the value of the "x" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_t structure.
xRelAbsVector_t value of the "x" element 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 RenderPoint_setY ( RenderPoint_t rp,
const RelAbsVector_t y 
)

Sets the value of the "y" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_t structure.
yRelAbsVector_t value of the "y" element 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 RenderPoint_setZ ( RenderPoint_t rp,
const RelAbsVector_t z 
)

Sets the value of the "z" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_t structure.
zRelAbsVector_t value of the "z" element 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 RenderPoint_unsetX ( RenderPoint_t rp)

Unsets the value of the "x" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_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 RenderPoint_unsetY ( RenderPoint_t rp)

Unsets the value of the "y" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_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 RenderPoint_unsetZ ( RenderPoint_t rp)

Unsets the value of the "z" element of this RenderPoint_t.

Parameters
rpthe RenderPoint_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: