AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
-# this line is required for libtool 1.5.26 but must not be present for libtool 2.2.4...
-# AC_CONFIG_SUBDIRS(libltdl)
+# AC_CONFIG_SUBDIRS(libltdl) is required for libtool 1.5.26 but must not be present for
+# libtool 2.2.4. Problem seems to be that AC_LIB_LTDL (above) now calls AC_CONFIG_SUBDIRS
+# itself, through LTDL_INIT, _LTDL_SETUP, _LTDL_MODE_DISPATCH. We need to check the
+# condition that libltdl has already been registered with AC_CONFIG_SUBDIRS:
+m4_ifdef([_AC_SEEN_TAG(libltdl)], [], [AC_CONFIG_SUBDIRS(libltdl)])
CONFIG_LIBS="-lsynfig"
CONFIG_CFLAGS="$CONFIG_CFLAGS"
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
** Copyright (c) 2009 Carlos A. Sosa Navarro
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
if (version == "0.1" || version == "0.2" || version == "0.3")
{
handle<LinkableValueNode> scale_value_node=LinkableValueNode::create("scale",type);
- scale_value_node->set_link(scale_value_node->get_link_index_from_name("link"), value_node);
- scale_value_node->set_link(scale_value_node->get_link_index_from_name("scalar"), ValueNode_Const::create(Real(0.5)));
+ scale_value_node->set_link("link", value_node);
+ scale_value_node->set_link("scalar", ValueNode_Const::create(Real(0.5)));
value_node = scale_value_node;
}
}
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
case ValueBase::TYPE_BLINEPOINT:
{
BLinePoint bline_point(value);
- set_link(0,ValueNode_Const::create(bline_point.get_vertex()));
- set_link(1,ValueNode_Const::create(bline_point.get_width()));
- set_link(2,ValueNode_Const::create(bline_point.get_origin()));
- set_link(3,ValueNode_Const::create(bline_point.get_split_tangent_flag()));
- set_link(4,ValueNode_RadialComposite::create(bline_point.get_tangent1()));
- set_link(5,ValueNode_RadialComposite::create(bline_point.get_tangent2()));
+ set_link("point",ValueNode_Const::create(bline_point.get_vertex()));
+ set_link("width",ValueNode_Const::create(bline_point.get_width()));
+ set_link("origin",ValueNode_Const::create(bline_point.get_origin()));
+ set_link("split",ValueNode_Const::create(bline_point.get_split_tangent_flag()));
+ set_link("t1",ValueNode_RadialComposite::create(bline_point.get_tangent1()));
+ set_link("t2",ValueNode_RadialComposite::create(bline_point.get_tangent2()));
break;
}
default:
Angle minimum = (* min_)(t).get(Angle());
Angle maximum = (* max_)(t).get(Angle());
Angle link = (*link_)(t).get(Angle());
-
+// This code was removed because it didn't work with link < minimum
+// It is sane to completely delete it if the replacement code is fine.
+/* ***********************************************
// if link is between min and max, use it
if (Angle::deg((link-minimum).mod()).get() < Angle::deg((maximum-minimum).mod()).get())
return link;
return minimum;
else
return maximum;
+*********************************************** */
+ if(Angle::rad(maximum).get()>=Angle::rad(link).get() && Angle::rad(link).get()>=Angle::rad(minimum).get())
+ return link;
+ else if (Angle::rad(minimum).get()>Angle::rad(link).get())
+ return minimum;
+ else
+ return maximum;
}
case ValueBase::TYPE_INTEGER:
return std::max((*min_)(t).get(int()), std::min((*max_)(t).get(int()), (*link_)(t).get(int())));
return ValueBase();
}
+synfig::ValueBase
+synfig::ValueNode_Range::get_inverse(Time t, const synfig::Vector &target_value) const
+{
+ switch (get_type())
+ {
+ case ValueBase::TYPE_INTEGER:
+ {
+ int max_value((*max_)(t).get(int()));
+ int min_value((*min_)(t).get(int()));
+ return std::max(min_value, std::min(max_value, int(target_value.mag())));
+ }
+ case ValueBase::TYPE_REAL:
+ {
+ Real max_value((*max_)(t).get(Real()));
+ Real min_value((*min_)(t).get(Real()));
+ return std::max(min_value, std::min(max_value, target_value.mag()));
+ }
+ case ValueBase::TYPE_ANGLE:
+ {
+ Angle max_value((*max_)(t).get(Angle()));
+ Angle min_value((*min_)(t).get(Angle()));
+ Angle target_angle(Angle::tan(target_value[1],target_value[0]));
+ return target_angle>max_value?max_value:target_angle<min_value?min_value:target_angle;
+ }
+ case ValueBase::TYPE_TIME:
+ {
+ Real max_value((*max_)(t).get(Time()));
+ Real min_value((*min_)(t).get(Time()));
+ return std::max(min_value, std::min(max_value, target_value.mag()));
+ }
+ default:
+ return target_value;
+ }
+ return ValueBase();
+}
+
+synfig::ValueBase
+synfig::ValueNode_Range::get_inverse(Time t, const synfig::Angle &target_value) const
+{
+ Angle minimum = (* min_)(t).get(Angle());
+ Angle maximum = (* max_)(t).get(Angle());
+ Angle link = (*link_)(t).get(Angle());
+ switch (get_type())
+ {
+ default:
+ // Notice that target_value is the rotation between the current
+ // 'link' value and the target angle in the canvas, so we need
+ // to add it to 'link'
+ if(Angle::rad(maximum).get()>=Angle::rad(link+target_value).get() && Angle::rad(link+target_value).get()>=Angle::rad(minimum).get())
+ return link + target_value;
+ else if (Angle::rad(minimum).get()>Angle::rad(target_value).get())
+ return minimum;
+ else
+ return maximum;
+ }
+ return ValueBase();
+}
+
+
bool
ValueNode_Range::set_link_vfunc(int i,ValueNode::Handle value)
{
virtual String get_name()const;
virtual String get_local_name()const;
+ //! Returns the modified Link to match the target value at time t
+ ValueBase get_inverse(Time t, const synfig::Vector &target_value) const;
+ ValueBase get_inverse(Time t, const synfig::Angle &target_value) const;
+
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
virtual int link_count()const;
virtual String link_name(int i)const;
mirror_icon.sif \
navigator_icon.sif \
normal_icon.sif \
+ null_icon.sif \
pastecanvas_icon.sif \
polygon_icon.sif \
real_icon.sif \
reset_colors_icon.$(EXT) \
swap_colors_icon.$(EXT) \
rotate_icon.$(EXT) \
- scale_icon.$(EXT) \
smooth_move_icon.$(EXT) \
width_icon.$(EXT) \
rectangle_icon.$(EXT) \
sketch_icon.$(EXT) \
fill_icon.$(EXT) \
normal_icon.$(EXT) \
+ null_icon.$(EXT) \
select_all_child_layers_icon.$(EXT) \
sif_icon.$(EXT) \
synfig_icon.$(EXT) \
--- /dev/null
+<?xml version="1.0"?>
+<canvas version="0.1" width="128" height="128" xres="2952.755900" yres="2952.755900" view-box="-2.000000 2.000000 2.000000 -2.000000" antialias="1" fps="30.000" begin-time="0f" end-time="0f" bgcolor="0.500000 0.500000 0.500000 1.000000">
+ <name>Untitled0</name>
+ <layer type="PasteCanvas" active="true" version="0.1">
+ <param name="z_depth">
+ <real value="0.0000000000"/>
+ </param>
+ <param name="amount">
+ <real value="1.0000000000"/>
+ </param>
+ <param name="blend_method">
+ <integer value="0"/>
+ </param>
+ <param name="origin">
+ <vector>
+ <x>0.0000000000</x>
+ <y>0.0500000007</y>
+ </vector>
+ </param>
+ <param name="canvas" use="logo.sif#"/>
+ <param name="zoom">
+ <real value="0.2750000000"/>
+ </param>
+ <param name="time_offset">
+ <time value="0f"/>
+ </param>
+ </layer>
+ <layer type="shade" active="true" version="0.2">
+ <param name="z_depth">
+ <real value="0.0000000000"/>
+ </param>
+ <param name="amount">
+ <real value="0.7500000000"/>
+ </param>
+ <param name="blend_method">
+ <integer value="12"/>
+ </param>
+ <param name="color">
+ <color>
+ <r>0.000000</r>
+ <g>0.000000</g>
+ <b>0.000000</b>
+ <a>1.000000</a>
+ </color>
+ </param>
+ <param name="offset">
+ <vector>
+ <x>0.1000000015</x>
+ <y>-0.1000000015</y>
+ </vector>
+ </param>
+ <param name="size">
+ <vector>
+ <x>0.2000000030</x>
+ <y>0.2000000030</y>
+ </vector>
+ </param>
+ <param name="type">
+ <integer value="1"/>
+ </param>
+ <param name="invert">
+ <bool value="false"/>
+ </param>
+ </layer>
+</canvas>
+++ /dev/null
-<?xml version="1.0"?>
-<canvas version="0.1" width="200" height="200" xres="2834.645752" yres="2834.645752" view-box="-3.245196 3.245196 3.245196 -3.245196" antialias="1" fps="24.000" begin-time="0f" end-time="0f" bgcolor="0.500000 0.500000 0.500000 1.000000">
- <name>Synfig Studio Scale Icon</name>
- <desc>Placed in the Public Domain in 2007 by Chris Norman (pixelgeek)</desc>
- <meta name="grid_show" content="0"/>
- <meta name="grid_size" content="0.259616 0.259616"/>
- <meta name="grid_snap" content="0"/>
- <meta name="guide_show" content="1"/>
- <meta name="guide_snap" content="0"/>
- <meta name="onion_skin" content="0"/>
- <layer type="linear_gradient" active="true" version="0.0">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="p1">
- <vector>
- <x>-0.6717824340</x>
- <y>8.4043684006</y>
- </vector>
- </param>
- <param name="p2">
- <vector>
- <x>-0.4427109957</x>
- <y>-1.6098945141</y>
- </vector>
- </param>
- <param name="gradient">
- <gradient>
- <color pos="0.000000">
- <r>0.064115</r>
- <g>0.064115</g>
- <b>0.064115</b>
- <a>1.000000</a>
- </color>
- <color pos="1.000000">
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>0.000000</a>
- </color>
- </gradient>
- </param>
- <param name="loop">
- <bool value="false"/>
- </param>
- <param name="zigzag">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="warp" active="true" version="0.1">
- <param name="src_tl">
- <vector>
- <x>-1.1483865976</x>
- <y>1.7675857544</y>
- </vector>
- </param>
- <param name="src_br">
- <vector>
- <x>2.6703450680</x>
- <y>-2.1673052311</y>
- </vector>
- </param>
- <param name="dest_tl">
- <vector>
- <x>-1.6225999594</x>
- <y>-2.2716398239</y>
- </vector>
- </param>
- <param name="dest_tr">
- <vector>
- <x>2.7584199905</x>
- <y>-2.2716398239</y>
- </vector>
- </param>
- <param name="dest_br">
- <vector>
- <x>3.4074599743</x>
- <y>-3.0829398632</y>
- </vector>
- </param>
- <param name="dest_bl">
- <vector>
- <x>-1.1358199120</x>
- <y>-3.0829398632</y>
- </vector>
- </param>
- <param name="clip">
- <bool value="true"/>
- </param>
- <param name="horizon">
- <real value="2.0000000000"/>
- </param>
- </layer>
- <layer type="rectangle" active="true" version="0.2" desc="Blue Rectangle">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="point1">
- <vector>
- <x>-1.8173098564</x>
- <y>-2.5961568356</y>
- </vector>
- </param>
- <param name="point2">
- <vector>
- <x>3.1153881550</x>
- <y>1.5576940775</y>
- </vector>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="rectangle" active="true" version="0.2" desc="White Rectangle">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="point1">
- <vector>
- <x>-1.5576940775</x>
- <y>-2.3365411758</y>
- </vector>
- </param>
- <param name="point2">
- <vector>
- <x>2.8557724953</x>
- <y>1.2980784178</y>
- </vector>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="PasteCanvas" active="true" version="0.1" desc="Rectangle gradient">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="origin">
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="canvas">
- <canvas>
- <layer type="rectangle" active="true" version="0.2" desc="White Rectangle">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="point1">
- <vector>
- <x>-1.2980784178</x>
- <y>-2.0769255161</y>
- </vector>
- </param>
- <param name="point2">
- <vector>
- <x>2.5961568356</x>
- <y>1.0384627581</y>
- </vector>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="linear_gradient" active="true" version="0.0" desc="Gradient">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="13"/>
- </param>
- <param name="p1">
- <vector>
- <x>-1.7848600149</x>
- <y>1.9471199512</y>
- </vector>
- </param>
- <param name="p2">
- <vector>
- <x>2.9206800461</x>
- <y>-4.0564999580</y>
- </vector>
- </param>
- <param name="gradient">
- <gradient>
- <color pos="0.000000">
- <r>0.028991</r>
- <g>0.133209</g>
- <b>0.374624</b>
- <a>1.000000</a>
- </color>
- <color pos="1.000000">
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </gradient>
- </param>
- <param name="loop">
- <bool value="false"/>
- </param>
- <param name="zigzag">
- <bool value="false"/>
- </param>
- </layer>
- </canvas>
- </param>
- <param name="zoom">
- <real value="0.0000000000"/>
- </param>
- <param name="time_offset">
- <time value="0s"/>
- </param>
- <param name="children_lock">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="rectangle" active="true" version="0.2" desc="Blue Rectangle">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="point1">
- <vector>
- <x>-3.1153881550</x>
- <y>0.2596156895</y>
- </vector>
- </param>
- <param name="point2">
- <vector>
- <x>0.0000000000</x>
- <y>2.8557724953</y>
- </vector>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="rectangle" active="true" version="0.2" desc="White Rectangle">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="point1">
- <vector>
- <x>-2.8557724953</x>
- <y>0.5192313790</y>
- </vector>
- </param>
- <param name="point2">
- <vector>
- <x>-0.2596156895</x>
- <y>2.5961568356</y>
- </vector>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="PasteCanvas" active="true" version="0.1" desc="Rectangle gradient">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="origin">
- <vector>
- <x>-1.7848598957</x>
- <y>1.9471199512</y>
- </vector>
- </param>
- <param name="canvas">
- <canvas>
- <layer type="rectangle" active="true" version="0.2" desc="White Rectangle">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="point1">
- <vector>
- <x>-0.8112969995</x>
- <y>-1.1682728529</y>
- </vector>
- </param>
- <param name="point2">
- <vector>
- <x>1.2656285763</x>
- <y>0.3894212246</y>
- </vector>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="linear_gradient" active="true" version="0.0" desc="Gradient">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="13"/>
- </param>
- <param name="p1">
- <vector>
- <x>-1.7848600149</x>
- <y>1.9471199512</y>
- </vector>
- </param>
- <param name="p2">
- <vector>
- <x>2.9206800461</x>
- <y>-4.0564999580</y>
- </vector>
- </param>
- <param name="gradient">
- <gradient>
- <color pos="0.000000">
- <r>0.028991</r>
- <g>0.133209</g>
- <b>0.374624</b>
- <a>1.000000</a>
- </color>
- <color pos="1.000000">
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </gradient>
- </param>
- <param name="loop">
- <bool value="false"/>
- </param>
- <param name="zigzag">
- <bool value="false"/>
- </param>
- </layer>
- </canvas>
- </param>
- <param name="zoom">
- <real value="0.0000000000"/>
- </param>
- <param name="time_offset">
- <time value="0s"/>
- </param>
- <param name="children_lock">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="PasteCanvas" active="true" version="0.1" desc="Vertical Dotted line">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="origin">
- <vector>
- <x>-2.2769572735</x>
- <y>-1.7023979425</y>
- </vector>
- </param>
- <param name="canvas">
- <canvas>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>0.6490399837</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>1.2980799675</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>-0.6490399837</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- </canvas>
- </param>
- <param name="zoom">
- <real value="0.0000000000"/>
- </param>
- <param name="time_offset">
- <time value="0s"/>
- </param>
- <param name="children_lock">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="PasteCanvas" active="true" version="0.1" desc="Vertical Dotted line">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="origin">
- <vector>
- <x>0.9788787961</x>
- <y>-1.5747181177</y>
- </vector>
- </param>
- <param name="canvas">
- <canvas>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>0.6490399837</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>1.2980799675</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.9471199512</x>
- <y>-0.6490399837</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.2716398239</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>1.9471199512</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="-180.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- </canvas>
- </param>
- <param name="zoom">
- <real value="0.0000000000"/>
- </param>
- <param name="time_offset">
- <time value="0s"/>
- </param>
- <param name="children_lock">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="PasteCanvas" active="true" version="0.1" desc="Horizontal Dotted line">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="origin">
- <vector>
- <x>-0.0957598835</x>
- <y>-2.7983164787</y>
- </vector>
- </param>
- <param name="canvas">
- <canvas>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>2.2716398239</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.7848598957</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.2980799675</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>0.8112999797</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>0.3245199919</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>-0.1622599959</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- </canvas>
- </param>
- <param name="zoom">
- <real value="0.0000000000"/>
- </param>
- <param name="time_offset">
- <time value="0s"/>
- </param>
- <param name="children_lock">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="PasteCanvas" active="true" version="0.1" desc="Horizontal Dotted line">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="origin">
- <vector>
- <x>0.0286085363</x>
- <y>0.0443108305</y>
- </vector>
- </param>
- <param name="canvas">
- <canvas>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>2.2716398239</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.7848598957</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>1.2980799675</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>0.8112999797</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>0.3245199919</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- <layer type="outline" active="true" version="0.2" desc="NewBLine Outline">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>-0.1622599959</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="bline">
- <bline type="bline_point" loop="false">
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.9471199512</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- <entry>
- <composite type="bline_point">
- <c1>
- <vector>
- <x>-1.6225999594</x>
- <y>2.1093800068</y>
- </vector>
- </c1>
- <c2>
- <real value="1.0000000000"/>
- </c2>
- <c3>
- <real value="0.5000000000"/>
- </c3>
- <c4>
- <bool value="false"/>
- </c4>
- <c5>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c5>
- <c6>
- <radial_composite type="vector">
- <c0>
- <real value="0.0000000000"/>
- </c0>
- <c1>
- <angle value="0.000000"/>
- </c1>
- </radial_composite>
- </c6>
- </composite>
- </entry>
- </bline>
- </param>
- <param name="width">
- <real value="0.1947117657"/>
- </param>
- <param name="expand">
- <real value="0.0000000000"/>
- </param>
- <param name="sharp_cusps">
- <bool value="true"/>
- </param>
- <param name="round_tip[0]">
- <bool value="false"/>
- </param>
- <param name="round_tip[1]">
- <bool value="false"/>
- </param>
- <param name="loopyness">
- <real value="1.0000000000"/>
- </param>
- <param name="homogeneous_width">
- <bool value="true"/>
- </param>
- </layer>
- </canvas>
- </param>
- <param name="zoom">
- <real value="0.0000000000"/>
- </param>
- <param name="time_offset">
- <time value="0s"/>
- </param>
- <param name="children_lock">
- <bool value="false"/>
- </param>
- </layer>
- <layer type="polygon" active="true" version="0.1" desc="White Arrow">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>0.011238</r>
- <g>0.064115</g>
- <b>0.247404</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="vector_list">
- <dynamic_list type="vector">
- <entry>
- <vector>
- <x>-1.7130378485</x>
- <y>2.0215976238</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>-2.0641574860</x>
- <y>1.6385580301</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>0.7235190868</x>
- <y>-0.7979990244</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>-0.0033114245</x>
- <y>-1.5410472155</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>1.8586863279</x>
- <y>-1.5304071903</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>1.8513576984</x>
- <y>0.3191995919</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>1.0852786303</x>
- <y>-0.4468794465</y>
- </vector>
- </entry>
- </dynamic_list>
- </param>
- </layer>
- <layer type="polygon" active="true" version="0.1" desc="Blue Arrow">
- <param name="z_depth">
- <real value="0.0000000000"/>
- </param>
- <param name="amount">
- <real value="1.0000000000"/>
- </param>
- <param name="blend_method">
- <integer value="0"/>
- </param>
- <param name="color">
- <color>
- <r>1.000000</r>
- <g>1.000000</g>
- <b>1.000000</b>
- <a>1.000000</a>
- </color>
- </param>
- <param name="offset">
- <vector>
- <x>0.0000000000</x>
- <y>0.0000000000</y>
- </vector>
- </param>
- <param name="invert">
- <bool value="false"/>
- </param>
- <param name="antialias">
- <bool value="true"/>
- </param>
- <param name="feather">
- <real value="0.0000000000"/>
- </param>
- <param name="blurtype">
- <integer value="1"/>
- </param>
- <param name="vector_list">
- <dynamic_list type="vector">
- <entry>
- <vector>
- <x>-1.7236778736</x>
- <y>1.7875177860</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>-1.8407176733</x>
- <y>1.6704779863</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>0.9682388306</x>
- <y>-0.7979990244</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>0.4222880602</x>
- <y>-1.3601673841</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>1.6990864277</x>
- <y>-1.3601673841</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>1.6704779863</x>
- <y>-0.1063998714</y>
- </vector>
- </entry>
- <entry>
- <vector>
- <x>1.1065586805</x>
- <y>-0.6703191996</y>
- </vector>
- </entry>
- </dynamic_list>
- </param>
- </layer>
-</canvas>
src/gtkmm/state_polygon.h
src/gtkmm/state_rectangle.cpp
src/gtkmm/state_rectangle.h
-src/gtkmm/state_rotate.cpp
-src/gtkmm/state_rotate.h
-src/gtkmm/state_scale.cpp
-src/gtkmm/state_scale.h
src/gtkmm/state_sketch.cpp
src/gtkmm/state_sketch.h
src/gtkmm/state_smoothmove.cpp
state_fill.h \
state_gradient.h \
state_normal.h \
+ state_null.h \
state_polygon.h \
state_rectangle.h \
- state_rotate.h \
- state_scale.h \
state_sketch.h \
state_smoothmove.h \
state_star.h \
state_fill.cpp \
state_gradient.cpp \
state_normal.cpp \
+ state_null.cpp \
state_polygon.cpp \
state_rectangle.cpp \
- state_rotate.cpp \
- state_scale.cpp \
state_sketch.cpp \
state_smoothmove.cpp \
state_star.cpp \
** Copyright (c) 2007, 2008 Chris Moore
** Copyright (c) 2008 Gerald Young
** Copyright (c) 2008 Carlos López
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
#include "state_circle.h"
#include "state_rectangle.h"
#include "state_smoothmove.h"
-#include "state_scale.h"
#include "state_star.h"
#include "state_text.h"
#include "state_width.h"
-#include "state_rotate.h"
#include "state_zoom.h"
#include "devicetracker.h"
studio_init_cb.task(_("Init Tools..."));
- /* row 1 */
+ /* editing tools */
state_manager->add_state(&state_normal);
state_manager->add_state(&state_smooth_move);
- state_manager->add_state(&state_scale);
- state_manager->add_state(&state_rotate);
studio_init_cb.task(_("Init ModMirror...")); module_list_.push_back(new ModMirror()); module_list_.back()->start();
+ if(!getenv("SYNFIG_DISABLE_WIDTH" )) state_manager->add_state(&state_width); // Enabled since 0.61.09
- /* row 2 */
+ /* new objects */
+ state_manager->add_state(&state_bline);
state_manager->add_state(&state_circle);
state_manager->add_state(&state_rectangle);
state_manager->add_state(&state_star);
state_manager->add_state(&state_gradient);
if(!getenv("SYNFIG_DISABLE_POLYGON")) state_manager->add_state(&state_polygon); // Enabled - for working without ducks
-
- /* row 3 */
- state_manager->add_state(&state_bline);
state_manager->add_state(&state_text);
+ if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw); // Enabled for now. Let's see whether they're good enough yet.
+
+ /* other */
+
state_manager->add_state(&state_fill);
state_manager->add_state(&state_eyedrop);
state_manager->add_state(&state_zoom);
-
- if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw); // Enabled for now. Let's see whether they're good enough yet.
if(!getenv("SYNFIG_DISABLE_SKETCH" )) state_manager->add_state(&state_sketch);
- if(!getenv("SYNFIG_DISABLE_WIDTH" )) state_manager->add_state(&state_width); // Enabled since 0.61.09
studio_init_cb.task(_("Init ModPalette..."));
module_list_.push_back(new ModPalette()); module_list_.back()->start();
synfigapp::Main::settings().set_value("pref.distance_system","pt");
synfigapp::Main::settings().set_value("pref.use_colorspace_gamma","1");
#ifdef SINGLE_THREADED
- synfigapp::Main::settings().set_value("pref.single_threaded","0");
+ synfigapp::Main::settings().set_value("pref.single_threaded","1");
#endif
synfigapp::Main::settings().set_value("pref.restrict_radius_ducks","0");
synfigapp::Main::settings().set_value("pref.resize_imported_images","0");
/* === M A C R O S ========================================================= */
-// uncomment to use a single thread, and hopefully get more stability
-// #define SINGLE_THREADED
+// uncomment define SINGLE_THREADED to use a single thread, and hopefully get more stability (dooglus) - changed to be default if using windows (Nov 2009 pixelgeek)
+#ifdef WIN32
+#define SINGLE_THREADED
+#endif
#ifdef SINGLE_THREADED
# define single_threaded() App::single_threaded
#endif
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
** Copyright (c) 2009 Carlos López
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
#include <ETL/clock>
#include <sstream>
+#include <math.h>
#include <gtkmm/paned.h>
#include <gtkmm/scale.h>
#include <synfig/valuenode_linear.h>
#include <synfig/valuenode_timedswap.h>
#include <synfig/valuenode_scale.h>
+#include <synfig/valuenode_range.h>
#include <synfig/valuenode_dynamiclist.h>
#include <synfig/valuenode_twotone.h>
#include <synfig/valuenode_stripes.h>
#include "dialog_color.h"
#include "eventkey.h"
+#include "state_null.h"
#include "state_polygon.h"
#include "state_bline.h"
#include "state_normal.h"
toggling_snap_grid=false;
toggling_onion_skin=false;
- smach_.set_default_state(&state_normal);
+ smach_.set_default_state(&state_null);
disp_audio = new Widget_Sound();
if (ValueNode_BLineCalcVertex::Handle bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(value_desc.get_value_node()))
{
- ValueNode_BLine::Handle bline = ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link(bline_vertex->get_link_index_from_name("bline")));
+ ValueNode_BLine::Handle bline = ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link("bline"));
Real radius = 0.0;
- Real amount = synfig::find_closest_point((*bline)(get_time()), value, radius, bline->get_loop());
- return canvas_interface()->change_value(synfigapp::ValueDesc(bline_vertex,bline_vertex->get_link_index_from_name("amount")), amount);
+ if (((*(bline_vertex->get_link("loop")))(get_time()).get(bool()))){
+ Real amount_old((*(bline_vertex->get_link("amount")))(get_time()).get(Real()));
+ Real amount_new = synfig::find_closest_point((*bline)(get_time()), value, radius, bline->get_loop());
+ Real difference = fmod( fmod(amount_new - amount_old, 1.0) + 1.0 , 1.0);
+ //fmod is called twice to avoid negative values
+ if (difference > 0.5) difference=difference-1.0;
+ return canvas_interface()->change_value(synfigapp::ValueDesc(bline_vertex,bline_vertex->get_link_index_from_name("amount")), amount_old+difference);
+
+ } else {
+ Real amount = synfig::find_closest_point((*bline)(get_time()), value, radius, bline->get_loop());
+ return canvas_interface()->change_value(synfigapp::ValueDesc(bline_vertex,bline_vertex->get_link_index_from_name("amount")), amount);
+ }
}
if (ValueNode_BLineCalcTangent::Handle bline_tangent = ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_desc.get_value_node()))
return false;
}
+ if (ValueNode_Range::Handle range_value_node = ValueNode_Range::Handle::cast_dynamic(value_desc.get_value_node()))
+ {
+ int link_index(range_value_node->get_link_index_from_name("link"));
+ return canvas_interface()->change_value(
+ synfigapp::ValueDesc(range_value_node,link_index),
+ range_value_node->get_inverse(get_time(), value)
+ );
+ }
+
switch(value_desc.get_value_type())
{
case ValueBase::TYPE_REAL:
return false;
}
+ if (ValueNode_Range::Handle range_value_node = ValueNode_Range::Handle::cast_dynamic(value_desc.get_value_node()))
+ {
+ int link_index(range_value_node->get_link_index_from_name("link"));
+ return canvas_interface()->change_value(
+ synfigapp::ValueDesc(range_value_node,link_index),
+ range_value_node->get_inverse(get_time(), rotation)
+ );
+ }
// \todo will this really always be the case?
assert(value_desc.get_value_type() == ValueBase::TYPE_ANGLE);
return canvas_interface()->change_value(value_desc, value_desc.get_value(get_time()).get(Angle()) + rotation);
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
/* === M E T H O D S ======================================================= */
Dialog_ToolOptions::Dialog_ToolOptions():
- Dockable("tool_options",_("Tool Options"),Gtk::StockID("synfig-normal")),
+ Dockable("tool_options",_("Tool Options"),Gtk::StockID("synfig-null")),
empty_label(_("This tool has no options"))
{
//scrolled_.add(sub_vbox_);
set_widget(empty_label);
empty_label.show();
- set_stock_id(Gtk::StockID("synfig-normal"));
+ set_stock_id(Gtk::StockID("synfig-null"));
}
void
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
#include "duck.h"
#include <ETL/misc>
-#include "general.h"
+#include <synfig/valuenode_bline.h>
+#include <synfig/valuenode_blinecalctangent.h>
+#include <synfig/valuenode_blinecalcvertex.h>
+#include <synfig/valuenode_blinecalcwidth.h>
+#include <synfig/valuenode_composite.h>
+#include "general.h"
#endif
/* === U S I N G =========================================================== */
set_sub_trans_point(transform_stack_.unperform(x));
}
+void
+Duck::set_trans_point(const synfig::Point &x, const synfig::Time &time)
+{
+ set_sub_trans_point(transform_stack_.unperform(x), time);
+}
+
//! Sets the origin point.
void
Duck::set_origin(const synfig::Point &x)
}
void
-Duck::set_sub_trans_point(const synfig::Point &x)
+Duck::set_sub_trans_point(const synfig::Point &x, const synfig::Time &time)
{
if (get_type() == Duck::TYPE_TANGENT ||
get_type() == Duck::TYPE_ANGLE)
(new_halves > 1 || new_halves < -1 ||
old_halves > 1 || old_halves < -1))
synfig::info("rotation: %.2f turns", new_halves/2.0);
+ } else if(get_type() == Duck::TYPE_VERTEX || get_type() == Duck::TYPE_POSITION)
+ {
+ set_point((x-get_sub_trans_origin())/get_scalar());
+
+ ValueNode_BLineCalcVertex::Handle bline_vertex;
+ ValueNode_Composite::Handle composite;
+
+ if ((bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(get_value_desc().get_value_node())) ||
+ ((composite = ValueNode_Composite::Handle::cast_dynamic(get_value_desc().get_value_node())) &&
+ composite->get_type() == ValueBase::TYPE_BLINEPOINT &&
+ (bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(composite->get_link("point")))))
+ {
+ synfig::Point closest_point = get_point();
+ synfig::Real radius = 0.0;
+ ValueNode_BLine::Handle bline = ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link(bline_vertex->get_link_index_from_name("bline")));
+ synfig::find_closest_point(
+ (*bline)(time),
+ get_point(),
+ radius,
+ bline->get_loop(),
+ &closest_point);
+ set_point(closest_point);
+ }
}
- else
+ else set_point((x-get_sub_trans_origin())/get_scalar());
+}
+
+void
+Duck::set_sub_trans_point(const synfig::Point &x)
+{
+ if (get_type() == Duck::TYPE_TANGENT ||
+ get_type() == Duck::TYPE_ANGLE)
+ {
+ Angle old_angle = get_point().angle();
set_point((x-get_sub_trans_origin())/get_scalar());
+ Angle change = get_point().angle() - old_angle;
+ while (change < Angle::deg(-180)) change += Angle::deg(360);
+ while (change > Angle::deg(180)) change -= Angle::deg(360);
+ int old_halves = round_to_int(Angle::deg(rotations).get()/180);
+ rotations += change;
+ int new_halves = round_to_int(Angle::deg(rotations).get()/180);
+ if (old_halves != new_halves &&
+ (new_halves > 1 || new_halves < -1 ||
+ old_halves > 1 || old_halves < -1))
+ synfig::info("rotation: %.2f turns", new_halves/2.0);
+ }
+ else set_point((x-get_sub_trans_origin())/get_scalar());
}
synfig::Point
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
synfig::Point get_point()const { return shared_point?*shared_point:point; }
synfig::Angle get_rotations()const { return rotations; };
+ void set_rotations(const synfig::Angle &x) { rotations=x; };
synfig::Point get_trans_point()const;
void set_trans_point(const synfig::Point &x);
+ void set_trans_point(const synfig::Point &x, const synfig::Time &time);
synfig::Point get_sub_trans_point()const;
void set_sub_trans_point(const synfig::Point &x);
+ void set_sub_trans_point(const synfig::Point &x, const synfig::Time &time);
synfig::Point get_sub_trans_origin()const;
//! Sets the origin point.
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
drag_offset_=find_duck(offset)->get_trans_point();
}
+void
+Duckmatic::update_ducks()
+{
+ Time time(get_time());
+ DuckList duck_list(get_duck_list());
+ const DuckList selected_ducks(get_selected_ducks());
+ DuckList::const_iterator iter;
+ for (iter=selected_ducks.begin(); iter!=selected_ducks.end(); ++iter)
+ {
+ etl::handle<Duck> duck(*iter);
+ if (duck->get_type() == Duck::TYPE_VERTEX || duck->get_type() == Duck::TYPE_POSITION)
+ {
+ ValueNode_BLineCalcVertex::Handle bline_vertex;
+ ValueNode_Composite::Handle composite;
+
+ if ((bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(duck->get_value_desc().get_value_node())) ||
+ ((composite = ValueNode_Composite::Handle::cast_dynamic(duck->get_value_desc().get_value_node())) &&
+ composite->get_type() == ValueBase::TYPE_BLINEPOINT &&
+ (bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(composite->get_link("point")))))
+ {
+ DuckList::iterator iter;
+ for (iter=duck_list.begin(); iter!=duck_list.end(); iter++)
+ if ( (*iter)->get_origin_duck()==duck /*&& !duck_is_selected(*iter)*/ )
+ {
+ synfig::Real radius = 0.0;
+ ValueNode_BLine::Handle bline(ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link(bline_vertex->get_link_index_from_name("bline"))));
+ Real amount = synfig::find_closest_point((*bline)(time), duck->get_point(), radius, bline->get_loop());
+
+ int vertex_amount_index(bline_vertex->get_link_index_from_name("amount"));
+ ValueNode::Handle vertex_amount_value_node(bline_vertex->get_link(vertex_amount_index));
+
+
+ ValueNode::Handle duck_value_node((*iter)->get_value_desc().get_value_node());
+ if (ValueNode_BLineCalcTangent::Handle bline_tangent = ValueNode_BLineCalcTangent::Handle::cast_dynamic(duck_value_node))
+ {
+ if (bline_tangent->get_link(bline_tangent->get_link_index_from_name("amount")) == vertex_amount_value_node)
+ {
+ switch (bline_tangent->get_type())
+ {
+ case ValueBase::TYPE_ANGLE:
+ {
+ Angle angle((*bline_tangent)(time, amount).get(Angle()));
+ (*iter)->set_point(Point(Angle::cos(angle).get(), Angle::sin(angle).get()));
+ (*iter)->set_rotations(Angle::deg(0)); //hack: rotations are a relative value
+ break;
+ }
+ case ValueBase::TYPE_REAL:
+ (*iter)->set_point(Point((*bline_tangent)(time, amount).get(Real()), 0));
+ break;
+ case ValueBase::TYPE_VECTOR:
+ (*iter)->set_point((*bline_tangent)(time, amount).get(Vector()));
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else if (ValueNode_BLineCalcWidth::Handle bline_width = ValueNode_BLineCalcWidth::Handle::cast_dynamic(duck_value_node))
+ {
+ if (bline_width->get_link(bline_width->get_link_index_from_name("amount")) == vertex_amount_value_node)
+ (*iter)->set_point(Point((*bline_width)(time, amount).get(Real()), 0));
+ }
+ }
+ }
+ }
+ }
+}
+
+
bool
Duckmatic::end_duck_drag()
{
// drag the vertex and position ducks first
for (i=0,iter=selected_ducks.begin(); iter!=selected_ducks.end(); ++iter,i++)
- {
- etl::handle<Duck> duck(*iter);
- if(duck->get_type() == Duck::TYPE_VERTEX || duck->get_type() == Duck::TYPE_POSITION)
- {
- duck->set_trans_point(positions[i]+vect);
-
- ValueNode_BLineCalcVertex::Handle bline_vertex;
- ValueNode_Composite::Handle composite;
-
- if ((bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(duck->get_value_desc().get_value_node())) ||
- ((composite = ValueNode_Composite::Handle::cast_dynamic(duck->get_value_desc().get_value_node())) &&
- composite->get_type() == ValueBase::TYPE_BLINEPOINT &&
- (bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(composite->get_link("point")))))
- {
- synfig::Point closest_point = duck->get_point();
- synfig::Real radius = 0.0;
- ValueNode_BLine::Handle bline = ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link(bline_vertex->get_link_index_from_name("bline")));
- synfig::find_closest_point(
- (*bline)(time),
- duck->get_point(),
- radius,
- bline->get_loop(),
- &closest_point);
- duck->set_point(closest_point);
- }
- }
- }
+ if((*iter)->get_type() == Duck::TYPE_VERTEX || (*iter)->get_type() == Duck::TYPE_POSITION)
+ (*iter)->set_trans_point(positions[i]+vect, time);
// then drag the others
for (i=0,iter=selected_ducks.begin(); iter!=selected_ducks.end(); ++iter,i++)
if ((*iter)->get_type() != Duck::TYPE_VERTEX && (*iter)->get_type() != Duck::TYPE_POSITION)
- (*iter)->set_trans_point(positions[i]+vect);
+ (*iter)->set_trans_point(positions[i]+vect, time);
// then patch up the tangents for the vertices we've moved
- DuckList duck_list(duckmatic->get_duck_list());
- for (iter=selected_ducks.begin(); iter!=selected_ducks.end(); ++iter)
- {
- etl::handle<Duck> duck(*iter);
- if (duck->get_type() == Duck::TYPE_VERTEX || duck->get_type() == Duck::TYPE_POSITION)
- {
- ValueNode_BLineCalcVertex::Handle bline_vertex;
- ValueNode_Composite::Handle composite;
-
- if ((bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(duck->get_value_desc().get_value_node())) ||
- ((composite = ValueNode_Composite::Handle::cast_dynamic(duck->get_value_desc().get_value_node())) &&
- composite->get_type() == ValueBase::TYPE_BLINEPOINT &&
- (bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(composite->get_link("point")))))
- {
- synfig::Real radius = 0.0;
- ValueNode_BLine::Handle bline(ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link(bline_vertex->get_link_index_from_name("bline"))));
- Real amount = synfig::find_closest_point((*bline)(time), duck->get_point(), radius, bline->get_loop());
-
- int vertex_amount_index(bline_vertex->get_link_index_from_name("amount"));
- ValueNode::Handle vertex_amount_value_node(bline_vertex->get_link(vertex_amount_index));
-
- DuckList::iterator iter;
- for (iter=duck_list.begin(); iter!=duck_list.end(); iter++)
- {
- ValueNode::Handle duck_value_node((*iter)->get_value_desc().get_value_node());
- if (ValueNode_BLineCalcTangent::Handle bline_tangent = ValueNode_BLineCalcTangent::Handle::cast_dynamic(duck_value_node))
- {
- if (bline_tangent->get_link(bline_tangent->get_link_index_from_name("amount")) == vertex_amount_value_node)
- {
- switch (bline_tangent->get_type())
- {
- case ValueBase::TYPE_ANGLE:
- {
- Angle angle((*bline_tangent)(time, amount).get(Angle()));
- (*iter)->set_point(Point(Angle::cos(angle).get(), Angle::sin(angle).get()));
- break;
- }
- case ValueBase::TYPE_REAL:
- (*iter)->set_point(Point((*bline_tangent)(time, amount).get(Real()), 0));
- break;
- case ValueBase::TYPE_VECTOR:
- (*iter)->set_point((*bline_tangent)(time, amount).get(Vector()));
- break;
- default:
- break;
- }
- }
- }
- else if (ValueNode_BLineCalcWidth::Handle bline_width = ValueNode_BLineCalcWidth::Handle::cast_dynamic(duck_value_node))
- {
- if (bline_width->get_link(bline_width->get_link_index_from_name("amount")) == vertex_amount_value_node)
- (*iter)->set_point(Point((*bline_width)(time, amount).get(Real()), 0));
- }
- }
- }
- }
- }
+ duckmatic->update_ducks();
last_translate_=vect;
}
void start_duck_drag(const synfig::Vector& offset);
void translate_selected_ducks(const synfig::Vector& vector);
+ void update_ducks();
bool end_duck_drag();
void signal_edited_selected_ducks();
** Copyright (c) 2008 Paul Wise
** Copyright (c) 2009 Gerco Ballintijn
** Copyright (c) 2009 Carlos López
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
INIT_STOCK_ICON(layer,"layer_icon."IMAGE_EXT,_("Layer"));
INIT_STOCK_ICON(layer_pastecanvas,"pastecanvas_icon."IMAGE_EXT,_("Paste Canvas"));
INIT_STOCK_ICON(plant,"plant_icon."IMAGE_EXT,"");
+ INIT_STOCK_ICON(rotate,"rotate_icon."IMAGE_EXT,"");
INIT_STOCK_ICON(group,"group_icon."IMAGE_EXT,_("Group"));
INIT_STOCK_ICON(grid_enable,"grid_enable_icon."IMAGE_EXT,_("Show Grid"));
INIT_STOCK_ICON(grid_disable,"grid_disable_icon."IMAGE_EXT,_("Hide Grid"));
INIT_STOCK_ICON_CLONE(cvs_revert,"gtk-revert",_("CVS Revert"));
// Tools
+ INIT_STOCK_ICON(null,"null_icon."IMAGE_EXT,_("Null Tool"));
INIT_STOCK_ICON(normal,"normal_icon."IMAGE_EXT,_("Normal Tool"));
+ INIT_STOCK_ICON(transform,"transform_icon."IMAGE_EXT,_("Transform Tool"));
INIT_STOCK_ICON(polygon,"polyline_icon."IMAGE_EXT,_("Polygon Tool"));
INIT_STOCK_ICON(bline,"bline_icon."IMAGE_EXT,_("BLine Tool"));
INIT_STOCK_ICON(eyedrop,"eyedrop_icon."IMAGE_EXT,_("Eyedrop Tool"));
INIT_STOCK_ICON(circle,"circle_icon."IMAGE_EXT,_("Circle Tool"));
INIT_STOCK_ICON(rectangle,"rectangle_icon."IMAGE_EXT,_("Rectangle Tool"));
INIT_STOCK_ICON(smooth_move,"smooth_move_icon."IMAGE_EXT,_("SmoothMove Tool"));
- INIT_STOCK_ICON(scale,"scale_icon."IMAGE_EXT,_("Scale Tool"));
INIT_STOCK_ICON(width,"width_icon."IMAGE_EXT,_("Width Tool"));
- INIT_STOCK_ICON(rotate,"rotate_icon."IMAGE_EXT,_("Rotate Tool"));
INIT_STOCK_ICON(zoom,"zoom_icon."IMAGE_EXT,_("Zoom Tool"));
INIT_STOCK_ICON(info,"info_icon."IMAGE_EXT,_("Info Tool"));
INIT_STOCK_ICON(mirror,"mirror_icon."IMAGE_EXT,_("Mirror Tool"));
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
-** Copyright (c) 2008 Carlos López
+** Copyright (c) 2008 Carlos López
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
param_list2=canvas_interface->generate_param_list(
synfigapp::ValueDesc(
ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())
- ,0
+ ,ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())
+ ->get_link_index_from_name("point")
)
);
param_list2.add("origin",location);
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
synfigapp::Settings& settings;
+ sigc::connection keypress_connect;
+ sigc::connection keyrelease_connect;
+
etl::handle<DuckDrag_Mirror> duck_dragger_;
Gtk::Table options_table;
- Gtk::CheckButton checkbutton_axis_x;
- Gtk::CheckButton checkbutton_axis_y;
+ Gtk::RadioButton::Group radiobutton_group;
+ Gtk::RadioButton radiobutton_axis_x;
+ Gtk::RadioButton radiobutton_axis_y;
public:
- Axis get_axis()const { return checkbutton_axis_x.get_active()?AXIS_X:AXIS_Y; }
+ Axis get_axis()const { return radiobutton_axis_x.get_active()?AXIS_X:AXIS_Y; }
void set_axis(Axis a)
{
if(a==AXIS_X)
- {
- checkbutton_axis_x.set_active(true);
- checkbutton_axis_y.set_active(false);
- }
+ radiobutton_axis_x.set_active(true);
else
- {
- checkbutton_axis_y.set_active(true);
- checkbutton_axis_x.set_active(false);
- }
+ radiobutton_axis_y.set_active(true);
duck_dragger_->axis=get_axis();
}
- void update_axis_y()
+ void update_axes()
{
- checkbutton_axis_x.set_active(!checkbutton_axis_y.get_active());
- duck_dragger_->axis=get_axis();
- }
- void update_axis_x()
- {
- checkbutton_axis_y.set_active(!checkbutton_axis_x.get_active());
duck_dragger_->axis=get_axis();
}
+
Smach::event_result event_refresh_tool_options(const Smach::event& x);
void refresh_tool_options();
void load_settings();
void save_settings();
+
+ bool key_event(GdkEventKey *event);
}; // END of class StateMirror_Context
/* === M E T H O D S ======================================================= */
canvas_view_(canvas_view),
settings(synfigapp::Main::get_selected_input_device()->settings()),
duck_dragger_(new DuckDrag_Mirror()),
- checkbutton_axis_x(_("Horizontal")),
- checkbutton_axis_y(_("Vertical"))
+ radiobutton_axis_x(radiobutton_group,_("Horizontal")),
+ radiobutton_axis_y(radiobutton_group,_("Vertical"))
{
// Set up the tool options dialog
options_table.attach(*manage(new Gtk::Label(_("Mirror Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_axis_x, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_axis_y, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(radiobutton_axis_x, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(radiobutton_axis_y, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(*manage(new Gtk::Label(_("(Shift key toggles axis)"))), 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- checkbutton_axis_x.signal_toggled().connect(sigc::mem_fun(*this,&StateMirror_Context::update_axis_x));
- checkbutton_axis_y.signal_toggled().connect(sigc::mem_fun(*this,&StateMirror_Context::update_axis_y));
+ radiobutton_axis_x.signal_toggled().connect(sigc::mem_fun(*this,&StateMirror_Context::update_axes));
+ radiobutton_axis_y.signal_toggled().connect(sigc::mem_fun(*this,&StateMirror_Context::update_axes));
options_table.show_all();
refresh_tool_options();
get_work_area()->set_allow_layer_clicks(true);
get_work_area()->set_duck_dragger(duck_dragger_);
+ keypress_connect=get_work_area()->signal_key_press_event().connect(sigc::mem_fun(*this,&StateMirror_Context::key_event),false);
+ keyrelease_connect=get_work_area()->signal_key_release_event().connect(sigc::mem_fun(*this,&StateMirror_Context::key_event),false);
+
// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
get_canvas_view()->work_area->reset_cursor();
load_settings();
}
+bool
+StateMirror_Context::key_event(GdkEventKey *event)
+{
+ if (event->keyval==GDK_Shift_L || event->keyval==GDK_Shift_R )
+ set_axis(get_axis()==AXIS_X ? AXIS_Y:AXIS_X);
+
+ return false; //Pass on the event to other handlers, just in case
+}
+
void
StateMirror_Context::refresh_tool_options()
{
return Smach::RESULT_ACCEPT;
}
+
StateMirror_Context::~StateMirror_Context()
{
save_settings();
get_work_area()->clear_duck_dragger();
get_canvas_view()->work_area->reset_cursor();
+ keypress_connect.disconnect();
+ keyrelease_connect.disconnect();
+
App::dialog_tool_options->clear();
App::toolbox->refresh();
const DuckList selected_ducks(duckmatic->get_selected_ducks());
DuckList::const_iterator iter;
+ Time time(duckmatic->get_time());
+
// do the Vertex and Position ducks first
for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
if ((*iter)->get_type() == Duck::TYPE_VERTEX ||
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
if(extend_start_join_different)
LinkableValueNode::Handle::cast_dynamic(source.value_node)->
- set_link(0,finish_duck_value_desc.get_value_node());
+ set_link("point",finish_duck_value_desc.get_value_node());
else if(extend_start_join_same)
LinkableValueNode::Handle::cast_dynamic(source.value_node)->
- set_link(0,synfigapp::ValueDesc(LinkableValueNode::Handle::cast_dynamic(start_duck_value_node_bline->
+ set_link("point",synfigapp::ValueDesc(LinkableValueNode::Handle::cast_dynamic(start_duck_value_node_bline->
list[target_offset+finish_duck_index].value_node),0).get_value_node());
return result;
}
if(extend_finish_join_different)
LinkableValueNode::Handle::cast_dynamic(source.value_node)->
- set_link(0,start_duck_value_desc.get_value_node());
+ set_link("point",start_duck_value_desc.get_value_node());
else if(extend_finish_join_same)
LinkableValueNode::Handle::cast_dynamic(source.value_node)->
- set_link(0,synfigapp::ValueDesc(LinkableValueNode::Handle::cast_dynamic(finish_duck_value_node_bline->
+ set_link("point",synfigapp::ValueDesc(LinkableValueNode::Handle::cast_dynamic(finish_duck_value_node_bline->
list[target_offset+start_duck_index].value_node),0).get_value_node());
return result;
}
if (join_start_no_extend)
LinkableValueNode::Handle::cast_dynamic(value_node->list.front().value_node)->
- set_link(0,start_duck_value_desc.get_value_node());
+ set_link("point",start_duck_value_desc.get_value_node());
if (join_finish_no_extend)
LinkableValueNode::Handle::cast_dynamic(value_node->list.back().value_node)->
- set_link(0,finish_duck_value_desc.get_value_node());
+ set_link("point",finish_duck_value_desc.get_value_node());
if(get_auto_export_flag())
if (!get_canvas_interface()->add_value_node(value_node,get_id()))
continue;
}
// \todo if next isn't split, don't we want to copy its 'Tangent 1' instead?
- value_node->set_link(5,value_node_next->get_link(5)); // Tangent 2
- value_node->set_link(3,ValueNode_Const::create(true)); // Split Tangents
+ value_node->set_link("t2",value_node_next->get_link("t2"));
+ value_node->set_link("split",ValueNode_Const::create(true));
// get_canvas_interface()->auto_export(value_node);
printf("exporting\n");
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
# include <config.h>
#endif
+#include <gtkmm/dialog.h>
+#include <gtkmm/entry.h>
+
+#include <synfig/valuenode_animated.h>
+#include <synfig/valuenode_blinecalcvertex.h>
+#include <synfig/valuenode_composite.h>
+#include <synfig/valuenode_const.h>
+#include <synfig/valuenode_dynamiclist.h>
+#include <synfigapp/action_system.h>
+
#include "state_normal.h"
+#include "canvasview.h"
#include "workarea.h"
+#include "app.h"
+
+#include <synfigapp/action.h>
#include "event_mouse.h"
#include "event_layerclick.h"
#include "toolbox.h"
#include "dialog_tooloptions.h"
-#include <gtkmm/dialog.h>
-#include "widget_waypointmodel.h"
-#include <synfig/valuenode_animated.h>
-#include <synfig/valuenode_composite.h>
-#include <synfig/valuenode_const.h>
-#include "canvasview.h"
-#include "general.h"
+#include <gtkmm/optionmenu.h>
+#include "duck.h"
+#include <synfig/angle.h>
+#include <synfigapp/main.h>
+#include "general.h"
#endif
/* === U S I N G =========================================================== */
/* === M A C R O S ========================================================= */
+#ifndef EPSILON
+#define EPSILON 0.0000001
+#endif
+
+/* === G L O B A L S ======================================================= */
+
+StateNormal studio::state_normal;
+
/* === C L A S S E S & S T R U C T S ======================================= */
-class studio::StateNormal_Context : public sigc::trackable
+class DuckDrag_Combo : public DuckDrag_Base
{
- CanvasView *canvas_view;
+ synfig::Vector last_move;
+ synfig::Vector drag_offset;
+ synfig::Vector center;
+ synfig::Vector snap;
- CanvasView* get_canvas_view() { return canvas_view; }
- Canvas::Handle get_canvas() { return canvas_view->get_canvas(); }
- WorkArea* get_work_area() { return canvas_view->get_work_area(); }
- etl::handle<synfigapp::CanvasInterface> get_canvas_interface() { return canvas_view->canvas_interface(); }
+ synfig::Angle original_angle;
+ synfig::Real original_mag;
+
+ std::vector<synfig::Vector> last_;
+ std::vector<synfig::Vector> positions;
+
+
+ bool bad_drag;
+ bool move_only;
public:
- StateNormal_Context(CanvasView *canvas_view);
- ~StateNormal_Context();
+ etl::handle<CanvasView> canvas_view_;
+ bool scale;
+ bool rotate;
+ bool constrain;
+ DuckDrag_Combo();
+ void begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& begin);
+ bool end_duck_drag(Duckmatic* duckmatic);
+ void duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector);
- Smach::event_result event_stop_handler(const Smach::event& x);
+ etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
+};
- Smach::event_result event_refresh_handler(const Smach::event& x);
- Smach::event_result event_refresh_ducks_handler(const Smach::event& x);
+class studio::StateNormal_Context : public sigc::trackable
+{
+ etl::handle<CanvasView> canvas_view_;
- Smach::event_result event_undo_handler(const Smach::event& x);
+ synfigapp::Settings& settings;
- Smach::event_result event_redo_handler(const Smach::event& x);
+ sigc::connection keypress_connect;
+ sigc::connection keyrelease_connect;
- Smach::event_result event_mouse_button_down_handler(const Smach::event& x);
+ etl::handle<DuckDrag_Combo> duck_dragger_;
- Smach::event_result event_multiple_ducks_clicked_handler(const Smach::event& x);
+ Gtk::Table options_table;
- Smach::event_result event_refresh_tool_options(const Smach::event& x);
+ Gtk::CheckButton checkbutton_rotate;
+ Gtk::CheckButton checkbutton_scale;
+ Gtk::CheckButton checkbutton_constrain;
+
+public:
- Smach::event_result event_layer_click(const Smach::event& x);
+ bool get_rotate_flag()const { return checkbutton_rotate.get_active(); }
+ void set_rotate_flag(bool x) { checkbutton_rotate.set_active(x); refresh_rotate_flag(); }
+ void refresh_rotate_flag() { if(duck_dragger_)duck_dragger_->rotate=get_rotate_flag(); }
- void edit_several_waypoints(std::list<synfigapp::ValueDesc> value_desc_list);
+ bool get_scale_flag()const { return checkbutton_scale.get_active(); }
+ void set_scale_flag(bool x) { checkbutton_scale.set_active(x); refresh_scale_flag(); }
+ void refresh_scale_flag() { if(duck_dragger_)duck_dragger_->scale=get_scale_flag(); }
+ bool get_constrain_flag()const { return checkbutton_constrain.get_active(); }
+ void set_constrain_flag(bool x) { checkbutton_constrain.set_active(x); refresh_constrain_flag(); }
+ void refresh_constrain_flag() { if(duck_dragger_)duck_dragger_->constrain=get_constrain_flag(); }
+
+ Smach::event_result event_refresh_tool_options(const Smach::event& x);
void refresh_tool_options();
-}; // END of class StateNormal_Context
-/* === G L O B A L S ======================================================= */
+ StateNormal_Context(CanvasView* canvas_view);
-StateNormal studio::state_normal;
+ ~StateNormal_Context();
+
+ const etl::handle<CanvasView>& get_canvas_view()const{return canvas_view_;}
+ etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
+ synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
+ WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
+
+ void load_settings();
+ void save_settings();
-/* === P R O C E D U R E S ================================================= */
+ bool key_pressed(GdkEventKey *event);
+ bool key_released(GdkEventKey *event);
+
+}; // END of class StateNormal_Context
/* === M E T H O D S ======================================================= */
StateNormal::StateNormal():
Smach::state<StateNormal_Context>("normal")
{
- insert(event_def(EVENT_STOP,&StateNormal_Context::event_stop_handler));
- insert(event_def(EVENT_REFRESH,&StateNormal_Context::event_refresh_handler));
- insert(event_def(EVENT_REFRESH_DUCKS,&StateNormal_Context::event_refresh_ducks_handler));
- insert(event_def(EVENT_UNDO,&StateNormal_Context::event_undo_handler));
- insert(event_def(EVENT_REDO,&StateNormal_Context::event_redo_handler));
- insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateNormal_Context::event_mouse_button_down_handler));
- insert(event_def(EVENT_WORKAREA_MULTIPLE_DUCKS_CLICKED,&StateNormal_Context::event_multiple_ducks_clicked_handler));
insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateNormal_Context::event_refresh_tool_options));
- insert(event_def(EVENT_WORKAREA_LAYER_CLICKED,&StateNormal_Context::event_layer_click));
}
StateNormal::~StateNormal()
{
}
-StateNormal_Context::StateNormal_Context(CanvasView *canvas_view):
- canvas_view(canvas_view)
+void
+StateNormal_Context::load_settings()
{
- // synfig::info("Entered Normal State");
-}
+ String value;
+
+ if(settings.get_value("normal.rotate",value) && value=="1")
+ set_rotate_flag(true);
+ else
+ set_rotate_flag(false);
+
+ if(settings.get_value("normal.scale",value) && value=="1")
+ set_scale_flag(true);
+ else
+ set_scale_flag(false);
+
+ if(settings.get_value("normal.constrain",value) && value=="1")
+ set_constrain_flag(true);
+ else
+ set_constrain_flag(false);
-StateNormal_Context::~StateNormal_Context()
-{
- // synfig::info("Left Normal State");
}
void
-StateNormal_Context::refresh_tool_options()
+StateNormal_Context::save_settings()
{
- App::dialog_tool_options->clear();
- App::dialog_tool_options->set_name("normal");
+ settings.set_value("normal.rotate",get_rotate_flag()?"1":"0");
+ settings.set_value("normal.scale",get_scale_flag()?"1":"0");
+ settings.set_value("normal.constrain",get_constrain_flag()?"1":"0");
}
-Smach::event_result
-StateNormal_Context::event_refresh_tool_options(const Smach::event& /*x*/)
+StateNormal_Context::StateNormal_Context(CanvasView* canvas_view):
+ canvas_view_(canvas_view),
+ settings(synfigapp::Main::get_selected_input_device()->settings()),
+ duck_dragger_(new DuckDrag_Combo()),
+ checkbutton_rotate(_("Rotate (Ctrl)")),
+ checkbutton_scale(_("Scale (Alt)")),
+ checkbutton_constrain(_("Constrain (Shift)"))
{
+ duck_dragger_->canvas_view_=get_canvas_view();
+
+ // Set up the tool options dialog
+ options_table.attach(*manage(new Gtk::Label(_("Normal Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_rotate, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_scale, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_constrain, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+
+ checkbutton_rotate.signal_toggled().connect(sigc::mem_fun(*this,&StateNormal_Context::refresh_rotate_flag));
+ checkbutton_scale.signal_toggled().connect(sigc::mem_fun(*this,&StateNormal_Context::refresh_scale_flag));
+ checkbutton_constrain.signal_toggled().connect(sigc::mem_fun(*this,&StateNormal_Context::refresh_constrain_flag));
+
+
+ options_table.show_all();
refresh_tool_options();
- return Smach::RESULT_ACCEPT;
-}
+ //App::dialog_tool_options->set_widget(options_table);
+ App::dialog_tool_options->present();
-Smach::event_result
-StateNormal_Context::event_stop_handler(const Smach::event& /*x*/)
-{
- // synfig::info("STATE NORMAL: Received Stop Event");
- canvas_view->stop();
- return Smach::RESULT_ACCEPT;
-}
+ get_work_area()->set_allow_layer_clicks(true);
+ get_work_area()->set_duck_dragger(duck_dragger_);
-Smach::event_result
-StateNormal_Context::event_refresh_handler(const Smach::event& /*x*/)
-{
- // synfig::info("STATE NORMAL: Received Refresh Event");
- canvas_view->rebuild_tables();
- canvas_view->work_area->queue_render_preview();
- return Smach::RESULT_ACCEPT;
+ keypress_connect=get_work_area()->signal_key_press_event().connect(sigc::mem_fun(*this,&StateNormal_Context::key_pressed),false);
+ keyrelease_connect=get_work_area()->signal_key_release_event().connect(sigc::mem_fun(*this,&StateNormal_Context::key_released),false);
+
+// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
+ get_canvas_view()->work_area->reset_cursor();
+
+ App::toolbox->refresh();
+
+ load_settings();
+ refresh_scale_flag();
}
-Smach::event_result
-StateNormal_Context::event_refresh_ducks_handler(const Smach::event& /*x*/)
+bool
+StateNormal_Context::key_pressed(GdkEventKey *event)
{
- // synfig::info("STATE NORMAL: Received Refresh Ducks");
- canvas_view->queue_rebuild_ducks();
- return Smach::RESULT_ACCEPT;
+ switch(event->keyval)
+ {
+ case GDK_Control_L:
+ case GDK_Control_R:
+ set_rotate_flag(true);
+ break;
+ case GDK_Alt_L:
+ case GDK_Alt_R:
+ set_scale_flag(true);
+ break;
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ set_constrain_flag(true);
+ break;
+ default:
+ break;
+ }
+ return false; //Pass on the event to other handlers, just in case
}
-Smach::event_result
-StateNormal_Context::event_undo_handler(const Smach::event& /*x*/)
+bool
+StateNormal_Context::key_released(GdkEventKey *event)
{
- // synfig::info("STATE NORMAL: Received Undo Event");
- canvas_view->get_instance()->undo();
- return Smach::RESULT_ACCEPT;
+ switch(event->keyval)
+ {
+ case GDK_Control_L:
+ case GDK_Control_R:
+ set_rotate_flag(false);
+ break;
+ case GDK_Alt_L:
+ case GDK_Alt_R:
+ set_scale_flag(false);
+ break;
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ set_constrain_flag(false);
+ break;
+ default:
+ break;
+ }
+ return false; //Pass on the event to other handlers
}
-Smach::event_result
-StateNormal_Context::event_redo_handler(const Smach::event& /*x*/)
+void
+StateNormal_Context::refresh_tool_options()
{
- // synfig::info("STATE NORMAL: Received Redo Event");
- canvas_view->get_instance()->redo();
- return Smach::RESULT_ACCEPT;
+ App::dialog_tool_options->clear();
+ App::dialog_tool_options->set_widget(options_table);
+ App::dialog_tool_options->set_local_name(_("Normal Tool"));
+ App::dialog_tool_options->set_name("normal");
}
-Smach::event_result
-StateNormal_Context::event_mouse_button_down_handler(const Smach::event& x)
+
+
+StateNormal_Context::~StateNormal_Context()
{
- // synfig::info("STATE NORMAL: Received mouse button down Event");
+ save_settings();
- const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
+ get_work_area()->clear_duck_dragger();
+ get_canvas_view()->work_area->reset_cursor();
- switch(event.button)
- {
- case BUTTON_RIGHT:
- canvas_view->popup_main_menu();
- return Smach::RESULT_ACCEPT;
- default:
- return Smach::RESULT_OK;
- }
+ keypress_connect.disconnect();
+ keyrelease_connect.disconnect();
+
+ App::dialog_tool_options->clear();
+
+ App::toolbox->refresh();
}
+
Smach::event_result
-StateNormal_Context::event_layer_click(const Smach::event& x)
+StateNormal_Context::event_refresh_tool_options(const Smach::event& /*x*/)
{
- const EventLayerClick& event(*reinterpret_cast<const EventLayerClick*>(&x));
-
- if(event.layer)
- {
- // synfig::info("STATE NORMAL: Received layer click Event, \"%s\"",event.layer->get_name().c_str());
- }
- else
- {
- // synfig::info("STATE NORMAL: Received layer click Event with an empty layer.");
- }
+ refresh_tool_options();
+ return Smach::RESULT_ACCEPT;
+}
- switch(event.button)
- {
- case BUTTON_LEFT:
- if(!(event.modifier&Gdk::CONTROL_MASK))
- canvas_view->get_selection_manager()->clear_selected_layers();
- if(event.layer)
- {
- std::list<Layer::Handle> layer_list(canvas_view->get_selection_manager()->get_selected_layers());
- std::set<Layer::Handle> layers(layer_list.begin(),layer_list.end());
- if(layers.count(event.layer))
- {
- layers.erase(event.layer);
- layer_list=std::list<Layer::Handle>(layers.begin(),layers.end());
- canvas_view->get_selection_manager()->clear_selected_layers();
- canvas_view->get_selection_manager()->set_selected_layers(layer_list);
- }
- else
- {
- canvas_view->get_selection_manager()->set_selected_layer(event.layer);
- }
- }
- return Smach::RESULT_ACCEPT;
- case BUTTON_RIGHT:
- canvas_view->popup_layer_menu(event.layer);
- return Smach::RESULT_ACCEPT;
- default:
- return Smach::RESULT_OK;
- }
+DuckDrag_Combo::DuckDrag_Combo():
+ scale(false),
+ rotate(false),
+ constrain(false) // Lock aspect for scale; smooth move for translate
+{
}
-/*
void
-StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> value_desc_list)
+DuckDrag_Combo::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& offset)
{
- Gtk::Dialog dialog(
- "Edit Multiple Waypoints", // Title
- true, // Modal
- true // use_separator
- );
-
- Widget_WaypointModel widget_waypoint_model;
- widget_waypoint_model.show();
+ last_move=Vector(1,1);
- dialog.get_vbox()->pack_start(widget_waypoint_model);
+ const DuckList selected_ducks(duckmatic->get_selected_ducks());
+ DuckList::const_iterator iter;
+ bad_drag=false;
- dialog.add_button(Gtk::StockID("gtk-apply"),1);
- dialog.add_button(Gtk::StockID("gtk-cancel"),0);
- dialog.show();
+ drag_offset=duckmatic->find_duck(offset)->get_trans_point();
- if(dialog.run()==0)
- return;
- synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Set Waypoints"));
+ //snap=drag_offset-duckmatic->snap_point_to_grid(drag_offset);
+ //snap=offset-drag_offset_;
+ snap=Vector(0,0);
- std::list<synfigapp::ValueDesc>::iterator iter;
- for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)
+ // Calculate center
+ Point vmin(100000000,100000000);
+ Point vmax(-100000000,-100000000);
+ //std::set<etl::handle<Duck> >::iterator iter;
+ positions.clear();
+ int i;
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
{
- synfigapp::ValueDesc value_desc(*iter);
+ Point p((*iter)->get_trans_point());
+ vmin[0]=min(vmin[0],p[0]);
+ vmin[1]=min(vmin[1],p[1]);
+ vmax[0]=max(vmax[0],p[0]);
+ vmax[1]=max(vmax[1],p[1]);
+ positions.push_back(p);
+ }
+ center=(vmin+vmax)*0.5;
+ if((vmin-vmax).mag()<=EPSILON)
+ move_only=true;
+ else
+ move_only=false;
- if(!value_desc.is_valid())
- continue;
- ValueNode_Animated::Handle value_node;
+ synfig::Vector vect(offset-center);
+ original_angle=Angle::tan(vect[1],vect[0]);
+ original_mag=vect.mag();
+}
- // If this value isn't a ValueNode_Animated, but
- // it is somewhat constant, then go ahead and convert
- // it to a ValueNode_Animated.
- if(!value_desc.is_value_node() || ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()))
- {
- ValueBase value;
- if(value_desc.is_value_node())
- value=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())->get_value();
- else
- value=value_desc.get_value();
- value_node=ValueNode_Animated::create(value,get_canvas()->get_time());
+void
+DuckDrag_Combo::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
+{
+ if (!duckmatic) return;
- synfigapp::Action::Handle action;
+ if(bad_drag)
+ return;
- if(!value_desc.is_value_node())
- {
- action=synfigapp::Action::create("ValueDescConnect");
- action->set_param("dest",value_desc);
- action->set_param("src",ValueNode::Handle(value_node));
- }
- else
- {
- action=synfigapp::Action::create("ValueNodeReplace");
- action->set_param("dest",value_desc.get_value_node());
- action->set_param("src",ValueNode::Handle(value_node));
- }
+ //Override axis lock set in workarea when holding down the shift key
+ if (!move_only && (scale || rotate))
+ duckmatic->set_axis_lock(false);
- action->set_param("canvas",get_canvas());
- action->set_param("canvas_interface",get_canvas_interface());
+ synfig::Vector vect;
+ if (move_only || (!scale && !rotate))
+ vect= duckmatic->snap_point_to_grid(vector)-drag_offset+snap;
+ else
+ vect= duckmatic->snap_point_to_grid(vector)-center+snap;
+ last_move=vect;
- if(!get_canvas_interface()->get_instance()->perform_action(action))
- {
- get_canvas_view()->get_ui_interface()->error(_("Unable to convert to animated waypoint"));
- group.cancel();
- return;
- }
+ const DuckList selected_ducks(duckmatic->get_selected_ducks());
+ DuckList::const_iterator iter;
+
+ Time time(duckmatic->get_time());
+
+ int i;
+ if( move_only || (!scale && !rotate) )
+ {
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
+ {
+ if((*iter)->get_type()==Duck::TYPE_VERTEX || (*iter)->get_type()==Duck::TYPE_POSITION)
+ (*iter)->set_trans_point(positions[i]+vect, time);
}
- else
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
{
- if(value_desc.is_value_node())
- value_node=ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node());
+ if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)
+ (*iter)->set_trans_point(positions[i]+vect, time);
}
+ }
+ if (rotate)
+ {
+ Angle::deg angle(Angle::tan(vect[1],vect[0]));
+ angle=original_angle-angle;
+ if (constrain)
+ {
+ float degrees = angle.get()/15;
+ angle= Angle::deg (degrees>0?std::floor(degrees)*15:std::ceil(degrees)*15);
+ }
+ Real mag(vect.mag()/original_mag);
+ Real sine(Angle::sin(angle).get());
+ Real cosine(Angle::cos(angle).get());
- if(value_node)
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
{
+ if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)continue;
- synfigapp::Action::Handle action(synfigapp::Action::create("WaypointSetSmart"));
-
- if(!action)
- {
- get_canvas_view()->get_ui_interface()->error(_("Unable to find WaypointSetSmart action"));
- group.cancel();
- return;
- }
+ Vector x(positions[i]-center),p;
+ p[0]=cosine*x[0]+sine*x[1];
+ p[1]=-sine*x[0]+cosine*x[1];
+ if(scale)p*=mag;
+ p+=center;
+ (*iter)->set_trans_point(p, time);
+ }
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
+ {
+ if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
- action->set_param("canvas",get_canvas());
- action->set_param("canvas_interface",get_canvas_interface());
- action->set_param("value_node",ValueNode::Handle(value_node));
- action->set_param("time",get_canvas()->get_time());
- action->set_param("model",widget_waypoint_model.get_waypoint_model());
+ Vector x(positions[i]-center),p;
- if(!get_canvas_interface()->get_instance()->perform_action(action))
- {
- get_canvas_view()->get_ui_interface()->error(_("Unable to set a specific waypoint"));
- group.cancel();
- return;
- }
+ p[0]=cosine*x[0]+sine*x[1];
+ p[1]=-sine*x[0]+cosine*x[1];
+ if(scale)p*=mag;
+ p+=center;
+ (*iter)->set_trans_point(p, time);
}
+ } else if (scale)
+ {
+ if(!constrain)
+ {
+ if(abs(drag_offset[0]-center[0])>EPSILON)
+ vect[0]/=drag_offset[0]-center[0];
+ else
+ vect[0]=1;
+ if(abs(drag_offset[1]-center[1])>EPSILON)
+ vect[1]/=drag_offset[1]-center[1];
+ else
+ vect[1]=1;
+ }
else
{
- //get_canvas_view()->get_ui_interface()->error(_("Unable to animate a specific valuedesc"));
- //group.cancel();
- //return;
+ //vect[0]=vect[1]=vect.mag()*0.707106781;
+ Real amount(vect.mag()/(drag_offset-center).mag());
+ vect[0]=vect[1]=amount;
}
- }
-}
-*/
-
-Smach::event_result
-StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& /*x*/)
-{
- // synfig::info("STATE NORMAL: Received multiple duck click event");
+ if(vect[0]<EPSILON && vect[0]>-EPSILON)
+ vect[0]=1;
+ if(vect[1]<EPSILON && vect[1]>-EPSILON)
+ vect[1]=1;
- //const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
+ {
+ if(((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
- std::list<synfigapp::ValueDesc> value_desc_list;
+ Vector p(positions[i]-center);
- // Create a list of value_descs associated with selection
- const DuckList selected_ducks(get_work_area()->get_selected_ducks());
- DuckList::const_iterator iter;
- for(iter=selected_ducks.begin();iter!=selected_ducks.end();++iter)
- {
- synfigapp::ValueDesc value_desc((*iter)->get_value_desc());
+ p[0]*=vect[0];
+ p[1]*=vect[1];
+ p+=center;
+ (*iter)->set_trans_point(p, time);
+ }
+ for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
+ {
+ if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
- if(!value_desc.is_valid())
- continue;
+ Vector p(positions[i]-center);
- if(value_desc.get_value_type()==ValueBase::TYPE_BLINEPOINT && value_desc.is_value_node() && ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node()))
- {
- value_desc_list.push_back(
- synfigapp::ValueDesc(
- ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())
- ,0
- )
- );
+ p[0]*=vect[0];
+ p[1]*=vect[1];
+ p+=center;
+ (*iter)->set_trans_point(p, time);
}
- else
- value_desc_list.push_back(value_desc);
}
- Gtk::Menu *menu=manage(new Gtk::Menu());
- menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), menu));
-
- canvas_view->get_instance()->make_param_menu(menu,canvas_view->get_canvas(),value_desc_list);
+ // then patch up the tangents for the vertices we've moved
+ duckmatic->update_ducks();
- /*
- synfigapp::Action::ParamList param_list;
- param_list=get_canvas_interface()->generate_param_list(value_desc_list);
+ last_move=vect;
+}
- canvas_view->add_actions_to_menu(menu, param_list,synfigapp::Action::CATEGORY_VALUEDESC|synfigapp::Action::CATEGORY_VALUENODE);
+bool
+DuckDrag_Combo::end_duck_drag(Duckmatic* duckmatic)
+{
+ if(bad_drag)return false;
- menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Edit Waypoints"),
- sigc::bind(
- sigc::mem_fun(
- *this,
- &studio::StateNormal_Context::edit_several_waypoints
- ),
- value_desc_list
- )
- ));
- */
- menu->popup(3,gtk_get_current_event_time());
+ //synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Rotate Ducks"));
- return Smach::RESULT_ACCEPT;
+ if((last_move-Vector(1,1)).mag()>0.0001)
+ {
+ duckmatic->signal_edited_selected_ducks();
+ return true;
+ }
+ else
+ {
+ duckmatic->signal_user_click_selected_ducks(0);
+ return false;
+ }
}
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
/* === S T A R T =========================================================== */
-#ifndef __SYNFIG_STATE_NORMAL_H
-#define __SYNFIG_STATE_NORMAL_H
+#ifndef __SYNFIG_STUDIO_STATE_NORMAL_H
+#define __SYNFIG_STUDIO_STATE_NORMAL_H
/* === H E A D E R S ======================================================= */
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file state_null.cpp
+** \brief Null State File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#ifdef USING_PCH
+# include "pch.h"
+#else
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "state_null.h"
+#include "workarea.h"
+#include "event_mouse.h"
+#include "event_layerclick.h"
+#include "toolbox.h"
+#include "dialog_tooloptions.h"
+#include <gtkmm/dialog.h>
+#include "widget_waypointmodel.h"
+#include <synfig/valuenode_animated.h>
+#include <synfig/valuenode_composite.h>
+#include <synfig/valuenode_const.h>
+#include "canvasview.h"
+#include "general.h"
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+using namespace etl;
+using namespace synfig;
+using namespace studio;
+
+/* === M A C R O S ========================================================= */
+
+/* === G L O B A L S ======================================================= */
+
+StateNull studio::state_null;
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+class studio::StateNull_Context : public sigc::trackable
+{
+ CanvasView *canvas_view;
+
+ CanvasView* get_canvas_view() { return canvas_view; }
+ Canvas::Handle get_canvas() { return canvas_view->get_canvas(); }
+ WorkArea* get_work_area() { return canvas_view->get_work_area(); }
+ etl::handle<synfigapp::CanvasInterface> get_canvas_interface() { return canvas_view->canvas_interface(); }
+
+ Gtk::Table options_table;
+
+public:
+ StateNull_Context(CanvasView *canvas_view);
+ ~StateNull_Context();
+
+ Smach::event_result event_stop_handler(const Smach::event& x);
+ Smach::event_result event_refresh_handler(const Smach::event& x);
+ Smach::event_result event_refresh_ducks_handler(const Smach::event& x);
+ Smach::event_result event_undo_handler(const Smach::event& x);
+ Smach::event_result event_redo_handler(const Smach::event& x);
+ Smach::event_result event_mouse_button_down_handler(const Smach::event& x);
+ Smach::event_result event_multiple_ducks_clicked_handler(const Smach::event& x);
+ Smach::event_result event_refresh_tool_options(const Smach::event& x);
+ Smach::event_result event_layer_click(const Smach::event& x);
+
+ void refresh_tool_options();
+}; // END of class StateNull_Context
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === M E T H O D S ======================================================= */
+
+StateNull::StateNull():
+ Smach::state<StateNull_Context>("null")
+{
+ insert(event_def(EVENT_STOP,&StateNull_Context::event_stop_handler));
+ insert(event_def(EVENT_REFRESH,&StateNull_Context::event_refresh_handler));
+ insert(event_def(EVENT_REFRESH_DUCKS,&StateNull_Context::event_refresh_ducks_handler));
+ insert(event_def(EVENT_UNDO,&StateNull_Context::event_undo_handler));
+ insert(event_def(EVENT_REDO,&StateNull_Context::event_redo_handler));
+ insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateNull_Context::event_mouse_button_down_handler));
+ insert(event_def(EVENT_WORKAREA_MULTIPLE_DUCKS_CLICKED,&StateNull_Context::event_multiple_ducks_clicked_handler));
+ insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateNull_Context::event_refresh_tool_options));
+ insert(event_def(EVENT_WORKAREA_LAYER_CLICKED,&StateNull_Context::event_layer_click));
+}
+
+StateNull::~StateNull()
+{
+}
+
+StateNull_Context::StateNull_Context(CanvasView *canvas_view):
+ canvas_view(canvas_view)
+{
+ // Synfig Studio's default state is initialized in the canvas view constructor
+ // As a result, it cannot reference canvas view or workarea when created
+ // Other states need to reference the workarea,
+ // so a null state was created to be the default
+
+ options_table.attach(*manage(new Gtk::Label(_("Welcome to Synfig Studio"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.show_all();
+ refresh_tool_options();
+}
+
+StateNull_Context::~StateNull_Context()
+{
+}
+
+void
+StateNull_Context::refresh_tool_options()
+{
+ App::dialog_tool_options->clear();
+ App::dialog_tool_options->set_widget(options_table);
+ App::dialog_tool_options->set_local_name(_("Welcome to Synfig Studio"));
+ App::dialog_tool_options->set_name("null");
+}
+
+Smach::event_result
+StateNull_Context::event_refresh_tool_options(const Smach::event& /*x*/)
+{
+ refresh_tool_options();
+ return Smach::RESULT_ACCEPT;
+}
+
+Smach::event_result
+StateNull_Context::event_stop_handler(const Smach::event& /*x*/)
+{
+ // synfig::info("STATE NULL: Received Stop Event");
+ canvas_view->stop();
+ return Smach::RESULT_ACCEPT;
+}
+
+Smach::event_result
+StateNull_Context::event_refresh_handler(const Smach::event& /*x*/)
+{
+ // synfig::info("STATE NULL: Received Refresh Event");
+ canvas_view->rebuild_tables();
+ canvas_view->work_area->queue_render_preview();
+ return Smach::RESULT_ACCEPT;
+}
+
+Smach::event_result
+StateNull_Context::event_refresh_ducks_handler(const Smach::event& /*x*/)
+{
+ // synfig::info("STATE NULL: Received Refresh Ducks");
+ canvas_view->queue_rebuild_ducks();
+ return Smach::RESULT_ACCEPT;
+}
+
+Smach::event_result
+StateNull_Context::event_undo_handler(const Smach::event& /*x*/)
+{
+ // synfig::info("STATE NULL: Received Undo Event");
+ canvas_view->get_instance()->undo();
+ return Smach::RESULT_ACCEPT;
+}
+
+Smach::event_result
+StateNull_Context::event_redo_handler(const Smach::event& /*x*/)
+{
+ // synfig::info("STATE NULL: Received Redo Event");
+ canvas_view->get_instance()->redo();
+ return Smach::RESULT_ACCEPT;
+}
+
+Smach::event_result
+StateNull_Context::event_mouse_button_down_handler(const Smach::event& x)
+{
+ // synfig::info("STATE NULL: Received mouse button down Event");
+
+ const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
+
+ switch(event.button)
+ {
+ case BUTTON_RIGHT:
+ canvas_view->popup_main_menu();
+ return Smach::RESULT_ACCEPT;
+ default:
+ return Smach::RESULT_OK;
+ }
+}
+
+Smach::event_result
+StateNull_Context::event_layer_click(const Smach::event& x)
+{
+ const EventLayerClick& event(*reinterpret_cast<const EventLayerClick*>(&x));
+
+ if(event.layer)
+ {
+ // synfig::info("STATE NULL: Received layer click Event, \"%s\"",event.layer->get_name().c_str());
+ }
+ else
+ {
+ // synfig::info("STATE NULL: Received layer click Event with an empty layer.");
+ }
+
+ switch(event.button)
+ {
+ case BUTTON_LEFT:
+ if(!(event.modifier&Gdk::CONTROL_MASK))
+ canvas_view->get_selection_manager()->clear_selected_layers();
+ if(event.layer)
+ {
+ std::list<Layer::Handle> layer_list(canvas_view->get_selection_manager()->get_selected_layers());
+ std::set<Layer::Handle> layers(layer_list.begin(),layer_list.end());
+ if(layers.count(event.layer))
+ {
+ layers.erase(event.layer);
+ layer_list=std::list<Layer::Handle>(layers.begin(),layers.end());
+ canvas_view->get_selection_manager()->clear_selected_layers();
+ canvas_view->get_selection_manager()->set_selected_layers(layer_list);
+ }
+ else
+ {
+ canvas_view->get_selection_manager()->set_selected_layer(event.layer);
+ }
+ }
+ return Smach::RESULT_ACCEPT;
+ case BUTTON_RIGHT:
+ canvas_view->popup_layer_menu(event.layer);
+ return Smach::RESULT_ACCEPT;
+ default:
+ return Smach::RESULT_OK;
+ }
+}
+
+/*
+void
+StateNull_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> value_desc_list)
+{
+ Gtk::Dialog dialog(
+ "Edit Multiple Waypoints", // Title
+ true, // Modal
+ true // use_separator
+ );
+
+ Widget_WaypointModel widget_waypoint_model;
+ widget_waypoint_model.show();
+
+ dialog.get_vbox()->pack_start(widget_waypoint_model);
+
+
+ dialog.add_button(Gtk::StockID("gtk-apply"),1);
+ dialog.add_button(Gtk::StockID("gtk-cancel"),0);
+ dialog.show();
+
+ if(dialog.run()==0)
+ return;
+ synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Set Waypoints"));
+
+ std::list<synfigapp::ValueDesc>::iterator iter;
+ for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)
+ {
+ synfigapp::ValueDesc value_desc(*iter);
+
+ if(!value_desc.is_valid())
+ continue;
+
+ ValueNode_Animated::Handle value_node;
+
+ // If this value isn't a ValueNode_Animated, but
+ // it is somewhat constant, then go ahead and convert
+ // it to a ValueNode_Animated.
+ if(!value_desc.is_value_node() || ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()))
+ {
+ ValueBase value;
+ if(value_desc.is_value_node())
+ value=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())->get_value();
+ else
+ value=value_desc.get_value();
+
+ value_node=ValueNode_Animated::create(value,get_canvas()->get_time());
+
+ synfigapp::Action::Handle action;
+
+ if(!value_desc.is_value_node())
+ {
+ action=synfigapp::Action::create("ValueDescConnect");
+ action->set_param("dest",value_desc);
+ action->set_param("src",ValueNode::Handle(value_node));
+ }
+ else
+ {
+ action=synfigapp::Action::create("ValueNodeReplace");
+ action->set_param("dest",value_desc.get_value_node());
+ action->set_param("src",ValueNode::Handle(value_node));
+ }
+
+ action->set_param("canvas",get_canvas());
+ action->set_param("canvas_interface",get_canvas_interface());
+
+
+ if(!get_canvas_interface()->get_instance()->perform_action(action))
+ {
+ get_canvas_view()->get_ui_interface()->error(_("Unable to convert to animated waypoint"));
+ group.cancel();
+ return;
+ }
+ }
+ else
+ {
+ if(value_desc.is_value_node())
+ value_node=ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node());
+ }
+
+
+ if(value_node)
+ {
+
+ synfigapp::Action::Handle action(synfigapp::Action::create("WaypointSetSmart"));
+
+ if(!action)
+ {
+ get_canvas_view()->get_ui_interface()->error(_("Unable to find WaypointSetSmart action"));
+ group.cancel();
+ return;
+ }
+
+
+ action->set_param("canvas",get_canvas());
+ action->set_param("canvas_interface",get_canvas_interface());
+ action->set_param("value_node",ValueNode::Handle(value_node));
+ action->set_param("time",get_canvas()->get_time());
+ action->set_param("model",widget_waypoint_model.get_waypoint_model());
+
+ if(!get_canvas_interface()->get_instance()->perform_action(action))
+ {
+ get_canvas_view()->get_ui_interface()->error(_("Unable to set a specific waypoint"));
+ group.cancel();
+ return;
+ }
+ }
+ else
+ {
+ //get_canvas_view()->get_ui_interface()->error(_("Unable to animate a specific valuedesc"));
+ //group.cancel();
+ //return;
+ }
+
+ }
+}
+*/
+
+Smach::event_result
+StateNull_Context::event_multiple_ducks_clicked_handler(const Smach::event& /*x*/)
+{
+ // synfig::info("STATE NULL: Received multiple duck click event");
+
+ //const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
+
+ std::list<synfigapp::ValueDesc> value_desc_list;
+
+ // Create a list of value_descs associated with selection
+ const DuckList selected_ducks(get_work_area()->get_selected_ducks());
+ DuckList::const_iterator iter;
+ for(iter=selected_ducks.begin();iter!=selected_ducks.end();++iter)
+ {
+ synfigapp::ValueDesc value_desc((*iter)->get_value_desc());
+
+ if(!value_desc.is_valid())
+ continue;
+
+ if(value_desc.get_value_type()==ValueBase::TYPE_BLINEPOINT && value_desc.is_value_node() && ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node()))
+ {
+ value_desc_list.push_back(
+ synfigapp::ValueDesc(
+ ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())
+ ,ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())
+ ->get_link_index_from_name("point")
+ )
+ );
+ }
+ else
+ value_desc_list.push_back(value_desc);
+ }
+
+ Gtk::Menu *menu=manage(new Gtk::Menu());
+ menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), menu));
+
+ canvas_view->get_instance()->make_param_menu(menu,canvas_view->get_canvas(),value_desc_list);
+
+ /*
+ synfigapp::Action::ParamList param_list;
+ param_list=get_canvas_interface()->generate_param_list(value_desc_list);
+
+ canvas_view->add_actions_to_menu(menu, param_list,synfigapp::Action::CATEGORY_VALUEDESC|synfigapp::Action::CATEGORY_VALUENODE);
+
+ menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Edit Waypoints"),
+ sigc::bind(
+ sigc::mem_fun(
+ *this,
+ &studio::StateNull_Context::edit_several_waypoints
+ ),
+ value_desc_list
+ )
+ ));
+ */
+ menu->popup(3,gtk_get_current_event_time());
+
+ return Smach::RESULT_ACCEPT;
+}
+
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file state_null.h
+** \brief Null State Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Nikita Kitaev
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STATE_NULL_H
+#define __SYNFIG_STATE_NULL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "smach.h"
+
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio {
+
+class StateNull_Context;
+
+class StateNull : public Smach::state<StateNull_Context>
+{
+public:
+ StateNull();
+ ~StateNull();
+}; // END of class StateNull
+
+extern StateNull state_null;
+
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file state_rotate.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 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
-** published by the Free Software Foundation; either version 2 of
-** the License, or (at your option) any later version.
-**
-** This package is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-** General Public License for more details.
-** \endlegal
-*/
-/* ========================================================================= */
-
-/* === H E A D E R S ======================================================= */
-
-#ifdef USING_PCH
-# include "pch.h"
-#else
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm/dialog.h>
-#include <gtkmm/entry.h>
-
-#include <synfig/valuenode_dynamiclist.h>
-#include <synfigapp/action_system.h>
-
-#include "state_rotate.h"
-#include "canvasview.h"
-#include "workarea.h"
-#include "app.h"
-
-#include <synfigapp/action.h>
-#include "event_mouse.h"
-#include "event_layerclick.h"
-#include "toolbox.h"
-#include "dialog_tooloptions.h"
-#include <gtkmm/optionmenu.h>
-#include "duck.h"
-#include <synfig/angle.h>
-#include <synfigapp/main.h>
-
-#include "general.h"
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-using namespace etl;
-using namespace synfig;
-using namespace studio;
-
-/* === M A C R O S ========================================================= */
-
-#ifndef EPSILON
-#define EPSILON 0.0000001
-#endif
-
-/* === G L O B A L S ======================================================= */
-
-StateRotate studio::state_rotate;
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-class DuckDrag_Rotate : public DuckDrag_Base
-{
-
- synfig::Vector last_rotate;
- synfig::Vector drag_offset;
- synfig::Vector center;
- synfig::Vector snap;
-
- Angle original_angle;
- Real original_mag;
-
- std::vector<synfig::Vector> positions;
-
-
- bool bad_drag;
- bool move_only;
-
-public:
- etl::handle<CanvasView> canvas_view_;
- bool use_magnitude;
- DuckDrag_Rotate();
- void begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& begin);
- bool end_duck_drag(Duckmatic* duckmatic);
- void duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector);
-
- etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
-};
-
-
-class studio::StateRotate_Context : public sigc::trackable
-{
- etl::handle<CanvasView> canvas_view_;
-
- synfigapp::Settings& settings;
-
- etl::handle<DuckDrag_Rotate> duck_dragger_;
-
- Gtk::Table options_table;
-
- Gtk::CheckButton checkbutton_scale;
-
-public:
-
- bool get_scale_flag()const { return checkbutton_scale.get_active(); }
- void set_scale_flag(bool x) { return checkbutton_scale.set_active(x); refresh_scale_flag(); }
-
-
- Smach::event_result event_refresh_tool_options(const Smach::event& x);
-
- void refresh_tool_options();
-
- void refresh_scale_flag() { if(duck_dragger_)duck_dragger_->use_magnitude=get_scale_flag(); }
-
- StateRotate_Context(CanvasView* canvas_view);
-
- ~StateRotate_Context();
-
- const etl::handle<CanvasView>& get_canvas_view()const{return canvas_view_;}
- etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
- synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
- WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-
- void load_settings();
- void save_settings();
-}; // END of class StateRotate_Context
-
-/* === M E T H O D S ======================================================= */
-
-StateRotate::StateRotate():
- Smach::state<StateRotate_Context>("rotate")
-{
- insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateRotate_Context::event_refresh_tool_options));
-}
-
-StateRotate::~StateRotate()
-{
-}
-
-void
-StateRotate_Context::load_settings()
-{
- String value;
-
- if(settings.get_value("rotate.scale",value) && value=="0")
- set_scale_flag(false);
- else
- set_scale_flag(true);
-}
-
-void
-StateRotate_Context::save_settings()
-{
- settings.set_value("rotate.scale",get_scale_flag()?"1":"0");
-}
-
-StateRotate_Context::StateRotate_Context(CanvasView* canvas_view):
- canvas_view_(canvas_view),
- settings(synfigapp::Main::get_selected_input_device()->settings()),
- duck_dragger_(new DuckDrag_Rotate()),
- checkbutton_scale(_("Allow Scale"))
-{
- duck_dragger_->canvas_view_=get_canvas_view();
-
- // Set up the tool options dialog
- options_table.attach(*manage(new Gtk::Label(_("Rotate Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_scale, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-
- checkbutton_scale.signal_toggled().connect(sigc::mem_fun(*this,&StateRotate_Context::refresh_scale_flag));
-
- options_table.show_all();
- refresh_tool_options();
- //App::dialog_tool_options->set_widget(options_table);
- App::dialog_tool_options->present();
-
- get_work_area()->set_allow_layer_clicks(true);
- get_work_area()->set_duck_dragger(duck_dragger_);
-
-// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
- get_canvas_view()->work_area->reset_cursor();
-
- App::toolbox->refresh();
-
- load_settings();
- refresh_scale_flag();
-}
-
-void
-StateRotate_Context::refresh_tool_options()
-{
- App::dialog_tool_options->clear();
- App::dialog_tool_options->set_widget(options_table);
- App::dialog_tool_options->set_local_name(_("Rotate Tool"));
- App::dialog_tool_options->set_name("rotate");
-}
-
-Smach::event_result
-StateRotate_Context::event_refresh_tool_options(const Smach::event& /*x*/)
-{
- refresh_tool_options();
- return Smach::RESULT_ACCEPT;
-}
-
-StateRotate_Context::~StateRotate_Context()
-{
- save_settings();
-
- get_work_area()->clear_duck_dragger();
- get_canvas_view()->work_area->reset_cursor();
-
- App::dialog_tool_options->clear();
-
- App::toolbox->refresh();
-}
-
-
-
-
-DuckDrag_Rotate::DuckDrag_Rotate()
-{
- use_magnitude=true;
-}
-
-void
-DuckDrag_Rotate::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& offset)
-{
- last_rotate=Vector(1,1);
-
- const DuckList selected_ducks(duckmatic->get_selected_ducks());
- DuckList::const_iterator iter;
-
-/*
- if(duckmatic->get_selected_ducks().size()<2)
- {
- bad_drag=true;
- return;
- }
-*/
- bad_drag=false;
-
- drag_offset=duckmatic->find_duck(offset)->get_trans_point();
-
- //snap=drag_offset-duckmatic->snap_point_to_grid(drag_offset);
- //snap=offset-drag_offset;
- snap=Vector(0,0);
-
- // Calculate center
- Point vmin(100000000,100000000);
- Point vmax(-100000000,-100000000);
- //std::set<etl::handle<Duck> >::iterator iter;
- positions.clear();
- int i;
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- Point p((*iter)->get_trans_point());
- vmin[0]=min(vmin[0],p[0]);
- vmin[1]=min(vmin[1],p[1]);
- vmax[0]=max(vmax[0],p[0]);
- vmax[1]=max(vmax[1],p[1]);
- positions.push_back(p);
- }
- center=(vmin+vmax)*0.5;
- if((vmin-vmax).mag()<=EPSILON)
- move_only=true;
- else
- move_only=false;
-
-
- synfig::Vector vect(offset-center);
- original_angle=Angle::tan(vect[1],vect[0]);
- original_mag=vect.mag();
-}
-
-
-void
-DuckDrag_Rotate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
-{
- if(bad_drag)
- return;
-
- //std::set<etl::handle<Duck> >::iterator iter;
- synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-center+snap);
-
- const DuckList selected_ducks(duckmatic->get_selected_ducks());
- DuckList::const_iterator iter;
-
- if(move_only)
- {
- int i;
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)continue;
-
- Vector p(positions[i]);
-
- p[0]+=vect[0];
- p[1]+=vect[1];
- (*iter)->set_trans_point(p);
- }
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-
- Vector p(positions[i]);
-
- p[0]+=vect[0];
- p[1]+=vect[1];
- (*iter)->set_trans_point(p);
- }
- return;
- }
-
- Angle::tan angle(vect[1],vect[0]);
- angle=original_angle-angle;
- Real mag(vect.mag()/original_mag);
- Real sine(Angle::sin(angle).get());
- Real cosine(Angle::cos(angle).get());
-
- int i;
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)continue;
-
- Vector x(positions[i]-center),p;
-
- p[0]=cosine*x[0]+sine*x[1];
- p[1]=-sine*x[0]+cosine*x[1];
- if(use_magnitude)p*=mag;
- p+=center;
- (*iter)->set_trans_point(p);
- }
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-
- Vector x(positions[i]-center),p;
-
- p[0]=cosine*x[0]+sine*x[1];
- p[1]=-sine*x[0]+cosine*x[1];
- if(use_magnitude)p*=mag;
- p+=center;
- (*iter)->set_trans_point(p);
- }
-
- last_rotate=vect;
- //snap=Vector(0,0);
-}
-
-bool
-DuckDrag_Rotate::end_duck_drag(Duckmatic* duckmatic)
-{
- if(bad_drag)return false;
- if(move_only)
- {
- synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Move Duck"));
- duckmatic->signal_edited_selected_ducks();
- return true;
- }
-
- synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Rotate Ducks"));
-
- if((last_rotate-Vector(1,1)).mag()>0.0001)
- {
- duckmatic->signal_edited_selected_ducks();
- return true;
- }
- else
- {
- duckmatic->signal_user_click_selected_ducks(0);
- return false;
- }
-}
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file state_rotate.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**
-** This package is free software; you can redistribute it and/or
-** modify it under the terms of the GNU General Public License as
-** published by the Free Software Foundation; either version 2 of
-** the License, or (at your option) any later version.
-**
-** This package is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-** General Public License for more details.
-** \endlegal
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_STATE_ROTATE_H
-#define __SYNFIG_STUDIO_STATE_ROTATE_H
-
-/* === H E A D E R S ======================================================= */
-
-#include "smach.h"
-
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio {
-
-class StateRotate_Context;
-
-class StateRotate : public Smach::state<StateRotate_Context>
-{
-public:
- StateRotate();
- ~StateRotate();
-}; // END of class StateRotate
-
-extern StateRotate state_rotate;
-
-}; // END of namespace studio
-
-/* === E N D =============================================================== */
-
-#endif
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file state_scale.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 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
-** published by the Free Software Foundation; either version 2 of
-** the License, or (at your option) any later version.
-**
-** This package is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-** General Public License for more details.
-** \endlegal
-*/
-/* ========================================================================= */
-
-/* === H E A D E R S ======================================================= */
-
-#ifdef USING_PCH
-# include "pch.h"
-#else
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm/dialog.h>
-#include <gtkmm/entry.h>
-
-#include <synfig/valuenode_dynamiclist.h>
-#include <synfigapp/action_system.h>
-
-#include "state_scale.h"
-#include "canvasview.h"
-#include "workarea.h"
-#include "app.h"
-
-#include <synfigapp/action.h>
-#include "event_mouse.h"
-#include "event_layerclick.h"
-#include "toolbox.h"
-#include "dialog_tooloptions.h"
-#include <gtkmm/optionmenu.h>
-#include "duck.h"
-#include <synfigapp/main.h>
-
-#include "general.h"
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-using namespace etl;
-using namespace synfig;
-using namespace studio;
-
-/* === M A C R O S ========================================================= */
-
-/* === G L O B A L S ======================================================= */
-
-StateScale studio::state_scale;
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-class DuckDrag_Scale : public DuckDrag_Base
-{
-
- synfig::Vector last_scale;
- synfig::Vector drag_offset;
- synfig::Vector center;
- synfig::Vector snap;
-
- std::vector<synfig::Vector> positions;
-
- bool move_only;
-
- bool bad_drag;
-public:
- bool lock_aspect;
- DuckDrag_Scale();
- void begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& begin);
- bool end_duck_drag(Duckmatic* duckmatic);
- void duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector);
-};
-
-
-class studio::StateScale_Context : public sigc::trackable
-{
- etl::handle<CanvasView> canvas_view_;
-
- synfigapp::Settings& settings;
-
- etl::handle<DuckDrag_Scale> duck_dragger_;
-
- Gtk::Table options_table;
-
-
- Gtk::CheckButton checkbutton_aspect_lock;
-
-public:
-
- bool get_aspect_lock_flag()const { return checkbutton_aspect_lock.get_active(); }
- void set_aspect_lock_flag(bool x) { return checkbutton_aspect_lock.set_active(x); refresh_aspect_lock_flag(); }
-
- void refresh_aspect_lock_flag() { if(duck_dragger_)duck_dragger_->lock_aspect=get_aspect_lock_flag(); }
-
- Smach::event_result event_refresh_tool_options(const Smach::event& x);
-
- void refresh_tool_options();
-
- StateScale_Context(CanvasView* canvas_view);
-
- ~StateScale_Context();
-
- const etl::handle<CanvasView>& get_canvas_view()const{return canvas_view_;}
- etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
- synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
- WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-
- void load_settings();
- void save_settings();
-}; // END of class StateScale_Context
-
-/* === M E T H O D S ======================================================= */
-
-StateScale::StateScale():
- Smach::state<StateScale_Context>("scale")
-{
- insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateScale_Context::event_refresh_tool_options));
-}
-
-StateScale::~StateScale()
-{
-}
-
-void
-StateScale_Context::load_settings()
-{
- String value;
-
- if(settings.get_value("scale.lock_aspect",value) && value=="0")
- set_aspect_lock_flag(false);
- else
- set_aspect_lock_flag(true);
-}
-
-void
-StateScale_Context::save_settings()
-{
- settings.set_value("scale.lock_aspect",get_aspect_lock_flag()?"1":"0");
-}
-
-StateScale_Context::StateScale_Context(CanvasView* canvas_view):
- canvas_view_(canvas_view),
- settings(synfigapp::Main::get_selected_input_device()->settings()),
- duck_dragger_(new DuckDrag_Scale()),
- checkbutton_aspect_lock(_("Lock Aspect Ratio"))
-{
- // Set up the tool options dialog
- options_table.attach(*manage(new Gtk::Label(_("Scale Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_aspect_lock, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-
- checkbutton_aspect_lock.signal_toggled().connect(sigc::mem_fun(*this,&StateScale_Context::refresh_aspect_lock_flag));
-
- options_table.show_all();
- refresh_tool_options();
- App::dialog_tool_options->present();
-
- get_work_area()->set_allow_layer_clicks(true);
- get_work_area()->set_duck_dragger(duck_dragger_);
-
-// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
- get_canvas_view()->work_area->reset_cursor();
-
- App::toolbox->refresh();
-
- set_aspect_lock_flag(true);
- load_settings();
-}
-
-void
-StateScale_Context::refresh_tool_options()
-{
- App::dialog_tool_options->clear();
- App::dialog_tool_options->set_widget(options_table);
- App::dialog_tool_options->set_local_name(_("Scale Tool"));
- App::dialog_tool_options->set_name("scale");
-}
-
-Smach::event_result
-StateScale_Context::event_refresh_tool_options(const Smach::event& /*x*/)
-{
- refresh_tool_options();
- return Smach::RESULT_ACCEPT;
-}
-
-StateScale_Context::~StateScale_Context()
-{
- save_settings();
-
- get_work_area()->clear_duck_dragger();
- get_canvas_view()->work_area->reset_cursor();
-
- App::dialog_tool_options->clear();
-
- App::toolbox->refresh();
-}
-
-
-
-
-DuckDrag_Scale::DuckDrag_Scale():
- lock_aspect(true)
-{
-}
-
-#ifndef EPSILON
-#define EPSILON 0.0000001
-#endif
-
-void
-DuckDrag_Scale::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& offset)
-{
- last_scale=Vector(1,1);
- const DuckList selected_ducks(duckmatic->get_selected_ducks());
- DuckList::const_iterator iter;
-
- //if(duckmatic->get_selected_ducks().size()<2)
- //{
- // bad_drag=true;
-// return;
-// }
- bad_drag=false;
-
- drag_offset=duckmatic->find_duck(offset)->get_trans_point();
-
- //snap=drag_offset-duckmatic->snap_point_to_grid(drag_offset);
- //snap=offset-drag_offset;
- snap=Vector(0,0);
-
- // Calculate center
- Point vmin(100000000,100000000);
- Point vmax(-100000000,-100000000);
- //std::set<etl::handle<Duck> >::iterator iter;
- positions.clear();
- int i;
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- Point p((*iter)->get_trans_point());
- vmin[0]=min(vmin[0],p[0]);
- vmin[1]=min(vmin[1],p[1]);
- vmax[0]=max(vmax[0],p[0]);
- vmax[1]=max(vmax[1],p[1]);
- positions.push_back(p);
- }
- if((vmin-vmax).mag()<=EPSILON)
- move_only=true;
- else
- move_only=false;
-
- center=(vmin+vmax)*0.5;
-}
-
-
-void
-DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
-{
- const DuckList selected_ducks(duckmatic->get_selected_ducks());
- DuckList::const_iterator iter;
-
- if(bad_drag)
- return;
-
- //std::set<etl::handle<Duck> >::iterator iter;
- synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-center);
- last_scale=vect;
-
- if(move_only)
- {
- int i;
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if(((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-
- Vector p(positions[i]);
-
- p[0]+=vect[0];
- p[1]+=vect[1];
- (*iter)->set_trans_point(p);
- }
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-
- Vector p(positions[i]);
-
- p[0]+=vect[0];
- p[1]+=vect[1];
- (*iter)->set_trans_point(p);
- }
- return;
- }
-
- if(!lock_aspect)
- {
- if(abs(drag_offset[0]-center[0])>EPSILON)
- vect[0]/=drag_offset[0]-center[0];
- else
- vect[0]=1;
- if(abs(drag_offset[1]-center[1])>EPSILON)
- vect[1]/=drag_offset[1]-center[1];
- else
- vect[1]=1;
- }
- else
- {
- //vect[0]=vect[1]=vect.mag()*0.707106781;
- Real amount(vect.mag()/(drag_offset-center).mag());
- vect[0]=vect[1]=amount;
- }
-
- if(vect[0]<EPSILON && vect[0]>-EPSILON)
- vect[0]=1;
- if(vect[1]<EPSILON && vect[1]>-EPSILON)
- vect[1]=1;
-
- int i;
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if(((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-
- Vector p(positions[i]-center);
-
- p[0]*=vect[0];
- p[1]*=vect[1];
- p+=center;
- (*iter)->set_trans_point(p);
- }
- for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
- {
- if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-
- Vector p(positions[i]-center);
-
- p[0]*=vect[0];
- p[1]*=vect[1];
- p+=center;
- (*iter)->set_trans_point(p);
- }
-
- last_scale=vect;
- //snap=Vector(0,0);
-}
-
-bool
-DuckDrag_Scale::end_duck_drag(Duckmatic* duckmatic)
-{
- if(bad_drag)return false;
-
- if((last_scale-Vector(1,1)).mag()>0.0001)
- {
- duckmatic->signal_edited_selected_ducks();
- return true;
- }
- else
- {
- duckmatic->signal_user_click_selected_ducks(0);
- return false;
- }
-}
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file state_scale.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**
-** This package is free software; you can redistribute it and/or
-** modify it under the terms of the GNU General Public License as
-** published by the Free Software Foundation; either version 2 of
-** the License, or (at your option) any later version.
-**
-** This package is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-** General Public License for more details.
-** \endlegal
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_STATE_SCALE_H
-#define __SYNFIG_STUDIO_STATE_SCALE_H
-
-/* === H E A D E R S ======================================================= */
-
-#include "smach.h"
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio {
-
-class StateScale_Context;
-
-class StateScale : public Smach::state<StateScale_Context>
-{
-public:
- StateScale();
- ~StateScale();
-}; // END of class StateScale
-
-extern StateScale state_scale;
-
-}; // END of namespace studio
-
-/* === E N D =============================================================== */
-
-#endif
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
+#include <synfig/valuenode_blinecalcvertex.h>
+#include <synfig/valuenode_composite.h>
#include <synfig/valuenode_dynamiclist.h>
#include <synfigapp/action_system.h>
int i;
+ Time time(duckmatic->get_time());
+
// process vertex and position ducks first
for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
{
dist=0;
last_[i]=vect*dist;
- (*iter)->set_trans_point(p+last_[i]);
+ (*iter)->set_trans_point(p+last_[i], time);
}
// then process non vertex and non position ducks
dist=0;
last_[i]=vect*dist;
- (*iter)->set_trans_point(p+last_[i]);
+ (*iter)->set_trans_point(p+last_[i], time);
}
+ // then patch up the tangents for the vertices we've moved
+ duckmatic->update_ducks();
+
last_translate_=vect;
//snap=Vector(0,0);
}
for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
{
if(last_[i].mag()>0.0001)
- if(!(*iter)->signal_edited()((*iter)->get_point()))
{
- throw String("Bad Move");
+ if ((*iter)->get_type() == Duck::TYPE_ANGLE)
+ {
+ if(!(*iter)->signal_edited_angle()((*iter)->get_rotations()))
+ {
+ throw String("Bad edit");
+ }
+ }
+ else if (App::restrict_radius_ducks &&
+ (*iter)->is_radius())
+ {
+ Point point((*iter)->get_point());
+ bool changed = false;
+
+ if (point[0] < 0)
+ {
+ point[0] = 0;
+ changed = true;
+ }
+ if (point[1] < 0)
+ {
+ point[1] = 0;
+ changed = true;
+ }
+
+ if (changed) (*iter)->set_point(point);
+
+ if(!(*iter)->signal_edited()(point))
+ {
+ throw String("Bad edit");
+ }
+ }
+ else
+ {
+ if(!(*iter)->signal_edited()((*iter)->get_point()))
+ {
+ throw String("Bad edit");
+ }
+ }
}
}
//duckmatic->get_selected_ducks()=new_set;
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
** Copyright (c) 2008 Paul Wise
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
{
etl::handle<studio::CanvasView> canvas_view(studio::App::get_selected_canvas_view());
if(canvas_view)
- {
- if(state->get_name()==String("normal"))
- {
- canvas_view->get_smach().egress();
- }
- else
- {
canvas_view->get_smach().enter(state);
- }
- }
else
refresh();
}
Widget_Filename::Widget_Filename()
{
entry_filename=manage(new Gtk::Entry());
- button_choose=manage(new Gtk::Button(_("Find")));
+ label_find= manage(new Gtk::Label(_("Find")));
+ button_choose=manage(new Gtk::Button());
+ Pango::AttrList attr_list;
+ {
+ Pango::AttrInt pango_size(Pango::Attribute::create_attr_size(Pango::SCALE*7));
+ pango_size.set_start_index(0);
+ pango_size.set_end_index(64);
+ attr_list.change(pango_size);
+ }
+ label_find->set_attributes(attr_list);
+ label_find->set_ellipsize(Pango::ELLIPSIZE_END);
+ button_choose->add(*label_find);
pack_start(*entry_filename);
pack_start(*button_choose);
entry_filename->show();
button_choose->show();
+ label_find->show();
button_choose->signal_clicked().connect(sigc::mem_fun(*this, &studio::Widget_Filename::on_button_choose_pressed));
//entry_filename->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_Filename::on_value_changed));
{
Gtk::Entry *entry_filename;
Gtk::Button *button_choose;
+ Gtk::Label *label_find;
void on_button_choose_pressed();
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
- action->set_param("value_desc",ValueDesc(value_node,3));
+ action->set_param("value_desc",ValueDesc(value_node,value_node->get_link_index_from_name("split")));
action->set_param("time",time);
action->set_param("new_value",synfig::ValueBase(false));
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
- action->set_param("value_desc",ValueDesc(value_node,3));
+ action->set_param("value_desc",ValueDesc(value_node,value_node->get_link_index_from_name("split")));
action->set_param("time",time);
action->set_param("new_value",synfig::ValueBase(true));
// tangent.
if( value_desc.parent_is_value_node() &&
value_desc.get_parent_value_node()->get_type()==ValueBase::TYPE_BLINEPOINT &&
- (value_desc.get_index()==4 || value_desc.get_index()==5) &&
+ (value_desc.get_name()=="t1" || value_desc.get_name()=="t2") &&
+ //(value_desc.get_index()==4 || value_desc.get_index()==5) &&
(*value_desc.get_parent_value_node())(time).get(BLinePoint()).get_split_tangent_flag()==false)
{
{
Vector t2((*parent_value_node->get_link("t2"))(time));
}
- if (value_desc.get_index()==4) {
+ //if (value_desc.get_index()==4) {
+ if (value_desc.get_name()=="t1") {
ValueNode_Composite::Handle parent_value_node;
parent_value_node=parent_value_node.cast_dynamic(value_desc.get_parent_value_node());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("time",time);
action->set_param("new_value",value);
- action->set_param("value_desc",ValueDesc(parent_value_node,5));
+ action->set_param("value_desc",ValueDesc(parent_value_node, parent_value_node->get_link_index_from_name("t2")));
if(!action->is_ready())
throw Error(Error::TYPE_NOTREADY);
case ValueBase::TYPE_VECTOR:
{
Angle old_angle = (*(ValueNode_RadialComposite::Handle::cast_dynamic(
- value_desc.get_value_node())->get_link_vfunc(1)))(time).get(Angle());
+ value_desc.get_value_node())->get_link("theta")))(time).get(Angle());
Vector vect(value.get(Vector()));
components[0]=vect.mag();
Angle change = Angle(Angle::tan(vect[1],vect[0])) - old_angle;
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("time",time);
- action->set_param("new_value",(*parent_value_node->get_link(4))(time));
- action->set_param("value_desc",ValueDesc(parent_value_node,5));
+ action->set_param("new_value",(*parent_value_node->get_link("t1"))(time));
+ action->set_param("value_desc",ValueDesc(parent_value_node,parent_value_node->get_link_index_from_name("t2")));
if(!action->is_ready())
throw Error(Error::TYPE_NOTREADY);
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("time",time);
action->set_param("new_value",average);
- action->set_param("value_desc",ValueDesc(parent_value_node,4));
+ action->set_param("value_desc",ValueDesc(parent_value_node,parent_value_node->get_link_index_from_name("t1")));
if(!action->is_ready())
throw Error(Error::TYPE_NOTREADY);
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("time",time);
action->set_param("new_value",average);
- action->set_param("value_desc",ValueDesc(parent_value_node,5));
+ action->set_param("value_desc",ValueDesc(parent_value_node,parent_value_node->get_link_index_from_name("t2")));
if(!action->is_ready())
throw Error(Error::TYPE_NOTREADY);
#include <synfig/valuenode_blinecalcvertex.h>
#include <synfig/valuenode_blinecalcwidth.h>
#include <synfig/valuenode_scale.h>
+#include <synfig/valuenode_range.h>
#include <map>
#include "general.h"
|| ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_node)
|| ValueNode_BLineCalcWidth::Handle::cast_dynamic(value_node)
|| ValueNode_Scale::Handle::cast_dynamic(value_node)
+ || ValueNode_Range::Handle::cast_dynamic(value_node)
)
return true;
return false;
**
** \legal
** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Nikita Kitaev
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
synfig::ValueNode::Handle get_parent_value_node()const { assert(parent_is_value_node()); return parent_value_node; }
int get_index()const { assert(parent_is_linkable_value_node()); return index; }
+ synfig::String get_name()const { assert(parent_is_linkable_value_node()); return (synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node))->link_name(index); }
synfig::Time get_waypoint_time()const { assert(parent_is_waypoint()); return waypoint_time; }
const synfig::String& get_value_node_id()const { assert(parent_is_canvas()); return name; }