X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Finputdevice.cpp;h=874fb190af97bfafc520876514e4d33795b067ca;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=110f0cd28b07f802989a73302e20027758356ede;hpb=7e1b3e8ecf46144d377f338b075967baa4b08ba6;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/inputdevice.cpp b/synfig-studio/trunk/src/synfigapp/inputdevice.cpp index 110f0cd..874fb19 100644 --- a/synfig-studio/trunk/src/synfigapp/inputdevice.cpp +++ b/synfig-studio/trunk/src/synfigapp/inputdevice.cpp @@ -34,7 +34,6 @@ #include #include #include "main.h" -#include #include "general.h" @@ -46,7 +45,6 @@ using namespace std; using namespace etl; using namespace synfig; using namespace synfigapp; -using namespace studio; /* === M A C R O S ========================================================= */ @@ -82,16 +80,16 @@ public: value=strprintf("%i",(int)input_device->get_blend_method()); return true; } - if(key=="color") + if(key=="outline_color") { - Color c(input_device->get_foreground_color()); + Color c(input_device->get_outline_color()); value=strprintf("%f %f %f %f",(float)c.get_r(),(float)c.get_g(),(float)c.get_b(),(float)c.get_a()); return true; } - if(key=="bgcolor") + if(key=="fill_color") { - Color c(input_device->get_background_color()); + Color c(input_device->get_fill_color()); value=strprintf("%f %f %f %f",(float)c.get_r(),(float)c.get_g(),(float)c.get_b(),(float)c.get_a()); return true; @@ -165,20 +163,20 @@ public: input_device->set_blend_method(Color::BlendMethod(atoi(value.c_str()))); return true; } - if(key=="color") + if(key=="outline_color") { float r=0,g=0,b=0,a=1; if(!strscanf(value,"%f %f %f %f",&r,&g,&b,&a)) return false; - input_device->set_foreground_color(synfig::Color(r,g,b,a)); + input_device->set_outline_color(synfig::Color(r,g,b,a)); return true; } - if(key=="bgcolor") + if(key=="fill_color") { float r=0,g=0,b=0,a=1; if(!strscanf(value,"%f %f %f %f",&r,&g,&b,&a)) return false; - input_device->set_background_color(synfig::Color(r,g,b,a)); + input_device->set_fill_color(synfig::Color(r,g,b,a)); return true; } if(key=="mode") @@ -211,7 +209,6 @@ public: mode = InputDevice::MODE_DISABLED; input_device->set_mode(mode); - DeviceTracker::set_device_mode(input_device->get_id(), mode); } void set_axes_value(const synfig::String & value) @@ -231,7 +228,6 @@ public: } input_device->set_axes(axes); - DeviceTracker::set_device_axes(input_device->get_id(), axes); } void set_keys_value(const synfig::String & value) @@ -254,14 +250,13 @@ public: } input_device->set_keys(keys); - DeviceTracker::set_device_keys(input_device->get_id(), keys); } virtual KeyList get_key_list()const { KeyList ret(Settings::get_key_list()); - ret.push_back("color"); - ret.push_back("bgcolor"); + ret.push_back("outline_color"); + ret.push_back("fill_color"); ret.push_back("state"); ret.push_back("bline_width"); ret.push_back("blend_method"); @@ -281,8 +276,8 @@ InputDevice::InputDevice(const synfig::String id_, Type type_): id_(id_), type_(type_), state_((type_==TYPE_PEN)?"draw":"normal"), - foreground_color_(Color::black()), - background_color_(Color::white()), + outline_color_(Color::black()), + fill_color_(Color::white()), bline_width_(Distance(1,Distance::SYSTEM_POINTS)), opacity_(1.0f), blend_method_(Color::BLEND_COMPOSITE),