libSBML C API
5.18.0
|
The Text_t class represents text to be rendered in the context of a style. The Text_t class inherits all attributes and methods from its base class GraphicalPrimitive1D_t.
The text also holds a string for the actual text that is to be rendered for the Text_t object.
Additional attributes specify how the text is to be rendered, for example which font family is to be used and how the text is to be aligned within the viewport.
Public Member Functions | |
Text_t * | Text_clone (const Text_t *t) |
Creates and returns a deep copy of this Text_t object. More... | |
Text_t * | Text_create (unsigned int level, unsigned int version, unsigned int pkgVersion) |
Creates a new Text_t using the given SBML Level, Version and “render” package version. More... | |
void | Text_free (Text_t *t) |
Frees this Text_t object. More... | |
char * | Text_getFontFamily (const Text_t *t) |
Returns the value of the "font-family" attribute of this Text_t. More... | |
RelAbsVector_t * | Text_getFontSize (const Text_t *t) |
Returns the value of the "font-size" element of this Text_t. More... | |
FontStyle_t | Text_getFontStyle (const Text_t *t) |
Returns the value of the "font-style" attribute of this Text_t. More... | |
char * | Text_getFontStyleAsString (const Text_t *t) |
Returns the value of the "font-style" attribute of this Text_t. More... | |
FontWeight_t | Text_getFontWeight (const Text_t *t) |
Returns the value of the "font-weight" attribute of this Text_t. More... | |
char * | Text_getFontWeightAsString (const Text_t *t) |
Returns the value of the "font-weight" attribute of this Text_t. More... | |
HTextAnchor_t | Text_getTextAnchor (const Text_t *t) |
Returns the value of the "text-anchor" attribute of this Text_t. More... | |
char * | Text_getTextAnchorAsString (const Text_t *t) |
Returns the value of the "text-anchor" attribute of this Text_t. More... | |
VTextAnchor_t | Text_getVTextAnchor (const Text_t *t) |
Returns the value of the "vtext-anchor" attribute of this Text_t. More... | |
char * | Text_getVTextAnchorAsString (const Text_t *t) |
Returns the value of the "vtext-anchor" attribute of this Text_t. More... | |
RelAbsVector_t * | Text_getX (const Text_t *t) |
Returns the value of the "x" element of this Text_t. More... | |
RelAbsVector_t * | Text_getY (const Text_t *t) |
Returns the value of the "y" element of this Text_t. More... | |
RelAbsVector_t * | Text_getZ (const Text_t *t) |
Returns the value of the "z" element of this Text_t. More... | |
int | Text_hasRequiredAttributes (const Text_t *t) |
Predicate returning 1 (true) if all the required attributes for this Text_t object have been set. More... | |
int | Text_isSetFontFamily (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "font-family" attribute is set. More... | |
int | Text_isSetFontSize (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "font-size" element is set. More... | |
int | Text_isSetFontStyle (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "font-style" attribute is set. More... | |
int | Text_isSetFontWeight (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "font-weight" attribute is set. More... | |
int | Text_isSetTextAnchor (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "text-anchor" attribute is set. More... | |
int | Text_isSetVTextAnchor (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "vtext-anchor" attribute is set. More... | |
int | Text_isSetX (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "x" element is set. More... | |
int | Text_isSetY (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "y" element is set. More... | |
int | Text_isSetZ (const Text_t *t) |
Predicate returning 1 (true) if this Text_t's "z" element is set. More... | |
int | Text_setFontFamily (Text_t *t, const char *fontFamily) |
Sets the value of the "font-family" attribute of this Text_t. More... | |
int | Text_setFontSize (Text_t *t, const RelAbsVector_t *fontSize) |
Sets the value of the "font-size" element of this Text_t. More... | |
int | Text_setFontStyle (Text_t *t, FontStyle_t fontStyle) |
Sets the value of the "font-style" attribute of this Text_t. More... | |
int | Text_setFontStyleAsString (Text_t *t, const char *fontStyle) |
Sets the value of the "font-style" attribute of this Text_t. More... | |
int | Text_setFontWeight (Text_t *t, FontWeight_t fontWeight) |
Sets the value of the "font-weight" attribute of this Text_t. More... | |
int | Text_setFontWeightAsString (Text_t *t, const char *fontWeight) |
Sets the value of the "font-weight" attribute of this Text_t. More... | |
int | Text_setTextAnchor (Text_t *t, HTextAnchor_t textAnchor) |
Sets the value of the "text-anchor" attribute of this Text_t. More... | |
int | Text_setTextAnchorAsString (Text_t *t, const char *textAnchor) |
Sets the value of the "text-anchor" attribute of this Text_t. More... | |
int | Text_setVTextAnchor (Text_t *t, VTextAnchor_t vtextAnchor) |
Sets the value of the "vtext-anchor" attribute of this Text_t. More... | |
int | Text_setVTextAnchorAsString (Text_t *t, const char *vtextAnchor) |
Sets the value of the "vtext-anchor" attribute of this Text_t. More... | |
int | Text_setX (Text_t *t, const RelAbsVector_t *x) |
Sets the value of the "x" element of this Text_t. More... | |
int | Text_setY (Text_t *t, const RelAbsVector_t *y) |
Sets the value of the "y" element of this Text_t. More... | |
int | Text_setZ (Text_t *t, const RelAbsVector_t *z) |
Sets the value of the "z" element of this Text_t. More... | |
int | Text_unsetFontFamily (Text_t *t) |
Unsets the value of the "font-family" attribute of this Text_t. More... | |
int | Text_unsetFontSize (Text_t *t) |
Unsets the value of the "font-size" element of this Text_t. More... | |
int | Text_unsetFontStyle (Text_t *t) |
Unsets the value of the "font-style" attribute of this Text_t. More... | |
int | Text_unsetFontWeight (Text_t *t) |
Unsets the value of the "font-weight" attribute of this Text_t. More... | |
int | Text_unsetTextAnchor (Text_t *t) |
Unsets the value of the "text-anchor" attribute of this Text_t. More... | |
int | Text_unsetVTextAnchor (Text_t *t) |
Unsets the value of the "vtext-anchor" attribute of this Text_t. More... | |
int | Text_unsetX (Text_t *t) |
Unsets the value of the "x" element of this Text_t. More... | |
int | Text_unsetY (Text_t *t) |
Unsets the value of the "y" element of this Text_t. More... | |
int | Text_unsetZ (Text_t *t) |
Unsets the value of the "z" element of this Text_t. More... | |
Creates and returns a deep copy of this Text_t object.
t | the Text_t structure. |
Text_t * Text_create | ( | unsigned int | level, |
unsigned int | version, | ||
unsigned int | pkgVersion | ||
) |
Creates a new Text_t using the given SBML Level, Version and “render” package version.
level | an unsigned int, the SBML Level to assign to this Text_t. |
version | an unsigned int, the SBML Version to assign to this Text_t. |
pkgVersion | an unsigned int, the SBML Render Version to assign to this Text_t. |
char * Text_getFontFamily | ( | const Text_t * | t | ) |
Returns the value of the "font-family" attribute of this Text_t.
t | the Text_t structure whose font-family is sought. |
RelAbsVector_t * Text_getFontSize | ( | const Text_t * | t | ) |
Returns the value of the "font-size" element of this Text_t.
t | the Text_t structure whose font-size is sought. |
FontStyle_t Text_getFontStyle | ( | const Text_t * | t | ) |
Returns the value of the "font-style" attribute of this Text_t.
"italic"
, slanted print
"normal"
, upright print
t | the Text_t structure whose font-style is sought. |
char * Text_getFontStyleAsString | ( | const Text_t * | t | ) |
Returns the value of the "font-style" attribute of this Text_t.
"italic"
, slanted print
"normal"
, upright print
t | the Text_t structure whose font-style is sought. |
const char *
. The possible values returned by this method are: "italic"
"normal"
"(Unknown FontStyle value)"
FontWeight_t Text_getFontWeight | ( | const Text_t * | t | ) |
Returns the value of the "font-weight" attribute of this Text_t.
"bold"
, darker and/or thicker than normal print.
"normal"
, the typical print weight; lighter and/or thinner than "bold".
t | the Text_t structure whose font-weight is sought. |
char * Text_getFontWeightAsString | ( | const Text_t * | t | ) |
Returns the value of the "font-weight" attribute of this Text_t.
"bold"
, darker and/or thicker than normal print.
"normal"
, the typical print weight; lighter and/or thinner than "bold".
t | the Text_t structure whose font-weight is sought. |
"bold"
"normal"
"(Unknown FontWeight value)"
HTextAnchor_t Text_getTextAnchor | ( | const Text_t * | t | ) |
Returns the value of the "text-anchor" attribute of this Text_t.
"start"
, the start of the text is aligned to the horizontal center of the box.
"middle"
, the horizontal center of the text is aligned to the horizontal center of the box.
"end"
, the end of the text is aligned to the horizontal center of the box.
t | the Text_t structure whose text-anchor is sought. |
char * Text_getTextAnchorAsString | ( | const Text_t * | t | ) |
Returns the value of the "text-anchor" attribute of this Text_t.
"start"
, the start of the text is aligned to the horizontal center of the box.
"middle"
, the horizontal center of the text is aligned to the horizontal center of the box.
"end"
, the end of the text is aligned to the horizontal center of the box.
t | the Text_t structure whose text-anchor is sought. |
const char *
. The possible values returned by this method are: "start"
"middle"
"end"
"(Unknown HTextAnchor value)"
VTextAnchor_t Text_getVTextAnchor | ( | const Text_t * | t | ) |
Returns the value of the "vtext-anchor" attribute of this Text_t.
"top"
, the top of the text is aligned to the vertical center of the box.
"middle"
, the vertical center of the text is aligned with the vertical center of the box.
"bottom"
, the bottom of the text (i.e. the very bottom of any descending letter like 'y' or 'p') is aligned with the vertical center of the box.
"baseline"
, the baseline of the text (i.e. the bottom of any non-descending letter like 'a' or e') is aligned with the vertical center of the box.
t | the Text_t structure whose vtext-anchor is sought. |
char * Text_getVTextAnchorAsString | ( | const Text_t * | t | ) |
Returns the value of the "vtext-anchor" attribute of this Text_t.
"top"
, the top of the text is aligned to the vertical center of the box.
"middle"
, the vertical center of the text is aligned with the vertical center of the box.
"bottom"
, the bottom of the text (i.e. the very bottom of any descending letter like 'y' or 'p') is aligned with the vertical center of the box.
"baseline"
, the baseline of the text (i.e. the bottom of any non-descending letter like 'a' or e') is aligned with the vertical center of the box.
t | the Text_t structure whose vtext-anchor is sought. |
"top"
"middle"
"bottom"
"baseline"
"(Unknown VTextAnchor value)"
RelAbsVector_t * Text_getX | ( | const Text_t * | t | ) |
Returns the value of the "x" element of this Text_t.
t | the Text_t structure whose x is sought. |
RelAbsVector_t * Text_getY | ( | const Text_t * | t | ) |
Returns the value of the "y" element of this Text_t.
t | the Text_t structure whose y is sought. |
RelAbsVector_t * Text_getZ | ( | const Text_t * | t | ) |
Returns the value of the "z" element of this Text_t.
t | the Text_t structure whose z is sought. |
int Text_hasRequiredAttributes | ( | const Text_t * | t | ) |
Predicate returning 1
(true) if all the required attributes for this Text_t object have been set.
t | the Text_t structure. |
1
(true) to indicate that all the required attributes of this Text_t have been set, otherwise 0
(false) is returned.int Text_isSetFontFamily | ( | const Text_t * | t | ) |
int Text_isSetFontSize | ( | const Text_t * | t | ) |
int Text_isSetFontStyle | ( | const Text_t * | t | ) |
Predicate returning 1
(true) if this Text_t's "font-style" attribute is set.
"italic"
, slanted print
"normal"
, upright print
t | the Text_t structure. |
1
(true) if this Text_t's "font-style" attribute has been set, otherwise 0
(false) is returned. int Text_isSetFontWeight | ( | const Text_t * | t | ) |
Predicate returning 1
(true) if this Text_t's "font-weight" attribute is set.
"bold"
, darker and/or thicker than normal print.
"normal"
, the typical print weight; lighter and/or thinner than "bold".
t | the Text_t structure. |
1
(true) if this Text_t's "font-weight" attribute has been set, otherwise 0
(false) is returned. int Text_isSetTextAnchor | ( | const Text_t * | t | ) |
Predicate returning 1
(true) if this Text_t's "text-anchor" attribute is set.
"start"
, the start of the text is aligned to the horizontal center of the box.
"middle"
, the horizontal center of the text is aligned to the horizontal center of the box.
"end"
, the end of the text is aligned to the horizontal center of the box.
t | the Text_t structure. |
1
(true) if this Text_t's "text-anchor" attribute has been set, otherwise 0
(false) is returned. int Text_isSetVTextAnchor | ( | const Text_t * | t | ) |
Predicate returning 1
(true) if this Text_t's "vtext-anchor" attribute is set.
"top"
, the top of the text is aligned to the vertical center of the box.
"middle"
, the vertical center of the text is aligned with the vertical center of the box.
"bottom"
, the bottom of the text (i.e. the very bottom of any descending letter like 'y' or 'p') is aligned with the vertical center of the box.
"baseline"
, the baseline of the text (i.e. the bottom of any non-descending letter like 'a' or e') is aligned with the vertical center of the box.
t | the Text_t structure. |
1
(true) if this Text_t's "vtext-anchor" attribute has been set, otherwise 0
(false) is returned. int Text_isSetX | ( | const Text_t * | t | ) |
int Text_isSetY | ( | const Text_t * | t | ) |
int Text_isSetZ | ( | const Text_t * | t | ) |
int Text_setFontFamily | ( | Text_t * | t, |
const char * | fontFamily | ||
) |
Sets the value of the "font-family" attribute of this Text_t.
t | the Text_t structure. |
fontFamily | const char * value of the "font-family" attribute to be set. Calling this function with fontFamily = NULL or an empty string is equivalent to calling Text_unsetFontFamily(). |
int Text_setFontSize | ( | Text_t * | t, |
const RelAbsVector_t * | fontSize | ||
) |
Sets the value of the "font-size" element of this Text_t.
t | the Text_t structure. |
fontSize | RelAbsVector_t value of the "font-size" element to be set. |
int Text_setFontStyle | ( | Text_t * | t, |
FontStyle_t | fontStyle | ||
) |
Sets the value of the "font-style" attribute of this Text_t.
"italic"
, slanted print
"normal"
, upright print
t | the Text_t structure. |
fontStyle | FontStyle_t value of the "font-style" attribute to be set. |
int Text_setFontStyleAsString | ( | Text_t * | t, |
const char * | fontStyle | ||
) |
Sets the value of the "font-style" attribute of this Text_t.
"italic"
, slanted print
"normal"
, upright print
t | the Text_t structure. |
fontStyle | const char * of the "font-style" attribute to be set. |
int Text_setFontWeight | ( | Text_t * | t, |
FontWeight_t | fontWeight | ||
) |
Sets the value of the "font-weight" attribute of this Text_t.
"bold"
, darker and/or thicker than normal print.
"normal"
, the typical print weight; lighter and/or thinner than "bold".
t | the Text_t structure. |
fontWeight | FontWeight_t value of the "font-weight" attribute to be set. |
int Text_setFontWeightAsString | ( | Text_t * | t, |
const char * | fontWeight | ||
) |
Sets the value of the "font-weight" attribute of this Text_t.
"bold"
, darker and/or thicker than normal print.
"normal"
, the typical print weight; lighter and/or thinner than "bold".
t | the Text_t structure. |
fontWeight | const char * of the "font-weight" attribute to be set. |
int Text_setTextAnchor | ( | Text_t * | t, |
HTextAnchor_t | textAnchor | ||
) |
Sets the value of the "text-anchor" attribute of this Text_t.
"start"
, the start of the text is aligned to the horizontal center of the box.
"middle"
, the horizontal center of the text is aligned to the horizontal center of the box.
"end"
, the end of the text is aligned to the horizontal center of the box.
t | the Text_t structure. |
textAnchor | HTextAnchor_t value of the "text-anchor" attribute to be set. |
int Text_setTextAnchorAsString | ( | Text_t * | t, |
const char * | textAnchor | ||
) |
Sets the value of the "text-anchor" attribute of this Text_t.
"start"
, the start of the text is aligned to the horizontal center of the box.
"middle"
, the horizontal center of the text is aligned to the horizontal center of the box.
"end"
, the end of the text is aligned to the horizontal center of the box.
t | the Text_t structure. |
textAnchor | const char * of the "text-anchor" attribute to be set. |
int Text_setVTextAnchor | ( | Text_t * | t, |
VTextAnchor_t | vtextAnchor | ||
) |
Sets the value of the "vtext-anchor" attribute of this Text_t.
"top"
, the top of the text is aligned to the vertical center of the box.
"middle"
, the vertical center of the text is aligned with the vertical center of the box.
"bottom"
, the bottom of the text (i.e. the very bottom of any descending letter like 'y' or 'p') is aligned with the vertical center of the box.
"baseline"
, the baseline of the text (i.e. the bottom of any non-descending letter like 'a' or e') is aligned with the vertical center of the box.
t | the Text_t structure. |
vtextAnchor | VTextAnchor_t value of the "vtext-anchor" attribute to be set. |
int Text_setVTextAnchorAsString | ( | Text_t * | t, |
const char * | vtextAnchor | ||
) |
Sets the value of the "vtext-anchor" attribute of this Text_t.
"top"
, the top of the text is aligned to the vertical center of the box.
"middle"
, the vertical center of the text is aligned with the vertical center of the box.
"bottom"
, the bottom of the text (i.e. the very bottom of any descending letter like 'y' or 'p') is aligned with the vertical center of the box.
"baseline"
, the baseline of the text (i.e. the bottom of any non-descending letter like 'a' or e') is aligned with the vertical center of the box.
t | the Text_t structure. |
vtextAnchor | const char * of the "vtext-anchor" attribute to be set. |
int Text_setX | ( | Text_t * | t, |
const RelAbsVector_t * | x | ||
) |
Sets the value of the "x" element of this Text_t.
t | the Text_t structure. |
x | RelAbsVector_t value of the "x" element to be set. |
int Text_setY | ( | Text_t * | t, |
const RelAbsVector_t * | y | ||
) |
Sets the value of the "y" element of this Text_t.
t | the Text_t structure. |
y | RelAbsVector_t value of the "y" element to be set. |
int Text_setZ | ( | Text_t * | t, |
const RelAbsVector_t * | z | ||
) |
Sets the value of the "z" element of this Text_t.
t | the Text_t structure. |
z | RelAbsVector_t value of the "z" element to be set. |
int Text_unsetFontFamily | ( | Text_t * | t | ) |
Unsets the value of the "font-family" attribute of this Text_t.
t | the Text_t structure. |
int Text_unsetFontSize | ( | Text_t * | t | ) |
Unsets the value of the "font-size" element of this Text_t.
t | the Text_t structure. |
int Text_unsetFontStyle | ( | Text_t * | t | ) |
Unsets the value of the "font-style" attribute of this Text_t.
"italic"
, slanted print
"normal"
, upright print
t | the Text_t structure. |
int Text_unsetFontWeight | ( | Text_t * | t | ) |
Unsets the value of the "font-weight" attribute of this Text_t.
"bold"
, darker and/or thicker than normal print.
"normal"
, the typical print weight; lighter and/or thinner than "bold".
t | the Text_t structure. |
int Text_unsetTextAnchor | ( | Text_t * | t | ) |
Unsets the value of the "text-anchor" attribute of this Text_t.
"start"
, the start of the text is aligned to the horizontal center of the box.
"middle"
, the horizontal center of the text is aligned to the horizontal center of the box.
"end"
, the end of the text is aligned to the horizontal center of the box.
t | the Text_t structure. |
int Text_unsetVTextAnchor | ( | Text_t * | t | ) |
Unsets the value of the "vtext-anchor" attribute of this Text_t.
"top"
, the top of the text is aligned to the vertical center of the box.
"middle"
, the vertical center of the text is aligned with the vertical center of the box.
"bottom"
, the bottom of the text (i.e. the very bottom of any descending letter like 'y' or 'p') is aligned with the vertical center of the box.
"baseline"
, the baseline of the text (i.e. the bottom of any non-descending letter like 'a' or e') is aligned with the vertical center of the box.
t | the Text_t structure. |
int Text_unsetX | ( | Text_t * | t | ) |
Unsets the value of the "x" element of this Text_t.
t | the Text_t structure. |
int Text_unsetY | ( | Text_t * | t | ) |
Unsets the value of the "y" element of this Text_t.
t | the Text_t structure. |
int Text_unsetZ | ( | Text_t * | t | ) |
Unsets the value of the "z" element of this Text_t.
t | the Text_t structure. |