gschem

x_image.c File Reference

#include <config.h>
#include <stdio.h>
#include <unistd.h>
#include <glib.h>
#include "gschem.h"
Include dependency graph for x_image.c:

Go to the source code of this file.

Defines

#define X_IMAGE_DEFAULT_SIZE   "800x600"
#define X_IMAGE_SIZE_MENU_NAME   "image_size_menu"
#define X_IMAGE_TYPE_MENU_NAME   "image_type_menu"
#define X_IMAGE_DEFAULT_TYPE   "PNG"

Functions

static void create_size_menu (GtkComboBox *combo)
 Create the options of the image size combobox.
static void create_type_menu (GtkComboBox *combo)
 Create the options of the image type combobox.
static char * x_image_get_type_from_description (char *description)
 Given a gdk-pixbuf image type description, it returns the type, or extension of the image.
static void x_image_update_dialog_filename (GtkComboBox *combo, GSCHEM_TOPLEVEL *w_current)
 Update the filename of a file dialog, when the image type has changed.
void x_image_write_eps (GSCHEM_TOPLEVEL *w_current, const char *filename)
 Write eps image file.
void x_image_lowlevel (GSCHEM_TOPLEVEL *w_current, const char *filename, int desired_width, int desired_height, char *filetype)
 Write the image file, with the desired options.
void x_image_setup (GSCHEM_TOPLEVEL *w_current)
 Display the image file selection dialog.
static void x_image_convert_to_greyscale (GdkPixbuf *pixbuf)
GdkPixbuf * x_image_get_pixbuf (GSCHEM_TOPLEVEL *w_current)

Variables

static char * x_image_sizes []

Define Documentation

#define X_IMAGE_DEFAULT_SIZE   "800x600"

Definition at line 39 of file x_image.c.

#define X_IMAGE_SIZE_MENU_NAME   "image_size_menu"

Definition at line 41 of file x_image.c.

#define X_IMAGE_TYPE_MENU_NAME   "image_type_menu"

Definition at line 42 of file x_image.c.

#define X_IMAGE_DEFAULT_TYPE   "PNG"

Definition at line 44 of file x_image.c.


Function Documentation

static void create_size_menu ( GtkComboBox *  combo) [static]
This function adds the options of the image size to the given combobox.
Parameters:
combo[in] the combobox to add the options to.
Returns:
nothing
Note:
This function is only used in this file, there are other create_menus...

Definition at line 84 of file x_image.c.

static void create_type_menu ( GtkComboBox *  combo) [static]
This function adds the options of the image type to the given combobox.
Parameters:
combo[in] the combobox to add the options to.
Returns:
nothing
Note:
This function is only used in this file, there are other create_menus...

Definition at line 117 of file x_image.c.

static char* x_image_get_type_from_description ( char *  description) [static]
Return the gdk-pixbuf image type, or extension, which has the
given gdk-pixbuf description.
Parameters:
descriptionThe gdk-pixbuf image type description.
Returns:
The gdk-pixbuf type, or extension, of the image.
Note:
This function is only used in this file.

Definition at line 169 of file x_image.c.

static void x_image_update_dialog_filename ( GtkComboBox *  combo,
GSCHEM_TOPLEVEL w_current 
) [static]
Given a combobox inside a file chooser dialog, this function updates
the filename displayed by the dialog, removing the current extension, and adding the extension of the image type selected.
Parameters:
combo[in] A combobox inside a file chooser dialog, with gdk-pixbuf image type descriptions.
w_current[in] the GSCHEM_TOPLEVEL structure.
Returns:
nothing.

Definition at line 203 of file x_image.c.

Here is the call graph for this function:

void x_image_write_eps ( GSCHEM_TOPLEVEL w_current,
const char *  filename 
)
This function writes the eps file, using the postscript print code
from libgeda. Orientation is portrait and type is extents without margins.
Parameters:
w_current[in] the GSCHEM_TOPLEVEL structure.
filename[in] the image filename.
Returns:
nothing

Definition at line 280 of file x_image.c.

void x_image_lowlevel ( GSCHEM_TOPLEVEL w_current,
const char *  filename,
int  desired_width,
int  desired_height,
char *  filetype 
)
This function writes the image file, with the options set in the
dialog by the user.
Parameters:
w_current[in] the GSCHEM_TOPLEVEL structure.
filename[in] the image filename.
desired_width[in] the image width chosen by the user.
desired_height[in] the image height chosen by the user.
filetype[in] image filetype.
Returns:
nothing

Definition at line 317 of file x_image.c.

Here is the call graph for this function:

void x_image_setup ( GSCHEM_TOPLEVEL w_current)
Display the image file selection dialog, allowing the user to
set several options, like image size and image type. When the user hits "ok", then it writes the image file.
Parameters:
w_current[in] the GSCHEM_TOPLEVEL structure.
Returns:
nothing

Definition at line 438 of file x_image.c.

Here is the call graph for this function:

static void x_image_convert_to_greyscale ( GdkPixbuf *  pixbuf) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 577 of file x_image.c.

GdkPixbuf* x_image_get_pixbuf ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 625 of file x_image.c.

Here is the call graph for this function:


Variable Documentation

char* x_image_sizes[] [static]
Initial value:
 {"320x240", "640x480", "800x600", "1200x768",
  "1280x960", "1600x1200", "3200x2400", NULL}

Definition at line 46 of file x_image.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines