X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_smoothmove.cpp;h=f1f3fdbc8d6ddb4a2aa417f719d599f96b419eef;hb=2d5443247e61b09be783dac722c4d0794c71ef30;hp=3cda4f89f7e12ab6c2cfca19efa617372c184334;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp b/synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp index 3cda4f8..f1f3fdb 100644 --- a/synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file state_smooth_move.cpp ** \brief Template File ** ** $Id: state_smoothmove.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** 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. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** 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 */ /* ========================================================================= */ @@ -31,15 +32,15 @@ #include #include -#include -#include +#include +#include #include "state_smoothmove.h" #include "canvasview.h" #include "workarea.h" #include "app.h" -#include +#include #include "event_mouse.h" #include "event_layerclick.h" #include "toolbox.h" @@ -47,7 +48,7 @@ #include #include "duck.h" #include "onemoment.h" -#include +#include #endif @@ -55,7 +56,7 @@ using namespace std; using namespace etl; -using namespace sinfg; +using namespace synfig; using namespace studio; /* === M A C R O S ========================================================= */ @@ -70,18 +71,18 @@ class DuckDrag_SmoothMove : public DuckDrag_Base { float radius; - sinfg::Vector last_translate_; - sinfg::Vector drag_offset_; - sinfg::Vector snap; + synfig::Vector last_translate_; + synfig::Vector drag_offset_; + synfig::Vector snap; - std::vector last_; - std::vector positions; + std::vector last_; + std::vector positions; public: DuckDrag_SmoothMove(); - void begin_duck_drag(Duckmatic* duckmatic, const sinfg::Vector& begin); + void begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& begin); bool end_duck_drag(Duckmatic* duckmatic); - void duck_drag(Duckmatic* duckmatic, const sinfg::Vector& vector); + void duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector); void set_radius(float x) { radius=x; } float get_radius()const { return radius; } @@ -94,7 +95,7 @@ class studio::StateSmoothMove_Context : public sigc::trackable //Duckmatic::Push duckmatic_push; - sinfgapp::Settings& settings; + synfigapp::Settings& settings; etl::handle duck_dragger_; @@ -122,8 +123,8 @@ public: ~StateSmoothMove_Context(); const etl::handle& get_canvas_view()const{return canvas_view_;} - etl::handle get_canvas_interface()const{return canvas_view_->canvas_interface();} - sinfg::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();} + etl::handle 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(); @@ -162,7 +163,7 @@ StateSmoothMove_Context::save_settings() StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view): canvas_view_(canvas_view), // duckmatic_push(get_work_area()), - settings(sinfgapp::Main::get_selected_input_device()->settings()), + settings(synfigapp::Main::get_selected_input_device()->settings()), duck_dragger_(new DuckDrag_SmoothMove()), adj_radius(1,0,100000,0.01,0.1), spin_radius(adj_radius,0.1,3) @@ -229,7 +230,7 @@ DuckDrag_SmoothMove::DuckDrag_SmoothMove():radius(1.0f) } void -DuckDrag_SmoothMove::begin_duck_drag(Duckmatic* duckmatic, const sinfg::Vector& offset) +DuckDrag_SmoothMove::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& offset) { last_translate_=Vector(0,0); drag_offset_=duckmatic->find_duck(offset)->get_trans_point(); @@ -251,11 +252,11 @@ DuckDrag_SmoothMove::begin_duck_drag(Duckmatic* duckmatic, const sinfg::Vector& } void -DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const sinfg::Vector& vector) +DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector) { const DuckList selected_ducks(duckmatic->get_selected_ducks()); DuckList::const_iterator iter; - sinfg::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_+snap); + synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_+snap); int i; @@ -292,7 +293,7 @@ DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const sinfg::Vector& vector bool DuckDrag_SmoothMove::end_duck_drag(Duckmatic* duckmatic) { - //sinfg::info("end_duck_drag(): Diff= %f",last_translate_.mag()); + //synfig::info("end_duck_drag(): Diff= %f",last_translate_.mag()); if(last_translate_.mag()>0.0001) { const DuckList selected_ducks(duckmatic->get_selected_ducks());