17 #include <sbml/packages/render/sbml/GraphicalPrimitive1D.h>
27 mStrokeWidth(std::numeric_limits<double>::quiet_NaN())
36 mStroke(source.getStroke()),
37 mStrokeWidth(source.getStrokeWidth()),
38 mStrokeDashArray(source.getDashArray())
55 this->
mStrokeWidth = (width > 0 || width != width) ? width : 0.0;
127 std::istringstream is(s);
128 size_t size = s.size() + 1;
129 char* tmp =
new char[size];
134 is.getline(tmp2, size,
',');
138 while (tmp2[0] != 0 && is.good())
142 value = strtol(tmp2, endptr, 10);
144 if (value < 0 || *endptr == tmp3 || (**endptr !=
'\0' && **endptr !=
' ' && **endptr !=
'\t'))
154 is.getline(tmp2, size,
',');
164 value = strtol(tmp2, endptr, 10);
166 if (value < 0 || *endptr == tmp3 || (**endptr !=
'\0' && **endptr !=
' ' && **endptr !=
'\t'))
192 pPrimitive->setStroke(this->
mStroke);
bool isSetDashArray() const
double getStrokeWidth() const
bool isSetStrokeWidth() const
void parseDashArray(const std::string &s)
const std::string & getStroke() const
void setDashArray(const std::vector< unsigned int > &array)
void setStroke(const std::string &key)
std::vector< unsigned int > mStrokeDashArray
void setStrokeWidth(double width)
const std::vector< unsigned int > & getDashArray() const
virtual void addSBMLAttributes(GraphicalPrimitive1D *pPrimitive) const