Prepare screenshot of all mixer-strips
This will allow to create a PNG of all mixer-strips, even those currently off-screen due to scrolling. It currently shows the main scroll-pane page only (master-bus, VCAs are not included). This method is not yet exposed.
This commit is contained in:
parent
90cf829f67
commit
9cd1fd9e4a
|
@ -30,6 +30,7 @@
|
|||
#include <glibmm/threads.h>
|
||||
|
||||
#include <gtkmm/accelmap.h>
|
||||
#include <gtkmm/offscreenwindow.h>
|
||||
#include <gtkmm/stock.h>
|
||||
|
||||
#include "pbd/convert.h"
|
||||
|
@ -3501,3 +3502,22 @@ Mixer_UI::vca_unassign (boost::shared_ptr<VCA> vca)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Mixer_UI::screenshot (std::string const& filename)
|
||||
{
|
||||
Gtk::OffscreenWindow osw;
|
||||
int height = strip_packer.get_height();
|
||||
strip_group_box.remove (strip_packer);
|
||||
osw.add (strip_packer);
|
||||
add_button.hide ();
|
||||
osw.set_size_request (-1, height);
|
||||
osw.show();
|
||||
osw.get_window()->process_updates (true);
|
||||
Glib::RefPtr<Gdk::Pixbuf> pb = osw.get_pixbuf ();
|
||||
pb->save (filename, "png");
|
||||
osw.remove ();
|
||||
pb.release ();
|
||||
add_button.show ();
|
||||
strip_group_box.pack_start (strip_packer);
|
||||
}
|
||||
|
|
|
@ -147,6 +147,8 @@ public:
|
|||
void showhide_mixbusses (bool on);
|
||||
#endif
|
||||
|
||||
void screenshot (std::string const&);
|
||||
|
||||
protected:
|
||||
void set_axis_targets_for_operation ();
|
||||
ARDOUR::AutomationControlSet selected_gaincontrols ();
|
||||
|
|
Loading…
Reference in New Issue