8 #include <sbml/packages/render/sbml/Text.h>
23 mFontSize(
CLRelAbsVector(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())),
24 mFontWeight(
CLText::WEIGHT_UNSET),
25 mFontStyle(
CLText::STYLE_UNSET),
26 mTextAnchor(
CLText::ANCHOR_UNSET),
27 mVTextAnchor(
CLText::ANCHOR_UNSET),
44 mFontSize(
CLRelAbsVector(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())),
45 mFontWeight(
CLText::WEIGHT_UNSET),
46 mFontStyle(
CLText::STYLE_UNSET),
47 mTextAnchor(
CLText::ANCHOR_UNSET),
48 mVTextAnchor(
CLText::ANCHOR_UNSET),
64 mFontFamily(source.mFontFamily),
65 mFontSize(source.mFontSize),
66 mFontWeight(source.mFontWeight),
67 mFontStyle(source.mFontStyle),
68 mTextAnchor(source.mTextAnchor),
69 mVTextAnchor(source.mVTextAnchor),
85 mFontFamily(source.getFontFamily()),
86 mFontSize(source.getFontSize()),
87 mText(source.getText()),
92 switch (source.getFontWeight())
94 case Text::WEIGHT_UNSET:
98 case Text::WEIGHT_BOLD:
107 switch (source.getFontStyle())
109 case Text::STYLE_UNSET:
113 case Text::STYLE_ITALIC:
122 switch (source.getTextAnchor())
124 case Text::ANCHOR_UNSET:
128 case Text::ANCHOR_END:
132 case Text::ANCHOR_MIDDLE:
141 switch (source.getVTextAnchor())
143 case Text::ANCHOR_UNSET:
147 case Text::ANCHOR_BOTTOM:
151 case Text::ANCHOR_MIDDLE:
376 return !this->
mText.empty();
440 Text* pText =
new Text(level, version);
442 RelAbsVector* pV1 = this->
mX.
toSBML();
443 RelAbsVector* pV2 = this->
mY.
toSBML();
444 RelAbsVector* pV3 = this->
mZ.
toSBML();
445 pText->setCoordinates(*pV1, *pV2, *pV3);
450 pText->setFontSize(*pV1);
453 pText->setText(this->
getText());
458 pText->setFontWeight(Text::WEIGHT_UNSET);
462 pText->setFontWeight(Text::WEIGHT_BOLD);
466 pText->setFontWeight(Text::WEIGHT_NORMAL);
473 pText->setFontStyle(Text::STYLE_UNSET);
477 pText->setFontStyle(Text::STYLE_ITALIC);
481 pText->setFontStyle(Text::STYLE_NORMAL);
488 pText->setTextAnchor(Text::ANCHOR_UNSET);
492 pText->setTextAnchor(Text::ANCHOR_END);
496 pText->setTextAnchor(Text::ANCHOR_MIDDLE);
500 pText->setTextAnchor(Text::ANCHOR_START);
507 pText->setVTextAnchor(Text::ANCHOR_UNSET);
511 pText->setVTextAnchor(Text::ANCHOR_BOTTOM);
515 pText->setVTextAnchor(Text::ANCHOR_MIDDLE);
519 pText->setVTextAnchor(Text::ANCHOR_TOP);
bool remove(const std::string &key)
void setText(const std::string &text)
const CLRelAbsVector & getZ() const
const CLRelAbsVector & getY() const
CLText(CCopasiContainer *pParent)
double getRelativeValue() const
void setVTextAnchor(CLText::TEXT_ANCHOR anchor)
bool isSetFontStyle() const
void setTextAnchor(CLText::TEXT_ANCHOR anchor)
const CLRelAbsVector & getFontSize() const
void setFontSize(const CLRelAbsVector &size)
bool isSetFontSize() const
bool isSetFontFamily() const
bool isSetVTextAnchor() const
FONT_STYLE getFontStyle() const
RelAbsVector * toSBML() const
const std::string & getKey() const
void setFontWeight(CLText::FONT_WEIGHT weight)
std::string add(const std::string &prefix, CCopasiObject *pObject)
void setCoordinates(const CLRelAbsVector &x, const CLRelAbsVector &y, const CLRelAbsVector &z=CLRelAbsVector(0.0, 0.0))
void setFontFamily(const std::string &family)
double getAbsoluteValue() const
static CKeyFactory * getKeyFactory()
void setX(const CLRelAbsVector &coord)
Text * toSBML(unsigned int level, unsigned int version) const
const std::string & getFontFamily() const
bool isSetTextAnchor() const
TEXT_ANCHOR getVTextAnchor() const
const std::string & getText() const
void setY(const CLRelAbsVector &coord)
const CLRelAbsVector & getX() const
void setZ(const CLRelAbsVector &coord)
bool isSetFontWeight() const
TEXT_ANCHOR getTextAnchor() const
virtual void addSBMLAttributes(GraphicalPrimitive1D *pPrimitive) const
FONT_WEIGHT getFontWeight() const
void setFontStyle(CLText::FONT_STYLE style)