}
void
+Duckmatic::set_flip_x(bool flip_x)
+{
+ flip_x_ = flip_x;
+}
+
+void
+Duckmatic::set_flip_y(bool flip_y)
+{
+ flip_y_ = flip_y;
+}
+
+void
Duckmatic::clear_ducks()
{
duck_data_share_map.clear();
duck->set_radius(true);
duck->set_type(Duck::TYPE_RADIUS);
- duck->set_point(Point(value_desc.get_value(get_time()).get(Real()),0));
+ // put the duck on the right hand side of the center, whether the display is flipped or not
+ duck->set_point(Point(value_desc.get_value(get_time()).get(Real()) * (flip_x_ ? -1 : 1), 0));
duck->set_name(guid_string(value_desc));
if(value_desc.is_value_node())
{
mutable synfig::String sketch_filename_;
+ //! whether the display is flipped vertically or horizontally
+ bool flip_x_, flip_y_;
+
/*
-- ** -- P R O T E C T E D D A T A -----------------------------------------
*/
Duckmatic();
virtual ~Duckmatic();
+ void set_flip_x(bool flip_x);
+ void set_flip_y(bool flip_y);
+
sigc::signal<void>& signal_duck_selection_changed() { return signal_duck_selection_changed_; }
sigc::signal<void>& signal_strokes_changed() { return signal_strokes_changed_; }
sigc::signal<void>& signal_grid_changed() { return signal_grid_changed_; }
pw=canvaswidth/w;
ph=canvasheight/h;
+ Duckmatic::set_flip_x(pw < 0);
+ Duckmatic::set_flip_y(ph > 0);
+
scrollx_adjustment.set_page_increment(abs(get_grid_size()[0]));
scrollx_adjustment.set_step_increment(abs(pw));
scrollx_adjustment.set_lower(-abs(canvaswidth));