X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fsavecanvas.cpp;h=4f37a25c4e37669649afe441a101bf7ba45e9db8;hb=75a589f5db5821fc10dd67941e4ca587b32a69d0;hp=18224dfc5e04cf2bfbf12a49ab280119b8808079;hpb=0f9ceff3703a03265112e8bcfb2b31d959aa99d6;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/savecanvas.cpp b/synfig-core/trunk/src/synfig/savecanvas.cpp index 18224df..4f37a25 100644 --- a/synfig-core/trunk/src/synfig/savecanvas.cpp +++ b/synfig-core/trunk/src/synfig/savecanvas.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -57,6 +58,10 @@ #include "gradient.h" #include +extern "C" { +#include +} + #endif /* === U S I N G =========================================================== */ @@ -300,7 +305,7 @@ xmlpp::Element* encode_animated(xmlpp::Element* root,ValueNode_Animated::ConstHa case INTERPOLATION_TCB: // This is the default value, so don't add a new attribute (unless it's an angle - they default to linear) if (value_node->get_type() == ValueBase::TYPE_ANGLE) - waypoint_node->set_attribute("before","tcb"); + waypoint_node->set_attribute("before","auto"); break; default: error("Unknown waypoint type for \"before\" attribute"); @@ -325,7 +330,7 @@ xmlpp::Element* encode_animated(xmlpp::Element* root,ValueNode_Animated::ConstHa case INTERPOLATION_TCB: // This is the default value, so don't add a new attribute (unless it's an angle - they default to linear) if (value_node->get_type() == ValueBase::TYPE_ANGLE) - waypoint_node->set_attribute("after","tcb"); + waypoint_node->set_attribute("after","auto"); break; default: error("Unknown waypoint type for \"after\" attribute"); @@ -747,6 +752,11 @@ synfig::save_canvas(const String &filename, Canvas::ConstHandle canvas) synfig::String tmp_filename(filename+".TMP"); + if (String(filename.begin() + filename.find_last_of('.')+1, filename.end()) == "sifz") + xmlSetCompressMode(9); + else + xmlSetCompressMode(0); + try { assert(canvas);