47#include <libavformat/avformat.h>
50extern GdkWindow *
xwin;
81G_MODULE_EXPORT
void run_render_image (GtkNativeDialog * info, gint response_id, gpointer data)
83 GtkFileChooser * chooser = GTK_FILE_CHOOSER((GtkFileChooserNative *)info);
94G_MODULE_EXPORT
void run_render_image (GtkDialog * info, gint response_id, gpointer data)
96 GtkFileChooser * chooser = GTK_FILE_CHOOSER((GtkWidget *)info);
98 if (response_id == GTK_RESPONSE_ACCEPT)
109 glwin * view = this_proj -> modelgl;
120 q = view -> anim -> last ->
img -> quality;
121 view -> anim -> last ->
img -> quality = iopts ->
oglquality;
123 for (i=0; i<2; i++)
tmp_pixels[i] = view -> pixels[i];
124 x = view -> pixels[0];
125 y = view -> pixels[1] - 100;
126 view -> pixels[0] = iopts ->
video_res[0];
127 view -> pixels[1] = iopts ->
video_res[1];
129 GError * error = NULL;
133 show_warning (
"An error occurred when exporting an image\nyou might want to try again\nsorry for the trouble", view -> win);
137 if (iopts ->
oglquality != 0) view -> anim -> last ->
img -> quality = q;
169 GtkFileChooserNative * info;
174 GTK_WINDOW(view -> win),
175 GTK_FILE_CHOOSER_ACTION_SAVE,
177 GtkFileChooser * chooser = GTK_FILE_CHOOSER(info);
179 gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
183 gtk_file_chooser_set_current_name (chooser, str);
185 filter = gtk_file_filter_new ();
187 gtk_file_filter_set_name (GTK_FILE_FILTER(
filter), str);
190 gtk_file_filter_add_pattern (GTK_FILE_FILTER(
filter), str);
192 gtk_file_chooser_add_filter (chooser,
filter);
194 run_this_gtk_native_dialog ((GtkNativeDialog *)info, G_CALLBACK(
run_render_image), iopts);
GtkFileFilter * filter[NCFORMATS+1]
gboolean in_movie_encoding
Global variable declarations Global convenience function declarations Global data structure defin...
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
void recreate_all_shaders(glwin *view)
re-initialize all OpenGL shaders
void file_chooser_set_current_folder(GtkFileChooser *chooser)
set current folder in a GtkFilechooser
gchar * file_chooser_get_file_name(GtkFileChooser *chooser)
get a file name from a GtkFileChooser (single file selected)
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
gchar * prepare_for_title(gchar *init)
prepare a string for a window title, getting rid of all markup
gboolean in_md_shaders(project *this_proj, int id)
is this shader MD dependent ?
GtkWidget * create_file_chooser(const gchar *title, GtkWindow *parent, GtkFileChooserAction act, const gchar *act_name)
create a GtkFileChooser, utility to select file(s)
void destroy_this_native_dialog(GtkNativeDialog *dialog)
destroy a GtkNativeDialog
project * get_project_by_id(int p)
get project pointer using id number
void update(glwin *view)
update the rendering of the OpenGL window
void init_opengl(glwin *view)
initialize OpenGL rendering parameters for a glwin pointer
void reshape(glwin *view, int width, int height)
reshape (resize) the OpenGL window
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
Function declarations for the creation of the OpenGL window.
void close_frame_buffer()
close the frame buffer
void init_frame_buffer(int x, int y)
init a frame buffer
G_MODULE_EXPORT void run_render_image(GtkDialog *info, gint response_id, gpointer data)
render an image from the OpenGL window - running the dialog
void render_image(glwin *view, video_options *iopts)
render an image from the OpenGL window - prepare the dialog
void fill_image(VideoStream *vs, int width, int height, glwin *view)
render an image from an OpenGL rendering
char * image_name[IMAGE_FORMATS]
char * image_list[IMAGE_FORMATS]
void show_warning(char *warning, GtkWidget *win)
show warning
Messaging function declarations.
Data structure declarations for movie encoding Function declarations for movie encoding.
Function declarations for reading atomes project file Function declarations for saving atomes proje...