grid_snap(false),
guide_snap(false),
grid_size(1.0/4.0,1.0/4.0),
- show_persistant_strokes(true)
+ show_persistent_strokes(true)
{
axis_lock=false;
drag_offset_=Point(0,0);
bezier_list_.clear();
stroke_list_.clear();
- if(show_persistant_strokes)
- stroke_list_=persistant_stroke_list_;
+ if(show_persistent_strokes)
+ stroke_list_=persistent_stroke_list_;
}
//! Returns \a true if the given duck is currently selected
}
void
-Duckmatic::add_persistant_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color)
+Duckmatic::add_persistent_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color)
{
add_stroke(stroke_point_list,color);
- persistant_stroke_list_.push_back(stroke_list_.back());
+ persistent_stroke_list_.push_back(stroke_list_.back());
}
void
-Duckmatic::clear_persistant_strokes()
+Duckmatic::clear_persistent_strokes()
{
- persistant_stroke_list_.clear();
+ persistent_stroke_list_.clear();
}
void
-Duckmatic::set_show_persistant_strokes(bool x)
+Duckmatic::set_show_persistent_strokes(bool x)
{
- if(x!=show_persistant_strokes)
+ if(x!=show_persistent_strokes)
{
- show_persistant_strokes=x;
+ show_persistent_strokes=x;
if(x)
- stroke_list_=persistant_stroke_list_;
+ stroke_list_=persistent_stroke_list_;
else
stroke_list_.clear();
}
std::list<etl::handle<Stroke> >::const_iterator iter;
- for(iter=persistant_stroke_list_.begin();iter!=persistant_stroke_list_.end();++iter)
+ for(iter=persistent_stroke_list_.begin();iter!=persistent_stroke_list_.end();++iter)
{
file<<"C "
<<(*iter)->color.get_r()<<' '
synfig::warning("Bad color line \"%s\"",line.c_str());
r=0;g=0;b=0;
}
- add_persistant_stroke(stroke_data, synfig::Color(r,g,b));
+ add_persistent_stroke(stroke_data, synfig::Color(r,g,b));
}
break;
case 'V':
if(!stroke_data)
{
stroke_data.spawn();
- add_persistant_stroke(stroke_data, synfig::Color(0,0,0));
+ add_persistent_stroke(stroke_data, synfig::Color(0,0,0));
}
float x,y;
if(!strscanf(line,"V %f %f",&x, &y))
std::list<etl::handle<Stroke> > stroke_list_;
- std::list<etl::handle<Stroke> > persistant_stroke_list_;
+ std::list<etl::handle<Stroke> > persistent_stroke_list_;
synfig::GUIDSet selected_ducks;
/*! \see grid_snap, show_grid */
synfig::Vector grid_size;
- bool show_persistant_strokes;
+ bool show_persistent_strokes;
bool axis_lock;
synfig::Point snap_point_to_grid(const synfig::Point& x, float radius=0.1)const;
- bool get_show_persistant_strokes()const { return show_persistant_strokes; }
- void set_show_persistant_strokes(bool x);
+ bool get_show_persistent_strokes()const { return show_persistent_strokes; }
+ void set_show_persistent_strokes(bool x);
//! Sets the size of the grid
void set_grid_size(const synfig::Vector &s);
const std::list<etl::handle<Stroke> >& stroke_list()const { return stroke_list_; }
- const std::list<etl::handle<Stroke> >& persistant_stroke_list()const { return persistant_stroke_list_; }
+ const std::list<etl::handle<Stroke> >& persistent_stroke_list()const { return persistent_stroke_list_; }
- std::list<etl::handle<Stroke> >& persistant_stroke_list() { return persistant_stroke_list_; }
+ std::list<etl::handle<Stroke> >& persistent_stroke_list() { return persistent_stroke_list_; }
//! \todo We should modify this to support multiple selections
etl::handle<Duck> get_selected_duck()const;
void add_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color=synfig::Color(0,0,0));
- void add_persistant_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color=synfig::Color(0,0,0));
+ void add_persistent_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color=synfig::Color(0,0,0));
- void clear_persistant_strokes();
+ void clear_persistent_strokes();
void add_duck(const etl::handle<Duck> &duck);
void
StateSketch_Context::clear_sketch()
{
- get_work_area()->clear_persistant_strokes();
+ get_work_area()->clear_persistent_strokes();
// if the sketch is currently shown, make sure it is updated
//! \todo is there a better way than this of getting Duckmatic to update its stroke_list_?
if (checkbutton_show_sketch.get_active())
{
- get_work_area()->set_show_persistant_strokes(false);
- get_work_area()->set_show_persistant_strokes(true);
+ get_work_area()->set_show_persistent_strokes(false);
+ get_work_area()->set_show_persistent_strokes(true);
get_canvas_view()->get_smach().process_event(EVENT_REFRESH);
}
}
void
StateSketch_Context::undo_stroke()
{
- if(!get_work_area()->persistant_stroke_list().empty())
+ if(!get_work_area()->persistent_stroke_list().empty())
{
- get_work_area()->persistant_stroke_list().pop_back();
+ get_work_area()->persistent_stroke_list().pop_back();
// if the sketch is currently shown, make sure it is updated
//! \todo is there a better way than this of getting Duckmatic to update its stroke_list_?
if (checkbutton_show_sketch.get_active())
{
- get_work_area()->set_show_persistant_strokes(false);
- get_work_area()->set_show_persistant_strokes(true);
+ get_work_area()->set_show_persistent_strokes(false);
+ get_work_area()->set_show_persistent_strokes(true);
get_canvas_view()->get_smach().process_event(EVENT_REFRESH);
}
}
void
StateSketch_Context::toggle_show_sketch()
{
- get_work_area()->set_show_persistant_strokes(checkbutton_show_sketch.get_active());
+ get_work_area()->set_show_persistent_strokes(checkbutton_show_sketch.get_active());
get_work_area()->queue_draw();
}
App::ui_manager()->add_ui_from_string(ui_info);
- checkbutton_show_sketch.set_active(get_work_area()->get_show_persistant_strokes());
+ checkbutton_show_sketch.set_active(get_work_area()->get_show_persistent_strokes());
button_clear_sketch.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::clear_sketch));
button_undo_stroke.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::undo_stroke));
assert(event.stroke_data);
- get_work_area()->add_persistant_stroke(event.stroke_data,synfigapp::Main::get_foreground_color());
+ get_work_area()->add_persistent_stroke(event.stroke_data,synfigapp::Main::get_foreground_color());
return Smach::RESULT_ACCEPT;
}