libSBML C API  5.18.0
GraphicalPrimitive2D_t Class Reference

Detailed Description

render Base class for graphical primitives implementing 2D attributes.

The GraphicalPrimitive2D_t class implements attributes and methods necessary for 2D objects like rectangles, polygons or ellipses. The attributes that are implemented are a fill color and a fill rule that specifies how the fill color is applied.

The GraphicalPrimitive2D_t class is derived from GraphicalPrimitive1D_t and inherits all its methods and attributes.

Public Member Functions

GraphicalPrimitive2D_tGraphicalPrimitive2D_clone (const GraphicalPrimitive2D_t *gpd)
 Creates and returns a deep copy of this GraphicalPrimitive2D_t object. More...
 
GraphicalPrimitive2D_tGraphicalPrimitive2D_createEllipse (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Ellipse_t (GraphicalPrimitive2D_t) using the given SBML Level, Version and “render” package version. More...
 
GraphicalPrimitive2D_tGraphicalPrimitive2D_createLineEnding (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new LineEnding_t (GraphicalPrimitive2D_t) using the given SBML Level, Version and “render” package version. More...
 
GraphicalPrimitive2D_tGraphicalPrimitive2D_createPolygon (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Polygon_t (GraphicalPrimitive2D_t) using the given SBML Level, Version and “render” package version. More...
 
GraphicalPrimitive2D_tGraphicalPrimitive2D_createRectangle (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Rectangle_t (GraphicalPrimitive2D_t) using the given SBML Level, Version and “render” package version. More...
 
GraphicalPrimitive2D_tGraphicalPrimitive2D_createRenderGroup (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new RenderGroup_t (GraphicalPrimitive2D_t) using the given SBML Level, Version and “render” package version. More...
 
void GraphicalPrimitive2D_free (GraphicalPrimitive2D_t *gpd)
 Frees this GraphicalPrimitive2D_t object. More...
 
char * GraphicalPrimitive2D_getFill (const GraphicalPrimitive2D_t *gpd)
 Returns the value of the "fill" attribute of this GraphicalPrimitive2D_t. More...
 
int GraphicalPrimitive2D_getFillRule (const GraphicalPrimitive2D_t *gpd)
 Returns the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t. More...
 
char * GraphicalPrimitive2D_getFillRuleAsString (const GraphicalPrimitive2D_t *gpd)
 Returns the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t. More...
 
int GraphicalPrimitive2D_hasRequiredAttributes (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 (true) if all the required attributes for this GraphicalPrimitive2D_t object have been set. More...
 
int GraphicalPrimitive2D_isEllipse (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 if this GraphicalPrimitive2D_t is of type Ellipse_t. More...
 
int GraphicalPrimitive2D_isLineEnding (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 if this GraphicalPrimitive2D_t is of type LineEnding_t. More...
 
int GraphicalPrimitive2D_isPolygon (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 if this GraphicalPrimitive2D_t is of type Polygon_t. More...
 
int GraphicalPrimitive2D_isRectangle (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 if this GraphicalPrimitive2D_t is of type Rectangle_t. More...
 
int GraphicalPrimitive2D_isRenderGroup (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 if this GraphicalPrimitive2D_t is of type RenderGroup_t. More...
 
int GraphicalPrimitive2D_isSetFill (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 (true) if this GraphicalPrimitive2D_t's "fill" attribute is set. More...
 
int GraphicalPrimitive2D_isSetFillRule (const GraphicalPrimitive2D_t *gpd)
 Predicate returning 1 (true) if this GraphicalPrimitive2D_t's "fill-rule" attribute is set. More...
 
int GraphicalPrimitive2D_setFill (GraphicalPrimitive2D_t *gpd, const char *fill)
 Sets the value of the "fill" attribute of this GraphicalPrimitive2D_t. More...
 
int GraphicalPrimitive2D_setFillRule (GraphicalPrimitive2D_t *gpd, FillRule_t fillRule)
 Sets the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t. More...
 
int GraphicalPrimitive2D_setFillRuleAsString (GraphicalPrimitive2D_t *gpd, const char *fillRule)
 Sets the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t. More...
 
int GraphicalPrimitive2D_unsetFill (GraphicalPrimitive2D_t *gpd)
 Unsets the value of the "fill" attribute of this GraphicalPrimitive2D_t. More...
 
int GraphicalPrimitive2D_unsetFillRule (GraphicalPrimitive2D_t *gpd)
 Unsets the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t. More...
 

Member Function Documentation

GraphicalPrimitive2D_t * GraphicalPrimitive2D_clone ( const GraphicalPrimitive2D_t gpd)

Creates and returns a deep copy of this GraphicalPrimitive2D_t object.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
a (deep) copy of this GraphicalPrimitive2D_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.
GraphicalPrimitive2D_t * GraphicalPrimitive2D_createEllipse ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

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

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

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

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

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

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

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

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

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

Parameters
levelan unsigned int, the SBML Level to assign to this GraphicalPrimitive2D_t.
versionan unsigned int, the SBML Version to assign to this GraphicalPrimitive2D_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this GraphicalPrimitive2D_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 GraphicalPrimitive2D_free ( GraphicalPrimitive2D_t gpd)

Frees this GraphicalPrimitive2D_t object.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
char * GraphicalPrimitive2D_getFill ( const GraphicalPrimitive2D_t gpd)

Returns the value of the "fill" attribute of this GraphicalPrimitive2D_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure whose fill is sought.
Returns
the value of the "fill" attribute of this GraphicalPrimitive2D_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
int GraphicalPrimitive2D_getFillRule ( const GraphicalPrimitive2D_t gpd)

Returns the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t.

The attribute "fill-rule" is used to define how polygons should be filled. In the SBML Level 3 Version 1 Render specification, the following are the allowable values for "fill-rule":
  • "nonzero": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.

  • "evenodd": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.

  • "inherit": This value declares the "insideness" of a point in the shape by declaring that the property takes the same computed value as the property for the element's parent. The inherited value, which is normally only used as a fallback value, can be clarified by setting 'inherit' explicitly. NOTE: This value is NOT in the Level 3 Version 1 Render specification, but was left out due to an oversight: the value has long been part of the codebase. It is provided here as a convenience. Elements with a fill-rule set to "inherit" actually behave identicaly to elements without a fill-rule attribute at all, since this attribute always takes the value of a parent element if not defined explicitly.

Parameters
gpdthe GraphicalPrimitive2D_t structure whose fill-rule is sought.
Returns
the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t as a FillRule_t value. The possible values returned by this method are:
char * GraphicalPrimitive2D_getFillRuleAsString ( const GraphicalPrimitive2D_t gpd)

Returns the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure whose fill-rule is sought.
Returns
the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t as a const char *.
Note
The string returned by this function is a pointer to a string literal defined in the libSBML library, and may not be modified or deleted.
The attribute "fill-rule" is used to define how polygons should be filled. In the SBML Level 3 Version 1 Render specification, the following are the allowable values for "fill-rule":
  • "nonzero": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.

  • "evenodd": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.

  • "inherit": This value declares the "insideness" of a point in the shape by declaring that the property takes the same computed value as the property for the element's parent. The inherited value, which is normally only used as a fallback value, can be clarified by setting 'inherit' explicitly. NOTE: This value is NOT in the Level 3 Version 1 Render specification, but was left out due to an oversight: the value has long been part of the codebase. It is provided here as a convenience. Elements with a fill-rule set to "inherit" actually behave identicaly to elements without a fill-rule attribute at all, since this attribute always takes the value of a parent element if not defined explicitly.

The possible values returned by this method are:
  • "nonzero"
  • "evenodd"
  • "(Unknown FillRule value)"
int GraphicalPrimitive2D_hasRequiredAttributes ( const GraphicalPrimitive2D_t gpd)

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

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 (true) to indicate that all the required attributes of this GraphicalPrimitive2D_t have been set, otherwise 0 (false) is returned.
int GraphicalPrimitive2D_isEllipse ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 if this GraphicalPrimitive2D_t is of type Ellipse_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 if this GraphicalPrimitive2D_t is of type Ellipse_t, 0 otherwise
int GraphicalPrimitive2D_isLineEnding ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 if this GraphicalPrimitive2D_t is of type LineEnding_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 if this GraphicalPrimitive2D_t is of type LineEnding_t, 0 otherwise
int GraphicalPrimitive2D_isPolygon ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 if this GraphicalPrimitive2D_t is of type Polygon_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 if this GraphicalPrimitive2D_t is of type Polygon_t, 0 otherwise
int GraphicalPrimitive2D_isRectangle ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 if this GraphicalPrimitive2D_t is of type Rectangle_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 if this GraphicalPrimitive2D_t is of type Rectangle_t, 0 otherwise
int GraphicalPrimitive2D_isRenderGroup ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 if this GraphicalPrimitive2D_t is of type RenderGroup_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 if this GraphicalPrimitive2D_t is of type RenderGroup_t, 0 otherwise
int GraphicalPrimitive2D_isSetFill ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 (true) if this GraphicalPrimitive2D_t's "fill" attribute is set.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 (true) if this GraphicalPrimitive2D_t's "fill" attribute has been set, otherwise 0 (false) is returned.
int GraphicalPrimitive2D_isSetFillRule ( const GraphicalPrimitive2D_t gpd)

Predicate returning 1 (true) if this GraphicalPrimitive2D_t's "fill-rule" attribute is set.

The attribute "fill-rule" is used to define how polygons should be filled. In the SBML Level 3 Version 1 Render specification, the following are the allowable values for "fill-rule":
  • "nonzero": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.

  • "evenodd": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.

  • "inherit": This value declares the "insideness" of a point in the shape by declaring that the property takes the same computed value as the property for the element's parent. The inherited value, which is normally only used as a fallback value, can be clarified by setting 'inherit' explicitly. NOTE: This value is NOT in the Level 3 Version 1 Render specification, but was left out due to an oversight: the value has long been part of the codebase. It is provided here as a convenience. Elements with a fill-rule set to "inherit" actually behave identicaly to elements without a fill-rule attribute at all, since this attribute always takes the value of a parent element if not defined explicitly.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
Returns
1 (true) if this GraphicalPrimitive2D_t's "fill-rule" attribute has been set, otherwise 0 (false) is returned.
int GraphicalPrimitive2D_setFill ( GraphicalPrimitive2D_t gpd,
const char *  fill 
)

Sets the value of the "fill" attribute of this GraphicalPrimitive2D_t.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
fillconst char * value of the "fill" 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: Calling this function with fill = NULL or an empty string is equivalent to calling GraphicalPrimitive2D_unsetFill().
int GraphicalPrimitive2D_setFillRule ( GraphicalPrimitive2D_t gpd,
FillRule_t  fillRule 
)

Sets the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t.

The attribute "fill-rule" is used to define how polygons should be filled. In the SBML Level 3 Version 1 Render specification, the following are the allowable values for "fill-rule":
  • "nonzero": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.

  • "evenodd": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.

  • "inherit": This value declares the "insideness" of a point in the shape by declaring that the property takes the same computed value as the property for the element's parent. The inherited value, which is normally only used as a fallback value, can be clarified by setting 'inherit' explicitly. NOTE: This value is NOT in the Level 3 Version 1 Render specification, but was left out due to an oversight: the value has long been part of the codebase. It is provided here as a convenience. Elements with a fill-rule set to "inherit" actually behave identicaly to elements without a fill-rule attribute at all, since this attribute always takes the value of a parent element if not defined explicitly.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
fillRuleFillRule_t value of the "fill-rule" 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 GraphicalPrimitive2D_setFillRuleAsString ( GraphicalPrimitive2D_t gpd,
const char *  fillRule 
)

Sets the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t.

The attribute "fill-rule" is used to define how polygons should be filled. In the SBML Level 3 Version 1 Render specification, the following are the allowable values for "fill-rule":
  • "nonzero": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.

  • "evenodd": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.

  • "inherit": This value declares the "insideness" of a point in the shape by declaring that the property takes the same computed value as the property for the element's parent. The inherited value, which is normally only used as a fallback value, can be clarified by setting 'inherit' explicitly. NOTE: This value is NOT in the Level 3 Version 1 Render specification, but was left out due to an oversight: the value has long been part of the codebase. It is provided here as a convenience. Elements with a fill-rule set to "inherit" actually behave identicaly to elements without a fill-rule attribute at all, since this attribute always takes the value of a parent element if not defined explicitly.

Parameters
gpdthe GraphicalPrimitive2D_t structure.
fillRuleconst char * of the "fill-rule" 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 GraphicalPrimitive2D_unsetFill ( GraphicalPrimitive2D_t gpd)

Unsets the value of the "fill" attribute of this GraphicalPrimitive2D_t.

Parameters
gpdthe GraphicalPrimitive2D_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 GraphicalPrimitive2D_unsetFillRule ( GraphicalPrimitive2D_t gpd)

Unsets the value of the "fill-rule" attribute of this GraphicalPrimitive2D_t.

The attribute "fill-rule" is used to define how polygons should be filled. In the SBML Level 3 Version 1 Render specification, the following are the allowable values for "fill-rule":
  • "nonzero": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.

  • "evenodd": This value determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.

  • "inherit": This value declares the "insideness" of a point in the shape by declaring that the property takes the same computed value as the property for the element's parent. The inherited value, which is normally only used as a fallback value, can be clarified by setting 'inherit' explicitly. NOTE: This value is NOT in the Level 3 Version 1 Render specification, but was left out due to an oversight: the value has long been part of the codebase. It is provided here as a convenience. Elements with a fill-rule set to "inherit" actually behave identicaly to elements without a fill-rule attribute at all, since this attribute always takes the value of a parent element if not defined explicitly.

Parameters
gpdthe GraphicalPrimitive2D_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: