libSBML C API  5.18.0
Transformation2D_t Class Reference

Detailed Description

render Implementation of a 2D transformation matrix.

The Transformation2D_t class represents a 2D transformation. it is derived from Transformation_t and inherits all the attributes of a 3D transformation. In addition is provides new methods to explicitly get and set 2D transformation properties. A 2D transformation normally consists of a 3x3 matrix, but since the last row is always 0 0 1, this is reduced to a 6 value array.

Using one of the new 2D specific functions to set the matrix always updates the 3D matrix automatically and vice versa, so the 2D data and the 3D data inherited from Transformation_t should always be consistent.

Public Member Functions

Transformation2D_tTransformation2D_clone (const Transformation2D_t *td)
 Creates and returns a deep copy of this Transformation2D_t object. More...
 
Transformation2D_tTransformation2D_createEllipse (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Ellipse_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createImage (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Image_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createLineEnding (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new LineEnding_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createPolygon (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Polygon_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createRectangle (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Rectangle_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createRenderCurve (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new RenderCurve_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createRenderGroup (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new RenderGroup_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
Transformation2D_tTransformation2D_createText (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Text_t (Transformation2D_t) using the given SBML Level, Version and “render” package version. More...
 
void Transformation2D_free (Transformation2D_t *td)
 Frees this Transformation2D_t object. More...
 
int Transformation2D_hasRequiredAttributes (const Transformation2D_t *td)
 Predicate returning 1 (true) if all the required attributes for this Transformation2D_t object have been set. More...
 
int Transformation2D_isEllipse (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type Ellipse_t. More...
 
int Transformation2D_isImage (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type Image_t. More...
 
int Transformation2D_isLineEnding (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type LineEnding_t. More...
 
int Transformation2D_isPolygon (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type Polygon_t. More...
 
int Transformation2D_isRectangle (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type Rectangle_t. More...
 
int Transformation2D_isRenderCurve (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type RenderCurve_t. More...
 
int Transformation2D_isRenderGroup (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type RenderGroup_t. More...
 
int Transformation2D_isText (const Transformation2D_t *td)
 Predicate returning 1 if this Transformation2D_t is of type Text_t. More...
 

Member Function Documentation

Transformation2D_t * Transformation2D_clone ( const Transformation2D_t td)

Creates and returns a deep copy of this Transformation2D_t object.

Parameters
tdthe Transformation2D_t structure.
Returns
a (deep) copy of this Transformation2D_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.
Transformation2D_t * Transformation2D_createEllipse ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters
levelan unsigned int, the SBML Level to assign to this Transformation2D_t.
versionan unsigned int, the SBML Version to assign to this Transformation2D_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this Transformation2D_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 Transformation2D_free ( Transformation2D_t td)

Frees this Transformation2D_t object.

Parameters
tdthe Transformation2D_t structure.
int Transformation2D_hasRequiredAttributes ( const Transformation2D_t td)

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

Parameters
tdthe Transformation2D_t structure.
Returns
1 (true) to indicate that all the required attributes of this Transformation2D_t have been set, otherwise 0 (false) is returned.
int Transformation2D_isEllipse ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type Ellipse_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type Ellipse_t, 0 otherwise
int Transformation2D_isImage ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type Image_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type Image_t, 0 otherwise
int Transformation2D_isLineEnding ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type LineEnding_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type LineEnding_t, 0 otherwise
int Transformation2D_isPolygon ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type Polygon_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type Polygon_t, 0 otherwise
int Transformation2D_isRectangle ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type Rectangle_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type Rectangle_t, 0 otherwise
int Transformation2D_isRenderCurve ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type RenderCurve_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type RenderCurve_t, 0 otherwise
int Transformation2D_isRenderGroup ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type RenderGroup_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type RenderGroup_t, 0 otherwise
int Transformation2D_isText ( const Transformation2D_t td)

Predicate returning 1 if this Transformation2D_t is of type Text_t.

Parameters
tdthe Transformation2D_t structure.
Returns
1 if this Transformation2D_t is of type Text_t, 0 otherwise