libSBML Python API
5.11.0
|
Representation of a radial gradient object from the SBML render extension.
The concept of a radial gradient is more or or less taken from SVG. A radial gradient is defined by a center point, a radius and an optional focal point. So for a valid gradient the radius should have a positive length different from 0 and the focal point should be within the circle defined by the center point and the radius. Otherwise all restrictions for the GradientBase class apply. (
The center and the focal point of a radial gradient are defined by three pairs of absolute-relative value. (
For examples of RadialGradients see the render extension specification and/or the SVG specification.
Public Member Functions | |
def | __init__ (self, args) |
Representation of a radial gradient object from the SBML render extension. More... | |
def | clone (self) |
Creates and returns a deep copy of this RadialGradient object. More... | |
def | getCenterX (self, args) |
Returns the x coordinate for the center point as a reference. More... | |
def | getCenterY (self, args) |
Returns the y coordinate for the center point as a reference. More... | |
def | getCenterZ (self, args) |
Returns the z coordinate for the center point as a reference. More... | |
def | getElementName (self) |
Returns the XML element name of this object. More... | |
def | getFocalPointX (self, args) |
Returns the x coordinate for the focal point as a reference. More... | |
def | getFocalPointY (self, args) |
Returns the y coordinate for the focal point as a reference. More... | |
def | getFocalPointZ (self, args) |
Returns the z coordinate for the focal point as a reference. More... | |
def | getRadius (self, args) |
Returns the radius as a reference. More... | |
def | getTypeCode (self) |
Returns the libSBML type code for this SBML object. More... | |
def | setCenter (self, args) |
Sets the coordinates for the center point. More... | |
def | setCoordinates (self, args) |
This method has multiple variants; they differ in the arguments they accept. More... | |
def | setFocalPoint (self, args) |
Sets the coordinates for the focal point. More... | |
def | setRadius (self, r) |
Sets the radius of the radial gradient. More... | |
def | toXML (self) |
Creates an XMLNode object from this RadialGradient object. More... | |
def libsbml.RadialGradient.__init__ | ( | self, | |
args | |||
) |
Representation of a radial gradient object from the SBML render extension.
The concept of a radial gradient is more or or less taken from SVG. A radial gradient is defined by a center point, a radius and an optional focal point. So for a valid gradient the radius should have a positive length different from 0 and the focal point should be within the circle defined by the center point and the radius. Otherwise all restrictions for the GradientBase class apply. (
The center and the focal point of a radial gradient are defined by three pairs of absolute-relative value. (
For examples of RadialGradients see the render extension specification and/or the SVG specification.
This method has multiple variants; they differ in the arguments they accept.
__init__(long level, long version, long pkgVersion) RadialGradient __init__(long level, long version) RadialGradient __init__(long level) RadialGradient __init__() RadialGradient __init__(RenderPkgNamespaces renderns) RadialGradient __init__(XMLNode node, long l2version) RadialGradient __init__(RenderPkgNamespaces renderns, string id) RadialGradient
Each variant is described separately below.
RadialGradient(XMLNode node, long l2version)
Creates a new RadialGradient object from the given XMLNode object. The XMLNode object has to contain a valid XML representation of a RadialGradient object as defined in the render extension specification. This method is normally called when render information is read from a file and should normally not have to be called explicitely.
node | the XMLNode object reference that describes the RadialGradient object to be instantiated. |
RadialGradient(RenderPkgNamespaces renderns)
Creates a new RadialGradient object with the given SBMLNamespaces.
sbmlns | The SBML namespace for the object. |
RadialGradient(long level = RenderExtension.getDefaultLevel(), long version = RenderExtension.getDefaultVersion(), long pkgVersion = RenderExtension.getDefaultPackageVersion())
Creates a new RadialGradient object with the given SBML level and SBML version.
level | SBML level of the new object |
level | SBML version of the new object |
RadialGradient(RenderPkgNamespaces renderns, string id)
Constructor which creates a RadialGradient with no gradient stops. The id is set to the given value. The RadialGradient object is invalid until it has an id and at least two gradient stops. The start and the end of the linear gradient vector are set to (0,0,0). A linear gradient with a vector of length zero should also be considered invalid.
id | the new id for the RadialGradient. |
This constructor is deprecated. The new libsbml API only has constructors which take the SBML level and version or one that takes an SBMLNamespaces object.
def libsbml.RadialGradient.clone | ( | self | ) |
Creates and returns a deep copy of this RadialGradient object.
clone() RadialGradient
def libsbml.RadialGradient.getCenterX | ( | self, | |
args | |||
) |
Returns the x coordinate for the center point as a reference.
getCenterX() RelAbsVector
def libsbml.RadialGradient.getCenterY | ( | self, | |
args | |||
) |
Returns the y coordinate for the center point as a reference.
getCenterY() RelAbsVector
def libsbml.RadialGradient.getCenterZ | ( | self, | |
args | |||
) |
Returns the z coordinate for the center point as a reference.
getCenterZ() RelAbsVector
def libsbml.RadialGradient.getElementName | ( | self | ) |
Returns the XML element name of this object.
getElementName() string
This is overridden by subclasses to return a string appropriate to the SBML component. For example, Model defines it as returning 'model', CompartmentType defines it as returning 'compartmentType', etc.
def libsbml.RadialGradient.getFocalPointX | ( | self, | |
args | |||
) |
Returns the x coordinate for the focal point as a reference.
getFocalPointX() RelAbsVector
def libsbml.RadialGradient.getFocalPointY | ( | self, | |
args | |||
) |
Returns the y coordinate for the focal point as a reference.
getFocalPointY() RelAbsVector
def libsbml.RadialGradient.getFocalPointZ | ( | self, | |
args | |||
) |
Returns the z coordinate for the focal point as a reference.
getFocalPointZ() RelAbsVector
def libsbml.RadialGradient.getRadius | ( | self, | |
args | |||
) |
def libsbml.RadialGradient.getTypeCode | ( | self | ) |
Returns the libSBML type code for this SBML object.
getTypeCode() int
SBML_UNKNOWN
(default).def libsbml.RadialGradient.setCenter | ( | self, | |
args | |||
) |
Sets the coordinates for the center point.
setCenter(RelAbsVector x, RelAbsVector y, RelAbsVector z) setCenter(RelAbsVector x, RelAbsVector y)
x | x value of the center point of the radial gradient vector |
y | y value of the center point of the radial gradient vector |
z | z value of the center point of the radial gradient vector The z argument can be omitted. In that case it is set to 0. |
def libsbml.RadialGradient.setCoordinates | ( | self, | |
args | |||
) |
This method has multiple variants; they differ in the arguments they accept.
setCoordinates(RelAbsVector x, RelAbsVector y, RelAbsVector z, RelAbsVector r, RelAbsVector fx, RelAbsVector fy, RelAbsVector fz) setCoordinates(RelAbsVector x, RelAbsVector y, RelAbsVector r, RelAbsVector fx, RelAbsVector fy)
Each variant is described separately below.
setCoordinates(RelAbsVector x,RelAbsVector y,RelAbsVector r,RelAbsVector fx,RelAbsVector fy)
Sets the 2D coordinates for the center and the focal point as well as the radius. The z values are automatically set to 0. Each value can be a combination of absolute and relative value and is represented by a RelAbsVector object.
x | x value of the center point of the radial gradient vector |
y | y value of the center point of the radial gradient vector |
r | x value of the radius of the radial gradient vector |
fx | x value of the focal point of the radial gradient vector |
fy | y value of the focal point of the radial gradient vector |
setCoordinates(RelAbsVector x,RelAbsVector y,RelAbsVector z,RelAbsVector r,RelAbsVector fx,RelAbsVector fy,RelAbsVector fz)
Sets the 3D coordinates for the center and the focal point as well as the radius. Each value can be a combination of absolute and relative value and is represented by a RelAbsVector object.
x | x value of the center point of the radial gradient vector |
y | y value of the center point of the radial gradient vector |
z | z value of the center point of the radial gradient vector |
r | x value of the radius of the radial gradient vector |
fx | x value of the focal point of the radial gradient vector |
fy | y value of the focal point of the radial gradient vector |
fz | z value of the focal point of the radial gradient vector |
def libsbml.RadialGradient.setFocalPoint | ( | self, | |
args | |||
) |
Sets the coordinates for the focal point.
setFocalPoint(RelAbsVector x, RelAbsVector y, RelAbsVector z) setFocalPoint(RelAbsVector x, RelAbsVector y)
x | x value of the focal point of the radial gradient vector |
y | y value of the focal point of the radial gradient vector |
z | z value of the focal point of the radial gradient vector. The z argument can be omitted. In that case it is set to 0. |
def libsbml.RadialGradient.setRadius | ( | self, | |
r | |||
) |
Sets the radius of the radial gradient.
setRadius(RelAbsVector r)
r | radius of the radial gradient vector. |
def libsbml.RadialGradient.toXML | ( | self | ) |
Creates an XMLNode object from this RadialGradient object.
toXML() XMLNode