libSBML Python API  5.11.0
libsbml.RadialGradient Class Reference
Inheritance diagram for libsbml.RadialGradient:
[legend]

Detailed Description

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. (

See also
GradientBase)

The center and the focal point of a radial gradient are defined by three pairs of absolute-relative value. (

See also
RelAbsVector) The radius is also defined asn an absolute-relative value pair.

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...
 

Constructor & Destructor Documentation

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. (

See also
GradientBase)

The center and the focal point of a radial gradient are defined by three pairs of absolute-relative value. (

See also
RelAbsVector) The radius is also defined asn an absolute-relative value pair.

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.


Method variant with the following signature:
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.

Parameters
levelSBML level of the new object
levelSBML version of the new object

Method variant with the following signature:
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.

Parameters
idthe 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.


Method variant with the following signature:
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.

Parameters
nodethe XMLNode object reference that describes the RadialGradient object to be instantiated.

Method variant with the following signature:
RadialGradient(RenderPkgNamespaces renderns)

Creates a new RadialGradient object with the given SBMLNamespaces.

Parameters
sbmlnsThe SBML namespace for the object.

Member Function Documentation

def libsbml.RadialGradient.clone (   self)

Creates and returns a deep copy of this RadialGradient object.

clone()   RadialGradient
Returns
a (deep) copy of this RadialGradient object
def libsbml.RadialGradient.getCenterX (   self,
  args 
)

Returns the x coordinate for the center point as a reference.

getCenterX()   RelAbsVector
Returns
reference to the x coordinatee of the center point.
def libsbml.RadialGradient.getCenterY (   self,
  args 
)

Returns the y coordinate for the center point as a reference.

getCenterY()   RelAbsVector
Returns
reference to the y coordinatee of the center point.
def libsbml.RadialGradient.getCenterZ (   self,
  args 
)

Returns the z coordinate for the center point as a reference.

getCenterZ()   RelAbsVector
Returns
reference to the z coordinatee of the center point.
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
Returns
reference to the x coordinatee of the focal point.
def libsbml.RadialGradient.getFocalPointY (   self,
  args 
)

Returns the y coordinate for the focal point as a reference.

getFocalPointY()   RelAbsVector
Returns
reference to the y coordinatee of the focal point.
def libsbml.RadialGradient.getFocalPointZ (   self,
  args 
)

Returns the z coordinate for the focal point as a reference.

getFocalPointZ()   RelAbsVector
Returns
reference to the z coordinatee of the focal point.
def libsbml.RadialGradient.getRadius (   self,
  args 
)

Returns the radius as a reference.

getRadius()   RelAbsVector
Returns
reference to the radius
def libsbml.RadialGradient.getTypeCode (   self)

Returns the libSBML type code for this SBML object.

getTypeCode()   int
Returns
the SBML type code for this object, or SBML_UNKNOWN (default).
See also
getElementName()
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)
Parameters
xx value of the center point of the radial gradient vector
yy value of the center point of the radial gradient vector
zz 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.


Method variant with the following signature:
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.

Parameters
xx value of the center point of the radial gradient vector
yy value of the center point of the radial gradient vector
zz value of the center point of the radial gradient vector
rx value of the radius of the radial gradient vector
fxx value of the focal point of the radial gradient vector
fyy value of the focal point of the radial gradient vector
fzz value of the focal point of the radial gradient vector

Method variant with the following signature:
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.

Parameters
xx value of the center point of the radial gradient vector
yy value of the center point of the radial gradient vector
rx value of the radius of the radial gradient vector
fxx value of the focal point of the radial gradient vector
fyy 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)
Parameters
xx value of the focal point of the radial gradient vector
yy value of the focal point of the radial gradient vector
zz 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)
Parameters
rradius of the radial gradient vector.
def libsbml.RadialGradient.toXML (   self)

Creates an XMLNode object from this RadialGradient object.

toXML()   XMLNode
Returns
the XMLNode with the XML representation for the RadialGradient object.