Inkscape
Vector Graphics Editor
|
SVG data parser. More...
Go to the source code of this file.
Namespaces | |
namespace | Inkscape |
Helper class to stream background task notifications as a series of messages. | |
Functions | |
static unsigned | sp_svg_length_read_lff (gchar const *str, SVGLength::Unit *unit, float *val, float *computed, char **next) |
unsigned int | sp_svg_number_read_f (gchar const *str, float *val) |
unsigned int | sp_svg_number_read_d (gchar const *str, double *val) |
static std::string | sp_svg_number_write_d (double val, unsigned int tprec, unsigned int fprec) |
std::string | sp_svg_number_write_de (double val, unsigned int tprec, int min_exp) |
unsigned int | sp_svg_length_read_computed_absolute (gchar const *str, float *length) |
std::vector< SVGLength > | sp_svg_length_list_read (gchar const *str) |
unsigned int | sp_svg_length_read_ldd (gchar const *str, SVGLength::Unit *unit, double *value, double *computed) |
double | sp_svg_read_percentage (char const *str, double def) |
gchar const * | sp_svg_length_get_css_units (SVGLength::Unit unit) |
bool | svg_length_absolute_unit (SVGLength::Unit u) |
std::string | sp_svg_length_write_with_units (SVGLength const &length) |
N.B. This routine will sometimes return strings with ‘e’ notation, so is unsuitable for CSS lengths (which don't allow scientific ‘e’ notation). | |
char const * | Inkscape::refX_named_to_percent (char const *str) |
char const * | Inkscape::refY_named_to_percent (char const *str) |
SVG data parser.
Definition in file svg-length.cpp.
gchar const * sp_svg_length_get_css_units | ( | SVGLength::Unit | unit | ) |
Definition at line 595 of file svg-length.cpp.
References SVGLength::CM, SVGLength::EM, SVGLength::EX, SVGLength::INCH, SVGLength::MM, SVGLength::NONE, SVGLength::PC, SVGLength::PERCENT, SVGLength::PT, and SVGLength::PX.
Referenced by SVGLength::getUnit(), and sp_svg_length_write_with_units().
std::vector< SVGLength > sp_svg_length_list_read | ( | gchar const * | str | ) |
Definition at line 244 of file svg-length.cpp.
References sp_svg_length_read_lff().
Referenced by TextTagAttributes::readSingleAttribute().
unsigned int sp_svg_length_read_computed_absolute | ( | gchar const * | str, |
float * | length | ||
) |
Definition at line 222 of file svg-length.cpp.
References sp_svg_length_read_lff(), and svg_length_absolute_unit().
Referenced by SPOffset::set(), and SPSpiral::set().
unsigned int sp_svg_length_read_ldd | ( | gchar const * | str, |
SVGLength::Unit * | unit, | ||
double * | value, | ||
double * | computed | ||
) |
Definition at line 431 of file svg-length.cpp.
References sp_svg_length_read_lff().
Referenced by SPStar::set().
|
static |
Definition at line 280 of file svg-length.cpp.
References SVGLength::CM, Inkscape::Util::Quantity::convert(), SVGLength::EM, SVGLength::EX, SVGLength::INCH, SVGLength::MM, SVGLength::NONE, SVGLength::PC, SVGLength::PERCENT, SVGLength::PT, and SVGLength::PX.
Referenced by SVGLength::read(), SVGLength::readAbsolute(), sp_svg_length_list_read(), sp_svg_length_read_computed_absolute(), and sp_svg_length_read_ldd().
std::string sp_svg_length_write_with_units | ( | SVGLength const & | length | ) |
N.B. This routine will sometimes return strings with ‘e’ notation, so is unsuitable for CSS lengths (which don't allow scientific ‘e’ notation).
Definition at line 621 of file svg-length.cpp.
References SVGLength::PERCENT, sp_svg_length_get_css_units(), and Inkscape::SVGOStringStream::str().
Referenced by SVGLength::write(), SPRoot::write(), SPSymbol::write(), and SPDimensions::writeDimensions().
unsigned int sp_svg_number_read_d | ( | gchar const * | str, |
double * | val | ||
) |
Definition at line 50 of file svg-length.cpp.
Referenced by Inkscape::SVG::PathString::State::appendNumber(), Inkscape::LivePathEffect::PointParam::param_readSVGValue(), Inkscape::LivePathEffect::ScalarParam::param_readSVGValue(), Inkscape::LivePathEffect::RandomParam::param_readSVGValue(), Inkscape::LivePathEffect::TransformedPointParam::param_readSVGValue(), Inkscape::LivePathEffect::VectorParam::param_readSVGValue(), Inkscape::LivePathEffect::PointParam::param_update_default(), Inkscape::LivePathEffect::ScalarParam::param_update_default(), Inkscape::LivePathEffect::ScalarArrayParam::param_update_default(), Inkscape::LivePathEffect::TransformedPointParam::param_update_default(), Inkscape::LivePathEffect::VectorParam::param_update_default(), Inkscape::LivePathEffect::RandomParam::param_update_default(), Inkscape::LivePathEffect::ArrayParam< StorageType >::readsvg(), SPGenericEllipse::set(), SPGuide::set(), and Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE().
unsigned int sp_svg_number_read_f | ( | gchar const * | str, |
float * | val | ||
) |
Definition at line 34 of file svg-length.cpp.
Referenced by SPIFloat::read(), SPIScale24::read(), Inkscape::LivePathEffect::ArrayParam< StorageType >::readsvg(), sp_desktop_get_master_opacity_tool(), and sp_desktop_get_opacity_tool().
|
static |
Definition at line 66 of file svg-length.cpp.
References buf, floor(), and MAX.
Referenced by sp_svg_number_write_de().
std::string sp_svg_number_write_de | ( | double | val, |
unsigned int | tprec, | ||
int | min_exp | ||
) |
Definition at line 117 of file svg-length.cpp.
References buf, floor(), and sp_svg_number_write_d().
Referenced by Inkscape::SVG::PathString::State::appendNumber(), and sp_svg_transform_write().
double sp_svg_read_percentage | ( | char const * | str, |
double | def | ||
) |
Definition at line 574 of file svg-length.cpp.
Referenced by SPStop::set(), SPText::set(), and GrDrag::styleSet().
bool svg_length_absolute_unit | ( | SVGLength::Unit | u | ) |
Definition at line 612 of file svg-length.cpp.
References SVGLength::EM, SVGLength::EX, and SVGLength::PERCENT.
Referenced by SVGLength::isAbsolute(), SVGLength::readAbsolute(), and sp_svg_length_read_computed_absolute().