[DEV] update to the exml patch

This commit is contained in:
Edouard DUPIN 2013-06-28 21:49:14 +02:00
parent 18832b2305
commit b8bb3aebf2
6 changed files with 12 additions and 12 deletions

View File

@ -49,13 +49,13 @@ bool esvg::Circle::Parse(exml::Element * _element, agg::trans_affine& _parentTra
if (content.Size()!=0) {
m_radius = ParseLength(content);
} else {
SVG_ERROR("(l "<<_element->Pos()<<") Circle \"r\" is not present");
SVG_ERROR("(l "<<_element->GetPos()<<") Circle \"r\" is not present");
return false;
}
if (0 > m_radius) {
m_radius = 0;
SVG_ERROR("(l "<<_element->Pos()<<") Circle \"r\" is negative");
SVG_ERROR("(l "<<_element->GetPos()<<") Circle \"r\" is negative");
return false;
}
_sizeMax.setValue(m_position.x() + m_radius, m_position.y() + m_radius);

View File

@ -50,14 +50,14 @@ bool esvg::Ellipse::Parse(exml::Element * _element, agg::trans_affine& _parentTr
if (content.Size()!=0) {
m_r.setX(ParseLength(content));
} else {
SVG_ERROR("(l "<<_element->Pos()<<") Ellipse \"rx\" is not present");
SVG_ERROR("(l "<<_element->GetPos()<<") Ellipse \"rx\" is not present");
return false;
}
content = _element->GetAttribute("ry");
if (content.Size()!=0) {
m_r.setY(ParseLength(content));
} else {
SVG_ERROR("(l "<<_element->Pos()<<") Ellipse \"ry\" is not present");
SVG_ERROR("(l "<<_element->GetPos()<<") Ellipse \"ry\" is not present");
return false;
}
_sizeMax.setValue(m_c.x() + m_r.x(), m_c.y() + m_r.y());

View File

@ -82,13 +82,13 @@ bool esvg::Group::Parse(exml::Element * _element, agg::trans_affine& _parentTran
} else if (child->GetValue() == "text") {
elementParser = new esvg::Text(m_paint);
} else {
SVG_ERROR("(l "<<child->Pos()<<") node not suported : \""<<child->GetValue()<<"\" must be [g,a,path,rect,circle,ellipse,line,polyline,polygon,text]");
SVG_ERROR("(l "<<child->GetPos()<<") node not suported : \""<<child->GetValue()<<"\" must be [g,a,path,rect,circle,ellipse,line,polyline,polygon,text]");
}
if (NULL == elementParser) {
SVG_ERROR("(l "<<child->Pos()<<") error on node: \""<<child->GetValue()<<"\" allocation error or not supported ...");
SVG_ERROR("(l "<<child->GetPos()<<") error on node: \""<<child->GetValue()<<"\" allocation error or not supported ...");
} else {
if (false == elementParser->Parse(child, m_transformMatrix, tmpPos)) {
SVG_ERROR("(l "<<child->Pos()<<") error on node: \""<<child->GetValue()<<"\" Sub Parsing ERROR");
SVG_ERROR("(l "<<child->GetPos()<<") error on node: \""<<child->GetValue()<<"\" Sub Parsing ERROR");
delete(elementParser);
elementParser = NULL;
} else {

View File

@ -79,7 +79,7 @@ bool esvg::Path::Parse(exml::Element * _element, agg::trans_affine& _parentTrans
etk::UString elementXML1 = _element->GetAttribute("d");
if (elementXML1.Size()==0) {
SVG_ERROR("(l "<<_element->Pos()<<") path: missing 'p' attribute");
SVG_ERROR("(l "<<_element->GetPos()<<") path: missing 'p' attribute");
return false;
}
SVG_VERBOSE("Parse Path : \"" << elementXML << "\"");

View File

@ -36,7 +36,7 @@ bool esvg::Polyline::Parse(exml::Element * _element, agg::trans_affine& _parentT
etk::UString sss1 = _element->GetAttribute("points");
if (sss1.Size()==0) {
SVG_ERROR("(l "<<_element->Pos()<<") polyline: missing points attribute");
SVG_ERROR("(l "<<_element->GetPos()<<") polyline: missing points attribute");
return false;
}
_sizeMax.setValue(0,0);

View File

@ -121,14 +121,14 @@ esvg::Document::Document(const etk::UString& _fileName) : m_renderedElement(NULL
// Node ignore : generaly inkscape data
continue;
} else {
SVG_ERROR("(l "<<child->Pos()<<") node not suported : \""<<child->GetValue()<<"\" must be [title,g,a,path,rect,circle,ellipse,line,polyline,polygon,text,metadata]");
SVG_ERROR("(l "<<child->GetPos()<<") node not suported : \""<<child->GetValue()<<"\" must be [title,g,a,path,rect,circle,ellipse,line,polyline,polygon,text,metadata]");
}
if (NULL == elementParser) {
SVG_ERROR("(l "<<child->Pos()<<") error on node: \""<<child->GetValue()<<"\" allocation error or not supported ...");
SVG_ERROR("(l "<<child->GetPos()<<") error on node: \""<<child->GetValue()<<"\" allocation error or not supported ...");
continue;
}
if (false == elementParser->Parse(child, m_transformMatrix, size)) {
SVG_ERROR("(l "<<child->Pos()<<") error on node: \""<<child->GetValue()<<"\" Sub Parsing ERROR");
SVG_ERROR("(l "<<child->GetPos()<<") error on node: \""<<child->GetValue()<<"\" Sub Parsing ERROR");
delete(elementParser);
elementParser = NULL;
continue;