Real
-CanvasParser::parse_real(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_real(xmlpp::Element *element)
{
assert(element->get_name()=="real");
}
int
-CanvasParser::parse_integer(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_integer(xmlpp::Element *element)
{
assert(element->get_name()=="integer");
}
Vector
-CanvasParser::parse_vector(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_vector(xmlpp::Element *element)
{
assert(element->get_name()=="vector");
}
Color
-CanvasParser::parse_color(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_color(xmlpp::Element *element)
{
assert(element->get_name()=="color");
}
synfig::String
-CanvasParser::parse_string(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_string(xmlpp::Element *element)
{
assert(element->get_name()=="string");
}
bool
-CanvasParser::parse_bool(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_bool(xmlpp::Element *element)
{
assert(element->get_name()=="bool");
}
Gradient
-CanvasParser::parse_gradient(xmlpp::Element *node,Canvas::Handle canvas)
+CanvasParser::parse_gradient(xmlpp::Element *node)
{
assert(node->get_name()=="gradient");
Gradient ret;
else
{
Gradient::CPoint cpoint;
- cpoint.color=parse_color(child,canvas);
+ cpoint.color=parse_color(child);
if(!child->get_attribute("pos"))
{
}
Segment
-CanvasParser::parse_segment(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_segment(xmlpp::Element *element)
{
assert(element->get_name()=="segment");
continue;
}
- seg.p1=parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas);
+ seg.p1=parse_vector(dynamic_cast<xmlpp::Element*>(*iter));
}
else
if(child->get_name()=="t1")
continue;
}
- seg.t1=parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas);
+ seg.t1=parse_vector(dynamic_cast<xmlpp::Element*>(*iter));
}
else
if(child->get_name()=="p2")
continue;
}
- seg.p2=parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas);
+ seg.p2=parse_vector(dynamic_cast<xmlpp::Element*>(*iter));
}
else
if(child->get_name()=="t2")
continue;
}
- seg.t2=parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas);
+ seg.t2=parse_vector(dynamic_cast<xmlpp::Element*>(*iter));
}
else
error_unexpected_element(child,child->get_name());
}
BLinePoint
-CanvasParser::parse_bline_point(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_bline_point(xmlpp::Element *element)
{
assert(element->get_name()=="bline_point");
if(element->get_children().empty())
continue;
}
- ret.set_vertex(parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas));
+ ret.set_vertex(parse_vector(dynamic_cast<xmlpp::Element*>(*iter)));
}
else
// Tangent 1
continue;
}
- ret.set_tangent1(parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas));
+ ret.set_tangent1(parse_vector(dynamic_cast<xmlpp::Element*>(*iter)));
}
else
// Tangent 2
continue;
}
- ret.set_tangent2(parse_vector(dynamic_cast<xmlpp::Element*>(*iter),canvas));
+ ret.set_tangent2(parse_vector(dynamic_cast<xmlpp::Element*>(*iter)));
ret.set_split_tangent_flag(true);
}
else
continue;
}
- ret.set_width(parse_real(dynamic_cast<xmlpp::Element*>(*iter),canvas));
+ ret.set_width(parse_real(dynamic_cast<xmlpp::Element*>(*iter)));
}
else
// origin
continue;
}
- ret.set_origin(parse_real(dynamic_cast<xmlpp::Element*>(*iter),canvas));
+ ret.set_origin(parse_real(dynamic_cast<xmlpp::Element*>(*iter)));
}
else
error_unexpected_element(child,child->get_name());
}
Angle
-CanvasParser::parse_angle(xmlpp::Element *element,Canvas::Handle canvas)
+CanvasParser::parse_angle(xmlpp::Element *element)
{
assert(element->get_name()=="angle");
CanvasParser::parse_value(xmlpp::Element *element,Canvas::Handle canvas)
{
if(element->get_name()=="real")
- return parse_real(element,canvas);
+ return parse_real(element);
else
if(element->get_name()=="time")
return parse_time(element,canvas);
else
if(element->get_name()=="integer")
- return parse_integer(element,canvas);
+ return parse_integer(element);
else
if(element->get_name()=="string")
- return parse_string(element,canvas);
+ return parse_string(element);
else
if(element->get_name()=="vector")
- {
- return parse_vector(element,canvas);
- }
+ return parse_vector(element);
else
if(element->get_name()=="color")
- return parse_color(element,canvas);
+ return parse_color(element);
else
if(element->get_name()=="segment")
- return parse_segment(element,canvas);
+ return parse_segment(element);
else
if(element->get_name()=="list")
return parse_list(element,canvas);
else
if(element->get_name()=="gradient")
- return parse_gradient(element,canvas);
+ return parse_gradient(element);
else
if(element->get_name()=="bool")
- return parse_bool(element,canvas);
+ return parse_bool(element);
else
//if(element->get_name()=="canvas")
// return parse_canvas(element,canvas,true); // inline canvas
//else
if(element->get_name()=="angle" || element->get_name()=="degrees" || element->get_name()=="radians" || element->get_name()=="rotations")
- return parse_angle(element,canvas);
+ return parse_angle(element);
else
if(element->get_name()=="bline_point")
- return parse_bline_point(element,canvas);
+ return parse_bline_point(element);
else
if(element->get_name()=="canvas")
return ValueBase(parse_canvas(element,canvas,true));
// ValueBase Parsing Functions
- Real parse_real(xmlpp::Element *node,Canvas::Handle canvas);
+ Real parse_real(xmlpp::Element *node);
Time parse_time(xmlpp::Element *node,Canvas::Handle canvas);
- int parse_integer(xmlpp::Element *node,Canvas::Handle canvas);
- Vector parse_vector(xmlpp::Element *node,Canvas::Handle canvas);
- Color parse_color(xmlpp::Element *node,Canvas::Handle canvas);
- Angle parse_angle(xmlpp::Element *node,Canvas::Handle canvas);
- String parse_string(xmlpp::Element *node,Canvas::Handle canvas);
- bool parse_bool(xmlpp::Element *node,Canvas::Handle canvas);
- Segment parse_segment(xmlpp::Element *node,Canvas::Handle canvas);
+ int parse_integer(xmlpp::Element *node);
+ Vector parse_vector(xmlpp::Element *node);
+ Color parse_color(xmlpp::Element *node);
+ Angle parse_angle(xmlpp::Element *node);
+ String parse_string(xmlpp::Element *node);
+ bool parse_bool(xmlpp::Element *node);
+ Segment parse_segment(xmlpp::Element *node);
ValueBase parse_list(xmlpp::Element *node,Canvas::Handle canvas);
- Gradient parse_gradient(xmlpp::Element *node,Canvas::Handle canvas);
- BLinePoint parse_bline_point(xmlpp::Element *node,Canvas::Handle canvas);
+ Gradient parse_gradient(xmlpp::Element *node);
+ BLinePoint parse_bline_point(xmlpp::Element *node);
Keyframe parse_keyframe(xmlpp::Element *node,Canvas::Handle canvas);