synfig-core  1.0.3
Macros | Functions | Variables
savecanvas.cpp File Reference

Writeme. More...

#include "savecanvas.h"
#include "general.h"
#include "valuenode.h"
#include "valuenodes/valuenode_animated.h"
#include "valuenodes/valuenode_const.h"
#include "valuenodes/valuenode_linear.h"
#include "valuenodes/valuenode_staticlist.h"
#include "valuenodes/valuenode_dynamiclist.h"
#include "valuenodes/valuenode_reference.h"
#include "valuenodes/valuenode_subtract.h"
#include "valuenodes/valuenode_bline.h"
#include "valuenodes/valuenode_bone.h"
#include "valuenodes/valuenode_wplist.h"
#include "valuenodes/valuenode_dilist.h"
#include "dashitem.h"
#include "time.h"
#include "keyframe.h"
#include "layer.h"
#include "string.h"
#include "paramdesc.h"
#include "weightedvalue.h"
#include "pair.h"
#include "zstreambuf.h"
#include "importer.h"
#include "cairoimporter.h"
#include <libxml++/libxml++.h>
#include <ETL/stringf>
#include "gradient.h"
#include <errno.h>
#include <libxml/tree.h>

Macros

#define COLOR_VALUE_TYPE_FORMAT   "%f"
#define VECTOR_VALUE_TYPE_FORMAT   "%0.10f"
#define TIME_TYPE_FORMAT   "%0.3f"
#define VIEW_BOX_FORMAT   "%f %f %f %f"

Functions

xmlpp::Element * encode_canvas (xmlpp::Element *root, Canvas::ConstHandle canvas)
xmlpp::Element * encode_value_node (xmlpp::Element *root, ValueNode::ConstHandle value_node, Canvas::ConstHandle canvas)
xmlpp::Element * encode_value_node_bone (xmlpp::Element *root, ValueNode::ConstHandle value_node, Canvas::ConstHandle canvas)
xmlpp::Element * encode_value_node_bone_id (xmlpp::Element *root, ValueNode::ConstHandle value_node, Canvas::ConstHandle canvas)
xmlpp::Element * encode_keyframe (xmlpp::Element *root, const Keyframe &kf, float fps)
xmlpp::Element * encode_interpolation (xmlpp::Element *root, Interpolation value, String attribute)
xmlpp::Element * encode_static (xmlpp::Element *root, bool s)
xmlpp::Element * encode_real (xmlpp::Element *root, Real v)
xmlpp::Element * encode_time (xmlpp::Element *root, Time t)
xmlpp::Element * encode_integer (xmlpp::Element *root, int i)
xmlpp::Element * encode_bool (xmlpp::Element *root, bool b)
xmlpp::Element * encode_string (xmlpp::Element *root, const String &str)
xmlpp::Element * encode_vector (xmlpp::Element *root, Vector vect)
xmlpp::Element * encode_color (xmlpp::Element *root, Color color)
xmlpp::Element * encode_angle (xmlpp::Element *root, Angle theta)
xmlpp::Element * encode_segment (xmlpp::Element *root, Segment seg)
xmlpp::Element * encode_bline_point (xmlpp::Element *root, BLinePoint bline_point)
xmlpp::Element * encode_width_point (xmlpp::Element *root, WidthPoint width_point)
xmlpp::Element * encode_dash_item (xmlpp::Element *root, DashItem dash_item)
xmlpp::Element * encode_gradient (xmlpp::Element *root, Gradient x)
xmlpp::Element * encode_value (xmlpp::Element *root, const ValueBase &data, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_list (xmlpp::Element *root, std::vector< ValueBase > list, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_transformation (xmlpp::Element *root, const Transformation &transformation)
xmlpp::Element * encode_weighted_value (xmlpp::Element *root, types_namespace::TypeWeightedValueBase &type, const ValueBase &data, Canvas::ConstHandle canvas)
xmlpp::Element * encode_pair (xmlpp::Element *root, types_namespace::TypePairBase &type, const ValueBase &data, Canvas::ConstHandle canvas)
xmlpp::Element * encode_animated (xmlpp::Element *root, ValueNode_Animated::ConstHandle value_node, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_subtract (xmlpp::Element *root, ValueNode_Subtract::ConstHandle value_node, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_static_list (xmlpp::Element *root, ValueNode_StaticList::ConstHandle value_node, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_dynamic_list (xmlpp::Element *root, ValueNode_DynamicList::ConstHandle value_node, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_linkable_value_node (xmlpp::Element *root, LinkableValueNode::ConstHandle value_node, Canvas::ConstHandle canvas=0)
xmlpp::Element * encode_layer (xmlpp::Element *root, Layer::ConstHandle layer)
xmlpp::Element * encode_canvas_toplevel (xmlpp::Element *root, Canvas::ConstHandle canvas)

Variables

ReleaseVersion save_canvas_version = ReleaseVersion(RELEASE_VERSION_END-1)
int valuenode_too_new_count
save_canvas_external_file_callback_t save_canvas_external_file_callback = NULL
void * save_canvas_external_file_user_data = NULL

Detailed Description

Writeme.

$Id$

Macro Definition Documentation

#define COLOR_VALUE_TYPE_FORMAT   "%f"

Referenced by encode_color().

#define VECTOR_VALUE_TYPE_FORMAT   "%0.10f"

Referenced by encode_real(), and encode_vector().

#define TIME_TYPE_FORMAT   "%0.3f"

Referenced by encode_canvas().

#define VIEW_BOX_FORMAT   "%f %f %f %f"

Referenced by encode_canvas().

Function Documentation

xmlpp::Element * encode_canvas ( xmlpp::Element *  root,
Canvas::ConstHandle  canvas 
)
Todo:
check where the parentheses should really go - around the && or the ||?

If children is not empty (there are exported canvases in the current canvas) they must be listed in the defs section regardless the result of check the Value Node list (exported value nodes in the canvas) and if the canvas is in line or not. Inline canvases cannot have exported canvases inside.

References encode_keyframe(), encode_layer(), encode_value(), encode_value_node(), encode_value_node_bone(), synfig::Color::get_a(), synfig::RendDesc::get_antialias(), synfig::Color::get_b(), synfig::RendDesc::get_bg_color(), synfig::RendDesc::get_br(), synfig::RendDesc::get_frame_rate(), synfig::Color::get_g(), synfig::RendDesc::get_h(), synfig::Color::get_r(), synfig::Time::get_string(), synfig::RendDesc::get_time_end(), synfig::RendDesc::get_time_start(), synfig::RendDesc::get_tl(), synfig::RendDesc::get_w(), synfig::RendDesc::get_x_res(), synfig::RendDesc::get_y_res(), TIME_TYPE_FORMAT, and VIEW_BOX_FORMAT.

Referenced by encode_canvas_toplevel(), and encode_value().

xmlpp::Element * encode_value_node ( xmlpp::Element *  root,
ValueNode::ConstHandle  value_node,
Canvas::ConstHandle  canvas 
)
xmlpp::Element * encode_value_node_bone ( xmlpp::Element *  root,
ValueNode::ConstHandle  value_node,
Canvas::ConstHandle  canvas 
)
xmlpp::Element * encode_value_node_bone_id ( xmlpp::Element *  root,
ValueNode::ConstHandle  value_node,
Canvas::ConstHandle  canvas 
)
xmlpp::Element* encode_keyframe ( xmlpp::Element *  root,
const Keyframe kf,
float  fps 
)
xmlpp::Element* encode_interpolation ( xmlpp::Element *  root,
Interpolation  value,
String  attribute 
)
xmlpp::Element* encode_static ( xmlpp::Element *  root,
bool  s 
)

Referenced by encode_value().

xmlpp::Element* encode_real ( xmlpp::Element *  root,
Real  v 
)
xmlpp::Element* encode_time ( xmlpp::Element *  root,
Time  t 
)

References synfig::Time::get_string().

Referenced by encode_value().

xmlpp::Element* encode_integer ( xmlpp::Element *  root,
int  i 
)
xmlpp::Element* encode_bool ( xmlpp::Element *  root,
bool  b 
)

Referenced by encode_value().

xmlpp::Element* encode_string ( xmlpp::Element *  root,
const String str 
)

Referenced by encode_value().

xmlpp::Element* encode_vector ( xmlpp::Element *  root,
Vector  vect 
)
xmlpp::Element* encode_color ( xmlpp::Element *  root,
Color  color 
)
xmlpp::Element* encode_angle ( xmlpp::Element *  root,
Angle  theta 
)
xmlpp::Element* encode_segment ( xmlpp::Element *  root,
Segment  seg 
)
xmlpp::Element* encode_bline_point ( xmlpp::Element *  root,
BLinePoint  bline_point 
)
xmlpp::Element* encode_width_point ( xmlpp::Element *  root,
WidthPoint  width_point 
)
xmlpp::Element* encode_dash_item ( xmlpp::Element *  root,
DashItem  dash_item 
)
xmlpp::Element* encode_gradient ( xmlpp::Element *  root,
Gradient  x 
)
xmlpp::Element * encode_value ( xmlpp::Element *  root,
const ValueBase data,
Canvas::ConstHandle  canvas = 0 
)
xmlpp::Element* encode_list ( xmlpp::Element *  root,
std::vector< ValueBase list,
Canvas::ConstHandle  canvas = 0 
)

References encode_value().

Referenced by encode_value().

xmlpp::Element* encode_transformation ( xmlpp::Element *  root,
const Transformation transformation 
)
xmlpp::Element* encode_weighted_value ( xmlpp::Element *  root,
types_namespace::TypeWeightedValueBase type,
const ValueBase data,
Canvas::ConstHandle  canvas 
)
xmlpp::Element* encode_pair ( xmlpp::Element *  root,
types_namespace::TypePairBase type,
const ValueBase data,
Canvas::ConstHandle  canvas 
)
xmlpp::Element* encode_animated ( xmlpp::Element *  root,
ValueNode_Animated::ConstHandle  value_node,
Canvas::ConstHandle  canvas = 0 
)
xmlpp::Element* encode_subtract ( xmlpp::Element *  root,
ValueNode_Subtract::ConstHandle  value_node,
Canvas::ConstHandle  canvas = 0 
)
xmlpp::Element* encode_static_list ( xmlpp::Element *  root,
ValueNode_StaticList::ConstHandle  value_node,
Canvas::ConstHandle  canvas = 0 
)

References encode_value_node().

Referenced by encode_value_node().

xmlpp::Element* encode_dynamic_list ( xmlpp::Element *  root,
ValueNode_DynamicList::ConstHandle  value_node,
Canvas::ConstHandle  canvas = 0 
)

References encode_value_node().

Referenced by encode_value_node().

xmlpp::Element* encode_linkable_value_node ( xmlpp::Element *  root,
LinkableValueNode::ConstHandle  value_node,
Canvas::ConstHandle  canvas = 0 
)
xmlpp::Element* encode_layer ( xmlpp::Element *  root,
Layer::ConstHandle  layer 
)
xmlpp::Element* encode_canvas_toplevel ( xmlpp::Element *  root,
Canvas::ConstHandle  canvas 
)

Variable Documentation

ReleaseVersion save_canvas_version = ReleaseVersion(RELEASE_VERSION_END-1)
int valuenode_too_new_count
save_canvas_external_file_callback_t save_canvas_external_file_callback = NULL
void* save_canvas_external_file_user_data = NULL