49#include <libavformat/avformat.h>
52extern GdkWindow *
xwin;
101G_MODULE_EXPORT
void run_render_image (GtkNativeDialog * info, gint response_id, gpointer data)
103 GtkFileChooser * chooser = GTK_FILE_CHOOSER((GtkFileChooserNative *)info);
116 GtkFileChooser * chooser = GTK_FILE_CHOOSER((GtkWidget *)info);
118 if (response_id == GTK_RESPONSE_ACCEPT)
136 glwin * view = this_proj -> modelgl;
141 gtk_gl_area_make_current ((GtkGLArea *)view ->
plot);
153 q = view -> anim -> last ->
img -> quality;
154 view -> anim -> last ->
img -> quality = iopts ->
oglquality;
156 for (i=0; i<2; i++)
tmp_pixels[i] = view -> pixels[i];
157 x = view -> pixels[0];
158 y = view -> pixels[1] - 100;
159 view -> pixels[0] = iopts ->
video_res[0];
160 view -> pixels[1] = iopts ->
video_res[1];
162 GError * error = NULL;
166 show_warning (_(
"An error occurred when exporting an image\nyou might want to try again\nsorry for the trouble"), view -> win);
172 if (iopts ->
oglquality != 0) view -> anim -> last ->
img -> quality = q;
205 GtkFileChooserNative * info;
210 GTK_WINDOW(view -> win),
211 GTK_FILE_CHOOSER_ACTION_SAVE,
213 GtkFileChooser * chooser = GTK_FILE_CHOOSER(info);
215 gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
219 gtk_file_chooser_set_current_name (chooser, str);
221 filter = gtk_file_filter_new ();
223 gtk_file_filter_set_name (GTK_FILE_FILTER(
filter), str);
226 gtk_file_filter_add_pattern (GTK_FILE_FILTER(
filter), str);
228 gtk_file_chooser_add_filter (chooser,
filter);
230 run_this_gtk_native_dialog ((GtkNativeDialog *)info, G_CALLBACK(
run_render_image), iopts);
247 int h, i, j, k, l, m;
263 l = (h) ? 12 + h : 7;
GtkFileFilter * filter[NCFORMATS+1]
integer(kind=c_int) function chemistry()
void to_close_this_project(int to_activate, project *this_proj)
to close this project
int * duplicate_int(int num, int *old_val)
copy a list of int
gboolean in_movie_encoding
gboolean atomes_render_image
gboolean atomes_from_libreoffice
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
coord_info * active_coord
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 reshape(glwin *view, int width, int height, gboolean use_ratio)
reshape (resize) the OpenGL window
void init_opengl()
initialize OpenGL rendering parameters
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
Function declarations for the creation of the OpenGL window.
ColRGBA * render_image_grad_color[2]
ColRGBA * render_image_box_color
void close_frame_buffer()
close the frame buffer
ColRGBA * render_image_back_color
void init_frame_buffer(int x, int y)
init a frame buffer
void simple_image_render()
simple direct rendering from command line
G_MODULE_EXPORT void run_render_image(GtkDialog *info, gint response_id, gpointer data)
render an image from the OpenGL window - running the dialog
int * render_image_pixels
void render_image(glwin *view, video_options *iopts)
render an image from the OpenGL window - prepare the dialog
int render_image_back_grad
gboolean trigger_fragment_analysis
float render_image_back_pos
int render_image_back_dir
void fill_image(VideoStream *vs, int width, int height, glwin *view)
render an image from an OpenGL rendering
gchar * render_image_output
char * image_name[IMAGE_FORMATS]
char * image_list[IMAGE_FORMATS]
gboolean trigger_molecule_analysis
void show_warning(char *warning, GtkWidget *win)
show warning
Messaging function declarations.
Data structure declarations for movie encoding Function declarations for movie encoding.
float get_radius(int object, int col, int z, element_radius *rad_list)
retrieve the radius/width of a species depending on style
gboolean * default_o_at_rs
element_radius * default_atomic_rad[16]
Preference variable declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...