SVG parser: better stderr - don't assume fill/stroke ref is a <gradient>, can be a <pattern> also.

This commit is contained in:
Artem Pavlenko 2019-05-14 10:30:26 +01:00
parent dc15e70f79
commit 831e353c5d

View file

@ -573,14 +573,14 @@ void parse_stroke(svg_parser& parser, char const* value)
else
{
std::stringstream ss;
ss << "SVG parse error: failed to locate <gradient> stroke with <id> \"" << id << "\"";
ss << "SVG parse error: failed to locate stroke with <id> \"" << id << "\"";
parser.err_handler().on_error(ss.str());
}
}
else
{
std::stringstream ss;
ss << "SVG parse error: failed to locate <gradient> stroke with <id> \"" << id << "\"";
ss << "SVG parse error: failed to locate stroke with <id> \"" << id << "\"";
parser.err_handler().on_error(ss.str());
}
}
@ -616,14 +616,14 @@ void parse_fill(svg_parser& parser, char const* value)
else
{
std::stringstream ss;
ss << "SVG parse error: failed to locate <gradient> fill with <id> \"" << id << "\"";
ss << "SVG parse error: failed to locate fill with <id> \"" << id << "\"";
parser.err_handler().on_error(ss.str());
}
}
else
{
std::stringstream ss;
ss << "SVG parse error: failed to locate <gradient> fill with <id> \"" << id << "\"";
ss << "SVG parse error: failed to locate fill with <id> \"" << id << "\"";
parser.err_handler().on_error(ss.str());
}
}