libSBML C API  5.18.0
Rectangle_t Class Reference

Detailed Description

render Representation of a rectangle.

Rectangle_t allows the definition of rectangles with or without rounded edges. The Rectangle_t object derives from the GraphicalPrimitive2D_t class and thus inherits any attributes and elements that are present on this class. In addition, the Rectangle_t object has the required attributes "x", "y", "height", and "width" as well as the optional attributes "z", "rx", "ry" and "ratio".

Public Member Functions

Rectangle_tRectangle_clone (const Rectangle_t *r)
 Creates and returns a deep copy of this Rectangle_t object. More...
 
Rectangle_tRectangle_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Rectangle_t using the given SBML Level, Version and “render” package version. More...
 
void Rectangle_free (Rectangle_t *r)
 Frees this Rectangle_t object. More...
 
RelAbsVector_tRectangle_getHeight (const Rectangle_t *r)
 Returns the value of the "height" element of this Rectangle_t. More...
 
double Rectangle_getRatio (const Rectangle_t *r)
 Returns the value of the "ratio" attribute of this Rectangle_t. More...
 
RelAbsVector_tRectangle_getRX (const Rectangle_t *r)
 Returns the value of the "rX" element of this Rectangle_t. More...
 
RelAbsVector_tRectangle_getRY (const Rectangle_t *r)
 Returns the value of the "rY" element of this Rectangle_t. More...
 
RelAbsVector_tRectangle_getWidth (const Rectangle_t *r)
 Returns the value of the "width" element of this Rectangle_t. More...
 
RelAbsVector_tRectangle_getX (const Rectangle_t *r)
 Returns the value of the "x" element of this Rectangle_t. More...
 
RelAbsVector_tRectangle_getY (const Rectangle_t *r)
 Returns the value of the "y" element of this Rectangle_t. More...
 
RelAbsVector_tRectangle_getZ (const Rectangle_t *r)
 Returns the value of the "z" element of this Rectangle_t. More...
 
int Rectangle_hasRequiredAttributes (const Rectangle_t *r)
 Predicate returning 1 (true) if all the required attributes for this Rectangle_t object have been set. More...
 
int Rectangle_isSetHeight (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "height" element is set. More...
 
int Rectangle_isSetRatio (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "ratio" attribute is set. More...
 
int Rectangle_isSetRX (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "rX" element is set. More...
 
int Rectangle_isSetRY (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "rY" element is set. More...
 
int Rectangle_isSetWidth (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "width" element is set. More...
 
int Rectangle_isSetX (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "x" element is set. More...
 
int Rectangle_isSetY (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "y" element is set. More...
 
int Rectangle_isSetZ (const Rectangle_t *r)
 Predicate returning 1 (true) if this Rectangle_t's "z" element is set. More...
 
int Rectangle_setHeight (Rectangle_t *r, const RelAbsVector_t *height)
 Sets the value of the "height" element of this Rectangle_t. More...
 
int Rectangle_setRatio (Rectangle_t *r, double ratio)
 Sets the value of the "ratio" attribute of this Rectangle_t. More...
 
int Rectangle_setRX (Rectangle_t *r, const RelAbsVector_t *rX)
 Sets the value of the "rX" element of this Rectangle_t. More...
 
int Rectangle_setRY (Rectangle_t *r, const RelAbsVector_t *rY)
 Sets the value of the "rY" element of this Rectangle_t. More...
 
int Rectangle_setWidth (Rectangle_t *r, const RelAbsVector_t *width)
 Sets the value of the "width" element of this Rectangle_t. More...
 
int Rectangle_setX (Rectangle_t *r, const RelAbsVector_t *x)
 Sets the value of the "x" element of this Rectangle_t. More...
 
int Rectangle_setY (Rectangle_t *r, const RelAbsVector_t *y)
 Sets the value of the "y" element of this Rectangle_t. More...
 
int Rectangle_setZ (Rectangle_t *r, const RelAbsVector_t *z)
 Sets the value of the "z" element of this Rectangle_t. More...
 
int Rectangle_unsetHeight (Rectangle_t *r)
 Unsets the value of the "height" element of this Rectangle_t. More...
 
int Rectangle_unsetRatio (Rectangle_t *r)
 Unsets the value of the "ratio" attribute of this Rectangle_t. More...
 
int Rectangle_unsetRX (Rectangle_t *r)
 Unsets the value of the "rX" element of this Rectangle_t. More...
 
int Rectangle_unsetRY (Rectangle_t *r)
 Unsets the value of the "rY" element of this Rectangle_t. More...
 
int Rectangle_unsetWidth (Rectangle_t *r)
 Unsets the value of the "width" element of this Rectangle_t. More...
 
int Rectangle_unsetX (Rectangle_t *r)
 Unsets the value of the "x" element of this Rectangle_t. More...
 
int Rectangle_unsetY (Rectangle_t *r)
 Unsets the value of the "y" element of this Rectangle_t. More...
 
int Rectangle_unsetZ (Rectangle_t *r)
 Unsets the value of the "z" element of this Rectangle_t. More...
 

Member Function Documentation

Rectangle_t * Rectangle_clone ( const Rectangle_t r)

Creates and returns a deep copy of this Rectangle_t object.

Parameters
rthe Rectangle_t structure.
Returns
a (deep) copy of this Rectangle_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.
Rectangle_t * Rectangle_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

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

Parameters
levelan unsigned int, the SBML Level to assign to this Rectangle_t.
versionan unsigned int, the SBML Version to assign to this Rectangle_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this Rectangle_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 Rectangle_free ( Rectangle_t r)

Frees this Rectangle_t object.

Parameters
rthe Rectangle_t structure.
RelAbsVector_t * Rectangle_getHeight ( const Rectangle_t r)

Returns the value of the "height" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure whose height is sought.
Returns
the value of the "height" element of this Rectangle_t as a RelAbsVector_t.
double Rectangle_getRatio ( const Rectangle_t r)

Returns the value of the "ratio" attribute of this Rectangle_t.

Parameters
rthe Rectangle_t structure whose ratio is sought.
Returns
the value of the "ratio" attribute of this Rectangle_t as a double.
RelAbsVector_t * Rectangle_getRX ( const Rectangle_t r)

Returns the value of the "rX" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure whose rX is sought.
Returns
the value of the "rX" element of this Rectangle_t as a RelAbsVector_t.
RelAbsVector_t * Rectangle_getRY ( const Rectangle_t r)

Returns the value of the "rY" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure whose rY is sought.
Returns
the value of the "rY" element of this Rectangle_t as a RelAbsVector_t.
RelAbsVector_t * Rectangle_getWidth ( const Rectangle_t r)

Returns the value of the "width" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure whose width is sought.
Returns
the value of the "width" element of this Rectangle_t as a RelAbsVector_t.
RelAbsVector_t * Rectangle_getX ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure whose x is sought.
Returns
the value of the "x" element of this Rectangle_t as a RelAbsVector_t.
RelAbsVector_t * Rectangle_getY ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure whose y is sought.
Returns
the value of the "y" element of this Rectangle_t as a RelAbsVector_t.
RelAbsVector_t * Rectangle_getZ ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure whose z is sought.
Returns
the value of the "z" element of this Rectangle_t as a RelAbsVector_t.
int Rectangle_hasRequiredAttributes ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure.
Returns
1 (true) to indicate that all the required attributes of this Rectangle_t have been set, otherwise 0 (false) is returned.
int Rectangle_isSetHeight ( const Rectangle_t r)

Predicate returning 1 (true) if this Rectangle_t's "height" element is set.

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "height" element has been set, otherwise 0 (false) is returned.
int Rectangle_isSetRatio ( const Rectangle_t r)

Predicate returning 1 (true) if this Rectangle_t's "ratio" attribute is set.

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "ratio" attribute has been set, otherwise 0 (false) is returned.
int Rectangle_isSetRX ( const Rectangle_t r)

Predicate returning 1 (true) if this Rectangle_t's "rX" element is set.

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "rX" element has been set, otherwise 0 (false) is returned.
int Rectangle_isSetRY ( const Rectangle_t r)

Predicate returning 1 (true) if this Rectangle_t's "rY" element is set.

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "rY" element has been set, otherwise 0 (false) is returned.
int Rectangle_isSetWidth ( const Rectangle_t r)

Predicate returning 1 (true) if this Rectangle_t's "width" element is set.

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "width" element has been set, otherwise 0 (false) is returned.
int Rectangle_isSetX ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "x" element has been set, otherwise 0 (false) is returned.
int Rectangle_isSetY ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "y" element has been set, otherwise 0 (false) is returned.
int Rectangle_isSetZ ( const Rectangle_t r)

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

Parameters
rthe Rectangle_t structure.
Returns
1 (true) if this Rectangle_t's "z" element has been set, otherwise 0 (false) is returned.
int Rectangle_setHeight ( Rectangle_t r,
const RelAbsVector_t height 
)

Sets the value of the "height" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure.
heightRelAbsVector_t value of the "height" 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 Rectangle_setRatio ( Rectangle_t r,
double  ratio 
)

Sets the value of the "ratio" attribute of this Rectangle_t.

Parameters
rthe Rectangle_t structure.
ratiodouble value of the "ratio" 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 Rectangle_setRX ( Rectangle_t r,
const RelAbsVector_t rX 
)

Sets the value of the "rX" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure.
rXRelAbsVector_t value of the "rX" 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 Rectangle_setRY ( Rectangle_t r,
const RelAbsVector_t rY 
)

Sets the value of the "rY" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure.
rYRelAbsVector_t value of the "rY" 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 Rectangle_setWidth ( Rectangle_t r,
const RelAbsVector_t width 
)

Sets the value of the "width" element of this Rectangle_t.

Parameters
rthe Rectangle_t structure.
widthRelAbsVector_t value of the "width" 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 Rectangle_setX ( Rectangle_t r,
const RelAbsVector_t x 
)

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

Parameters
rthe Rectangle_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 Rectangle_setY ( Rectangle_t r,
const RelAbsVector_t y 
)

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

Parameters
rthe Rectangle_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 Rectangle_setZ ( Rectangle_t r,
const RelAbsVector_t z 
)

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

Parameters
rthe Rectangle_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 Rectangle_unsetHeight ( Rectangle_t r)

Unsets the value of the "height" element of this Rectangle_t.

Parameters
rthe Rectangle_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 Rectangle_unsetRatio ( Rectangle_t r)

Unsets the value of the "ratio" attribute of this Rectangle_t.

Parameters
rthe Rectangle_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 Rectangle_unsetRX ( Rectangle_t r)

Unsets the value of the "rX" element of this Rectangle_t.

Parameters
rthe Rectangle_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 Rectangle_unsetRY ( Rectangle_t r)

Unsets the value of the "rY" element of this Rectangle_t.

Parameters
rthe Rectangle_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 Rectangle_unsetWidth ( Rectangle_t r)

Unsets the value of the "width" element of this Rectangle_t.

Parameters
rthe Rectangle_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 Rectangle_unsetX ( Rectangle_t r)

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

Parameters
rthe Rectangle_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 Rectangle_unsetY ( Rectangle_t r)

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

Parameters
rthe Rectangle_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 Rectangle_unsetZ ( Rectangle_t r)

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

Parameters
rthe Rectangle_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: