+
+void
+Push2::splash ()
+{
+ std::string splash_file;
+
+ Searchpath rc (ARDOUR::ardour_data_search_path());
+ rc.add_subdirectory_to_paths ("resources");
+
+ if (!find_file (rc, PROGRAM_NAME "-splash.png", splash_file)) {
+ cerr << "Cannot find splash screen image file\n";
+ throw failed_constructor();
+ }
+
+ Cairo::RefPtr<Cairo::ImageSurface> img = Cairo::ImageSurface::create_from_png (splash_file);
+
+ double x_ratio = (double) img->get_width() / (cols - 20);
+ double y_ratio = (double) img->get_height() / (rows - 20);
+ double scale = min (x_ratio, y_ratio);
+
+ /* background */
+
+ context->set_source_rgb (0.764, 0.882, 0.882);
+ context->paint ();
+
+ /* image */
+
+ context->save ();
+ context->translate (5, 5);
+ context->scale (scale, scale);
+ context->set_source (img, 0, 0);
+ context->paint ();
+ context->restore ();
+
+ /* text */
+
+ Glib::RefPtr<Pango::Layout> some_text = Pango::Layout::create (context);
+
+ Pango::FontDescription fd ("Sans 38");
+ some_text->set_font_description (fd);
+ some_text->set_text (string_compose ("%1 %2", PROGRAM_NAME, VERSIONSTRING));
+
+ context->move_to (200, 10);
+ context->set_source_rgb (0, 0, 0);
+ some_text->update_from_cairo_context (context);
+ some_text->show_in_cairo_context (context);
+
+ Pango::FontDescription fd2 ("Sans Italic 18");
+ some_text->set_font_description (fd2);
+ some_text->set_text (_("Ableton Push 2 Support"));
+
+ context->move_to (200, 80);
+ context->set_source_rgb (0, 0, 0);
+ some_text->update_from_cairo_context (context);
+ some_text->show_in_cairo_context (context);
+
+ splash_start = get_microseconds ();
+ blit_to_device_frame_buffer ();
+}