[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.0-20070526-60-g1c76ee9)
The branch, master has been updated
via 1c76ee9d84ea4fcdc924d992ecc3a828887eff4f (commit)
via 3fa80f60f62e37fd2297c56b1a99bf5a29d5e912 (commit)
via 868d31c36736b1ceebdd9a7cea6d12d12ecf89a9 (commit)
from cb63bf6506caf145d44f454734a1f4d712fa9216 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=================
Commit Messages
=================
commit 1c76ee9d84ea4fcdc924d992ecc3a828887eff4f
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 24 22:17:03 2007 -0400
Removed all trace of libgd usage and removed some old ps printing routines.
All trace of libgd and HAS_LIBGD has been removed. Some obsoleted and
:100644 100644 02be7e3... e38b844... M gschem/src/x_image.c
:100644 100644 89a8107... 498edc6... M libgeda/configure.ac
:100644 100644 6f32617... fead3b4... M libgeda/include/funcs.h
:100644 100644 1409621... a84510d... M libgeda/include/globals.h
:100644 100644 de198fd... d091429... M libgeda/include/prototype.h
:100644 100644 014e827... 92b6f3a... M libgeda/libgeda.pc.in
:100644 100644 ed03681... 8d7495b... M libgeda/src/Makefile.am
:100644 000000 b234598... 0000000... D libgeda/src/f_image.c
:100644 100644 d3019f1... 8a682b5... M libgeda/src/o_arc_basic.c
:100644 100644 319129e... 9080f47... M libgeda/src/o_box_basic.c
:100644 100644 d449030... e2cbb2e... M libgeda/src/o_bus_basic.c
:100644 100644 458a1a5... b146f20... M libgeda/src/o_circle_basic.c
:100644 100644 24608f2... 2ded634... M libgeda/src/o_embed.c
:100644 000000 870bd2b... 0000000... D libgeda/src/o_image.c
:100644 100644 47dac48... 610d219... M libgeda/src/o_line_basic.c
:100644 100644 b7a19a5... ab27bab... M libgeda/src/o_net_basic.c
:100644 100644 a8e681b... d900de7... M libgeda/src/o_pin_basic.c
:100644 100644 ae68c24... e2ff11a... M libgeda/src/s_color.c
:100644 100644 795622f... 54f2008... M libgeda/src/s_cue.c
commit 3fa80f60f62e37fd2297c56b1a99bf5a29d5e912
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 24 21:41:30 2007 -0400
Removed indent from gattrib's configure script.
indent is no longer used (hold back from the noweb days).
:100644 100644 5a8c381... 6d373c2... M gattrib/configure.ac
commit 868d31c36736b1ceebdd9a7cea6d12d12ecf89a9
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 24 15:46:46 2007 -0400
Removed libgd and indent tests from configure scripts.
indent is no longer use since noweb was removed a long time ago.
libgd is no longer used since libgeda/gschem uses mage export support in gdk.
:100644 100644 381d4fa... 8cb5fc4... M gschem/configure.ac.in
:100644 100644 4ce879f... 89a8107... M libgeda/configure.ac
=========
Changes
=========
commit 1c76ee9d84ea4fcdc924d992ecc3a828887eff4f
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 24 22:17:03 2007 -0400
Removed all trace of libgd usage and removed some old ps printing routines.
All trace of libgd and HAS_LIBGD has been removed. Some obsoleted and
diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index 02be7e3..e38b844 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -41,12 +41,10 @@
#define X_IMAGE_DEFAULT_SIZE "800x600"
-#ifndef HAS_LIBGD
#define X_IMAGE_SIZE_MENU_NAME "image_size_menu"
#define X_IMAGE_TYPE_MENU_NAME "image_type_menu"
#define X_IMAGE_DEFAULT_TYPE "PNG"
-#endif
static char *x_image_sizes[] = {"320x240", "640x480", "800x600", "1200x768",
"1280x960", "1600x1200", "3200x2400", NULL};
@@ -121,7 +119,6 @@ static void create_size_menu (GtkComboBox *combo)
*/
static void create_type_menu(GtkComboBox *combo)
{
-#ifndef HAS_LIBGD
GSList *formats = gdk_pixbuf_get_formats ();
GSList *ptr;
char *buf;
@@ -161,12 +158,6 @@ static void create_type_menu(GtkComboBox *combo)
/* Set the default menu */
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), default_index);
-#else
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "PNG");
-
- /* Set the default menu */
- gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
-#endif
return;
}
@@ -179,7 +170,6 @@ static void create_type_menu(GtkComboBox *combo)
* \note This function is only used in this file.
*/
static char *x_image_get_type_from_description(char *description) {
-#ifndef HAS_LIBGD
gchar *descr = g_strdup_printf(description);
GSList *formats = gdk_pixbuf_get_formats ();
GSList *ptr;
@@ -202,11 +192,6 @@ static char *x_image_get_type_from_description(char *description) {
}
g_free (descr);
return NULL;
-#else
- /* When using libgd, there is only one supported type: PNG */
- return(g_strdup("png"));
-#endif
-
}
/*! \brief Update the filename of a file dialog, when the image type has changed.
@@ -282,9 +267,6 @@ static void x_image_update_dialog_filename(GtkComboBox *combo,
g_free(file_name);
g_free(file_basename);
g_free(new_image_filename);
-#ifdef HAS_LIBGD
- g_free(image_type);
-#endif
}
/*! \brief Write eps image file.
@@ -340,11 +322,9 @@ void x_image_lowlevel(TOPLEVEL *w_current, const char* filename,
int save_height, save_width;
int save_page_left, save_page_right, save_page_top, save_page_bottom;
int page_width, page_height, page_center_left, page_center_top;
-#ifndef HAS_LIBGD
GdkPixbuf *pixbuf;
GError *gerror = NULL;
GtkWidget *dialog;
-#endif
float prop;
w_current->image_width = width = desired_width;
@@ -387,14 +367,6 @@ void x_image_lowlevel(TOPLEVEL *w_current, const char* filename,
o_selection_unselect_list(w_current,
&(w_current->page_current->selection_list));
-
-#ifdef HAS_LIBGD
- /* try to use recalc here */
- o_redraw_all(w_current);
-
- f_image_write(w_current, filename, width, height,
- w_current->image_color);
-#else
if (strcmp(filetype, "eps") == 0) /*WK - catch EPS export case*/
x_image_write_eps(w_current, filename);
else {
@@ -448,7 +420,6 @@ void x_image_lowlevel(TOPLEVEL *w_current, const char* filename,
s_log_message(_("x_image_lowlevel: Unable to get pixbuf from gschem's window.\n"));
}
}
-#endif
w_current->width = save_width;
w_current->height = save_height;
@@ -463,13 +434,6 @@ void x_image_lowlevel(TOPLEVEL *w_current, const char* filename,
/* try to use recalc here... */
o_redraw_all(w_current);
-#ifdef HAS_LIBGD
- if (w_current->image_color == TRUE) {
- s_log_message(_("Wrote color image to [%s] [%d x %d]\n"), filename, width, height);
- } else {
- s_log_message(_("Wrote black and white image to [%s] [%d x %d]\n"), filename, width, height);
- }
-#endif
}
/*! \brief Display the image file selection dialog.
@@ -489,9 +453,7 @@ void x_image_setup (TOPLEVEL *w_current)
GtkWidget *vbox2;
GtkWidget *label2;
GtkWidget *type_combo;
-#ifndef HAS_LIBGD
char *image_type_descr;
-#endif
char *filename;
char *image_size;
char *image_type;
@@ -592,7 +554,6 @@ void x_image_setup (TOPLEVEL *w_current)
image_size = gtk_combo_box_get_active_text(GTK_COMBO_BOX(size_combo));
#endif
-#ifndef HAS_LIBGD
#if ((GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION < 6))
GSList *ptr;
/* If GTK < 2.6, get the description from the descriptions list */
@@ -604,10 +565,6 @@ void x_image_setup (TOPLEVEL *w_current)
#endif
image_type = x_image_get_type_from_description(image_type_descr);
-#else
- /* Image type not used when using libgd */
- image_type = NULL;
-#endif
sscanf(image_size, "%ix%i", &width, &height);
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
diff --git a/libgeda/configure.ac b/libgeda/configure.ac
index 89a8107..498edc6 100644
--- a/libgeda/configure.ac
+++ b/libgeda/configure.ac
@@ -396,8 +396,8 @@ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Currently running version of gEDA/gaf])
# Finally create the final CFLAGS and LDFLAGS for use in the makefiles
-LIBGEDA_CFLAGS="$MINGW_CFLAGS $GUILE_CFLAGS $GD_CFLAGS $GTK_CFLAGS $X_CFLAGS $GDK_PIXBUF_CFLAGS $GDK_CFLAGS"
-LIBGEDA_LDFLAGS="$GUILE_LDFLAGS $GD_LIBS $GLIB_LIBS $MINGW_LIBS $DMALLOC_LIBS $GDK_PIXBUF_LIBS $GDK_LIBS"
+LIBGEDA_CFLAGS="$MINGW_CFLAGS $GUILE_CFLAGS $GTK_CFLAGS $X_CFLAGS $GDK_PIXBUF_CFLAGS $GDK_CFLAGS"
+LIBGEDA_LDFLAGS="$GUILE_LDFLAGS $GLIB_LIBS $MINGW_LIBS $DMALLOC_LIBS $GDK_PIXBUF_LIBS $GDK_LIBS"
LIBTOOL_FLAGS="-version-info $SHARED_LIBRARY_VERSION"
# Makefile.in variable substitution
@@ -411,7 +411,6 @@ AC_SUBST(PATHSEP)
AC_SUBST(OTHERPATHSEP)
AC_SUBST(GUILEINTERP)
AC_SUBST(INDENT)
-AC_SUBST(LIBGEDA_HASGD)
# Create all the necessary derived files
AC_CONFIG_FILES([Makefile
diff --git a/libgeda/include/funcs.h b/libgeda/include/funcs.h
index 6f32617..fead3b4 100644
--- a/libgeda/include/funcs.h
+++ b/libgeda/include/funcs.h
@@ -15,7 +15,6 @@ extern void (*x_log_update_func)();
extern void (*variable_set_func)();
extern char * (*ps_color_string)();
extern int (*image_color_int)();
-extern int (*image_gdcolor_init)();
/* load_newer_backup_func is called if an autosave backup file is found
when loading a new schematic. It should ask the user what to do, and
return TRUE if the backup file should be loaded, or FALSE otherwise */
diff --git a/libgeda/include/globals.h b/libgeda/include/globals.h
index 1409621..a84510d 100644
--- a/libgeda/include/globals.h
+++ b/libgeda/include/globals.h
@@ -56,13 +56,6 @@ extern int logging_dest;
extern int image_black;
extern int image_white;
-#ifdef HAS_LIBGD
-/* I hate to include an include inside an include (ha!) however, I don't */
-/* see an easy way to get this to build right */
-#include <gd.h>
-extern gdImagePtr current_im_ptr;
-#endif
-
/* Size of a tab in characters */
extern int tab_in_chars;
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index de198fd..d091429 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -15,11 +15,6 @@ char* f_get_directory_from_path(char *path);
char* f_normalize_filename(const gchar *filename);
char *follow_symlinks (const gchar *filename, GError **error);
-/* f_image.c */
-void f_image_write_objects(TOPLEVEL *w_current, OBJECT *head, int start_x, int start_y, float scale, int color_mode);
-void f_image_write(TOPLEVEL *w_current, const char *filename, int width, int height, int color_mode);
-void f_image_set_type(TOPLEVEL *w_current, int type);
-
/* f_print.c */
void f_print_set_line_width(FILE *fp, int width);
void f_print_set_color(FILE *fp, int color);
@@ -144,7 +139,6 @@ void o_arc_print_dotted(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius,
void o_arc_print_dashed(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
void o_arc_print_center(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
void o_arc_print_phantom(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
-void o_arc_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
/* o_attrib.c */
void o_attrib_update_urefBM(TOPLEVEL *w_current, OBJECT *o_current);
@@ -232,7 +226,6 @@ void o_box_print_phantom(TOPLEVEL *w_current, FILE *fp, int x, int y, int width,
void o_box_print_filled(TOPLEVEL *w_current, FILE *fp, int x, int y, int width, int height, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
void o_box_print_mesh(TOPLEVEL *w_current, FILE *fp, int x, int y, int width, int height, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
void o_box_print_hatch(TOPLEVEL *w_current, FILE *fp, int x, int y, int width, int height, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
-void o_box_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
/* o_bus_basic.c */
void world_get_bus_bounds(TOPLEVEL *w_current, OBJECT *object, int *left, int *top, int *right, int *bottom);
@@ -243,7 +236,6 @@ char *o_bus_save(OBJECT *object);
void o_bus_translate_world(TOPLEVEL *w_current, int x1, int y1, OBJECT *object);
OBJECT *o_bus_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current);
void o_bus_print(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
-void o_bus_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
void o_bus_rotate_world(TOPLEVEL *w_current, int world_centerx, int world_centery, int angle, OBJECT *object);
void o_bus_mirror_world(TOPLEVEL *w_current, int world_centerx, int world_centery, OBJECT *object);
int o_bus_orientation(OBJECT *object);
@@ -273,7 +265,6 @@ void o_circle_print_phantom(TOPLEVEL *w_current, FILE *fp, int x, int y, int rad
void o_circle_print_filled(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
void o_circle_print_mesh(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
void o_circle_print_hatch(TOPLEVEL *w_current, FILE *fp, int x, int y, int radius, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
-void o_circle_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
/* o_complex_basic.c */
int world_get_single_object_bounds(TOPLEVEL *w_current, OBJECT *o_current,
@@ -321,13 +312,6 @@ void o_complex_check_symversion(TOPLEVEL* w_current, OBJECT* object);
void o_embed(TOPLEVEL *w_current, OBJECT *o_current);
void o_unembed(TOPLEVEL *w_current, OBJECT *o_current);
-/* o_image.c */
-void o_image_init(void);
-void o_image_create(int x, int y, int color_mode);
-void o_image_close(void);
-int o_image_write(const char *filename);
-int o_image_geda2gd_color(int color);
-
/* o_line_basic.c */
OBJECT *o_line_add(TOPLEVEL *w_current, OBJECT *object_list, char type, int color, int x1, int y1, int x2, int y2);
OBJECT *o_line_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current);
@@ -345,7 +329,6 @@ void o_line_print_dotted(TOPLEVEL *w_current, FILE *fp, int x1, int y1, int x2,
void o_line_print_dashed(TOPLEVEL *w_current, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
void o_line_print_center(TOPLEVEL *w_current, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
void o_line_print_phantom(TOPLEVEL *w_current, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
-void o_line_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
void o_line_scale_world(TOPLEVEL *w_current, int x_scale, int y_scale, OBJECT *object);
int o_line_visible(TOPLEVEL *w_current, LINE *line, int *x1, int *y1, int *x2, int *y2);
double o_line_length(OBJECT *object);
@@ -367,7 +350,6 @@ char *o_net_save(OBJECT *object);
void o_net_translate_world(TOPLEVEL *w_current, int x1, int y1, OBJECT *object);
OBJECT *o_net_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current);
void o_net_print(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
-void o_net_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
void o_net_rotate_world(TOPLEVEL *w_current, int world_centerx, int world_centery, int angle, OBJECT *object);
void o_net_mirror_world(TOPLEVEL *w_current, int world_centerx, int world_centery, OBJECT *object);
int o_net_orientation(OBJECT *object);
@@ -411,7 +393,6 @@ char *o_pin_save(OBJECT *object);
void o_pin_translate_world(TOPLEVEL *w_current, int x1, int y1, OBJECT *object);
OBJECT *o_pin_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current);
void o_pin_print(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
-void o_pin_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
void o_pin_rotate_world(TOPLEVEL *w_current, int world_centerx, int world_centery, int angle, OBJECT *object);
void o_pin_mirror_world(TOPLEVEL *w_current, int world_centerx, int world_centery, OBJECT *object);
void o_pin_modify(TOPLEVEL *w_current, OBJECT *object, int x, int y, int whichone);
@@ -519,7 +500,6 @@ int s_color_request(int color_index, char *color_name, char *outline_color_name,
void s_color_destroy_all(void);
char *s_color_ps_string(int color);
int s_color_image_int(int color);
-void s_color_gdcolor_init(void);
int s_color_get_name(int index, char *string);
int s_color_get_index(char *string);
@@ -540,8 +520,6 @@ GList *s_conn_return_complex_others(GList *input_list, OBJECT *object);
/* s_cue.c */
void s_cue_postscript_fillbox(TOPLEVEL *w_current, FILE *fp, int x, int y);
void s_cue_postscript_fillcircle(TOPLEVEL *w_current, FILE *fp, int x, int y, int size_flag);
-void s_cue_image_fillbox(TOPLEVEL *w_current, OBJECT *object, int world_x, int world_y);
-void s_cue_image_fillcircle(TOPLEVEL *w_current, int world_x, int world_y, int size_flag);
void s_cue_output_all(TOPLEVEL *w_current, OBJECT *head, FILE *fp, int type);
void s_cue_output_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone, FILE *fp, int output_type);
void s_cue_output_lowlevel_midpoints(TOPLEVEL *w_current, OBJECT *object, FILE *fp, int output_type);
diff --git a/libgeda/libgeda.pc.in b/libgeda/libgeda.pc.in
index 014e827..92b6f3a 100644
--- a/libgeda/libgeda.pc.in
+++ b/libgeda/libgeda.pc.in
@@ -3,8 +3,6 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-LIBGEDA_HASGD=@LIBGEDA_HASGD@
-
Name: libgeda
Description: gEDA/gaf's core library
Requires:
diff --git a/libgeda/src/Makefile.am b/libgeda/src/Makefile.am
index ed03681..8d7495b 100644
--- a/libgeda/src/Makefile.am
+++ b/libgeda/src/Makefile.am
@@ -13,11 +13,11 @@ endif
lib_LTLIBRARIES = libgeda.la
libgeda_la_SOURCES = \
- a_basic.c f_basic.c f_print.c f_image.c g_basic.c m_basic.c \
+ a_basic.c f_basic.c f_print.c g_basic.c m_basic.c \
o_arc_basic.c o_attrib.c o_basic.c o_box_basic.c \
o_circle_basic.c o_complex_basic.c o_line_basic.c o_list.c \
o_net_basic.c o_selection.c o_bus_basic.c o_text_basic.c \
- o_pin_basic.c o_image.c o_embed.c \
+ o_pin_basic.c o_embed.c \
u_basic.c s_attrib.c s_basic.c \
s_clib.c s_encoding.c s_hierarchy.c s_papersizes.c s_stretch.c \
s_log.c s_textbuffer.c \
diff --git a/libgeda/src/f_image.c b/libgeda/src/f_image.c
deleted file mode 100644
index b234598..0000000
--- a/libgeda/src/f_image.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* gEDA - GPL Electronic Design Automation
- * libgeda - gEDA's library
- * Copyright (C) 1998-2000 Ales V. Hvezda
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
- */
-#include <config.h>
-
-#include <stdio.h>
-#include <math.h>
-
-#include <gtk/gtk.h>
-#include <libguile.h>
-
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
-#include "defines.h"
-#include "struct.h"
-#include "globals.h"
-#include "o_types.h"
-#include "colors.h"
-
-#include "../include/prototype.h"
-
-#ifdef HAVE_LIBDMALLOC
-#include <dmalloc.h>
-#endif
-
-#ifdef HAS_LIBGD
-/*! \todo Finish function description!!!
- * \brief
- * \par Function Description
- *
- * \param [in,out] w_current The TOPLEVEL object to write to.
- * \param [in,out] head The object to read image from.
- * \param [in] start_x X Offset to start from.
- * \param [in] start_y Y Offset to start from.
- * \param [in] color_mode
- *
- * \todo what happens if snap is off? hack deal with this !!!!!!!!
- */
-void f_image_write_objects(TOPLEVEL *w_current, OBJECT *head,
- int start_x, int start_y,
- float scale, int color_mode)
-{
- OBJECT *o_current=NULL;
- int origin_x, origin_y;
-
- if (head == NULL) {
- return;
- }
-
- origin_x = 0;
- origin_y = 0;
-
- o_current = head;
-
-
- while ( o_current != NULL ) {
-
- if (o_current->type != OBJ_HEAD) {
- switch (o_current->type) {
- case(OBJ_LINE):
- o_line_image_write(w_current, o_current,
- origin_x, origin_y, color_mode);
- break;
-
- case(OBJ_PIN):
- o_pin_image_write(w_current, o_current,
- origin_x, origin_y, color_mode);
- break;
-
- case(OBJ_COMPLEX):
- case(OBJ_PLACEHOLDER):
-
- f_image_write_objects(w_current,
- o_current->complex->prim_objs,
- origin_x, origin_y, scale, color_mode);
- break;
-
- case(OBJ_TEXT):
- if (o_current->visibility == VISIBLE) {
-
- /*if (w_current->text_output == VECTOR_FONTS) { */
- f_image_write_objects(w_current,
- o_current->text->
- prim_objs,
- origin_x, origin_y, scale, color_mode);
- /*} else {*/
-#if 0
- o_text_image_write(w_current, fp,
- o_current,
- origin_x, origin_y);
-
- /*}*/
-#endif
-
- }
- break;
-
- case(OBJ_NET):
- o_net_image_write(w_current, o_current,
- origin_x, origin_y, color_mode);
-
- break;
-
- case(OBJ_BUS):
- o_bus_image_write(w_current, o_current,
- origin_x, origin_y, color_mode);
- break;
-
- case(OBJ_CIRCLE):
- o_circle_image_write(w_current,
- o_current,
- origin_x, origin_y, color_mode);
- break;
-
- case(OBJ_ARC):
- o_arc_image_write(w_current, o_current,
- origin_x, origin_y, color_mode);
- break;
-
- case(OBJ_BOX):
- o_box_image_write(w_current, o_current,
- origin_x, origin_y, color_mode);
- break;
-
- case(OBJ_PICTURE):
- /*! \todo FIXME: Implement this */
- fprintf(stderr, "f_image_write_objects: o_picture_image_write not implemented yet\n");
- /* out = NULL; */
- /* out = (char *) o_picture_image_write(w_current, o_current,
- origin_x, origin_y, color_mode); */
- break;
-
- default:
- fprintf(stderr, "Error type!\n");
- exit(-1);
- break;
- }
-
- }
- o_current = o_current->next;
- }
-
- s_cue_output_all(w_current, head, NULL, PNG);
-
- return;
-}
-#endif
-
-/*! \todo Finish function description!!!
- * \brief Write image to file from w_current
- * \par Function Description
- *
- * \param [in,out] w_current The TOPLEVEL object to read image from.
- * \param [in] filename The name of the file to write image to.
- * \param [in] width The width of the image to write
- * \param [in] height The height of the image to write
- * \param [in] color_mode
- */
-void f_image_write(TOPLEVEL *w_current, const char *filename,
- int width, int height,
- int color_mode)
-{
-
-#ifdef HAS_LIBGD
- int origin_x, origin_y, bottom, right;
- float scale=0.0;
-
- /* dots are breaking my filename selection hack hack !!!! */
-
-
- /* printf("%d %d\n", w_current->paper_width, w_current->paper_height);*/
-
- world_get_object_list_bounds(w_current,
- w_current->page_current->object_head,
- &origin_x, &origin_y,
- &right, &bottom);
-
- o_image_create(width, height, color_mode);
-
- f_image_write_objects(w_current,
- w_current->page_current->object_head,
- w_current->page_current->left,
- w_current->page_current->top, scale, color_mode);
-
- o_image_write(filename);
- o_image_close();
-#else
- fprintf(stderr, "f_image_write: Called this function without libgd support.\n");
- s_log_message("f_image_write: Called this function without libgd support.\n");
-#endif
-
-}
-
-/*! \brief Sets the image output type
- * \par Function Description
- * This function will set the image output type in the TOPLEVEL object.
- *
- * \param [in,out] w_current The TOPLEVEL object to set image type in.
- * \param [in] type The image type to set
- */
-void f_image_set_type(TOPLEVEL *w_current, int type)
-{
- w_current->image_output_type = type;
-}
diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index d3019f1..8a682b5 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -24,10 +24,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
#include "defines.h"
#include "struct.h"
#include "globals.h"
@@ -1281,151 +1277,3 @@ void o_arc_print_phantom(TOPLEVEL *w_current, FILE *fp,
x,y, radius, arc_width);
}
-
-#if 0 /* original way of printing arcs, no longer used */
-
-/*! \deprecated
- * \brief Print solid arc in a Postscript file.
- * \par Function Description
- * This function prints a solid arc in a Postscript file indepedentely of its line type.
- * It is basically the old way to manage the arc printing.
- * This function is now replaced by the #o_arc_print() function.
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] fp FILE pointer to postscript document.
- * \param [in] o_current
- * \param [in] origin_x
- * \param [in] origin_y
- */
-void o_arc_print_old(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current,
- int origin_x, int origin_y)
-{
- int radius;
- int start_angle, end_angle;
- int awidth, aheight;
- int x, y;
-
- if (o_current == NULL) {
- printf("got null in o_arc_print\n");
- return;
- }
-
- fprintf(fp, "gsave\n");
- if (w_current->print_color) {
- f_print_set_color(fp, o_current->color);
- }
-
- f_print_set_line_width(fp, o_current->line_width);
-
- awidth = o_current->arc->width;
- aheight = o_current->arc->height;
-
- radius = abs(aheight - o_current->arc->y)/2;
-
- /* hack hack hack */
- /* the snap_grid here is a safety for arcs inside complex objects */
- /* which are not snapped to the grid */
- /* ALL arcs centers will be snapped to the center */
- /* hack hack hack */
- /* Geee I wish there was a better solution */
- /* well for now, if you print the complex structure that's in memory */
- /* then the arc will be properly snapped */
- /*x = snap_grid(w_current, o_current->x+radius);
- y = snap_grid(w_current, o_current->y-radius);*/
-
- x = (o_current->arc->x+radius);
- y = (o_current->arc->y-radius);
-
- start_angle = o_current->arc->start_angle/64;
- end_angle = o_current->arc->end_angle/64;
-
- if ( end_angle < 0) {
-
- if (end_angle >= 180) {
- start_angle = (start_angle - (end_angle)) % 360;
- } else {
- start_angle = (start_angle + (end_angle)) % 360;
- }
-
- end_angle = abs(end_angle);
-
- }
-
- end_angle = start_angle + end_angle;
-
-
- fprintf(fp, "newpath\n");
- fprintf(fp, "%d %d\n", x-origin_x, y-origin_y);
- fprintf(fp, "%d\n", radius);
- fprintf(fp, "%d %d arc\n", start_angle, end_angle);
- fprintf(fp, "stroke\n");
- fprintf(fp, "grestore\n");
-}
-#endif
-
-/*! \brief Draw an arc in an image.
- * \par Function Description
- * This function draws an arc in an image with the libgd function <B>gdImageArc()</B>.
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] o_current
- * \param [in] origin_x
- * \param [in] origin_y
- * \param [in] color_mode
- */
-void
-o_arc_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
- int start_angle, end_angle;
- int width, height;
- int color;
- int x, y;
-
- if (o_current == NULL) {
- printf("got null in o_arc_image_write\n");
- return;
- }
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
- /* libgd angles are in opposite sense to gschem's internal angles */
- /* Also, gschem's "end_angle" is actually the sweep of the arc, not absolute angle */
-
- /* Intialise {start|end}_angle to the start of gschem's sweep */
- start_angle = -o_current->arc->start_angle;
- end_angle = -o_current->arc->start_angle;
-
- /* libgd always sweeps arcs clockwise so we either update */
- /* the start_angle, or end_angle as appropriate */
- if ( o_current->arc->end_angle > 0 )
- start_angle -= o_current->arc->end_angle;
- else
- end_angle -= o_current->arc->end_angle;
-
- /* Ensure each angle is within 0-359. Negative angles make libgd blow up. */
- start_angle = ( start_angle < 0 ) ? 360 - ( (-start_angle) % 360 ) : start_angle % 360;
- end_angle = ( end_angle < 0 ) ? 360 - ( (-end_angle ) % 360 ) : end_angle % 360;
-
- /* libgd docs state that end angle should always be larger than start_angle */
- if (end_angle < start_angle)
- end_angle += 360;
-
- width = SCREENabs( w_current, o_current->arc->width);
- height = SCREENabs( w_current, o_current->arc->height);
- WORLDtoSCREEN( w_current, o_current->arc->x, o_current->arc->y, &x, &y );
-
-#ifdef HAS_LIBGD
-
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current,
- o_current->line_width));
-
- gdImageArc(current_im_ptr,
- x, y, width, height, start_angle, end_angle, color);
-#endif
-
-}
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index 319129e..9080f47 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -23,10 +23,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
#include "defines.h"
#include "struct.h"
#include "globals.h"
@@ -1468,94 +1464,4 @@ void o_box_print_hatch(TOPLEVEL *w_current, FILE *fp,
}
}
-#if 0 /* original way of printing box, no longer used */
-/*! \brief Print BOX to Postscript document using old method.
- * \par Function Description
- * This function is the old function to print a box. It does not handle line
- * type and filling of a box.
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] fp FILE pointer to Postscript document.
- * \param [in] origin_x Page x coordinate to place BOX OBJECT.
- * \param [in] origin_y Page x coordinate to place BOX OBJECT.
- */
-void o_box_print_old(TOPLEVEL *w_current, FILE *fp,
- int origin_x, int origin_y)
-{
- int width, height;
- int x1, y1;
- if (o_current == NULL) {
- printf("got null in o_box_print\n");
- return;
- }
-
- if (w_current->print_color) {
- f_print_set_color(fp, o_current->color);
- }
-
-
- width = abs(o_current->line_points->x2 - o_current->line_points->x1);
- height = abs(o_current->line_points->y1 - o_current->line_points->y2);
-
- x1 = o_current->line_points->x1;
- y1 = o_current->line_points->y1-height; /* move the origin to 0, 0*/
-
- fprintf(fp, "newpath\n");
- fprintf(fp, "%d mils %d mils moveto\n", x1-origin_x, y1-origin_y);
- fprintf(fp, "%d mils %d mils box\n", width, height);
-
-}
-#endif
-
-/*! \brief Draw a box in an image.
- * \par Function Description
- * This function draws a box in an image with the libgd function
- * #gdImageRectangle().
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] o_current BOX OBJECT to draw.
- * \param [in] origin_x (unused).
- * \param [in] origin_y (unused).
- * \param [in] color_mode Draw box in color if TRUE, B/W otherwise.
- */
-void o_box_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
-#ifdef HAS_LIBGD
- int s_upper_x, s_upper_y, s_lower_x, s_lower_y;
-#endif
- int color;
- if (o_current == NULL) {
- printf("got null in o_box_image_write\n");
- return;
- }
-
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
-#ifdef HAS_LIBGD
-
- WORLDtoSCREEN(w_current,
- o_current->box->upper_x,
- o_current->box->upper_y,
- &s_upper_x, &s_upper_y);
- WORLDtoSCREEN(w_current,
- o_current->box->lower_x,
- o_current->box->lower_y,
- &s_lower_x, &s_lower_y);
-
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current,
- o_current->line_width));
-
- gdImageRectangle(current_im_ptr,
- s_upper_x, s_upper_y,
- s_lower_x, s_lower_y,
- color);
-
-#endif /* HAS_GD */
-}
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index d449030..e2cbb2e 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -26,10 +26,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
#include "defines.h"
#include "struct.h"
#include "globals.h"
@@ -328,47 +324,6 @@ void o_bus_print(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current,
}
-/* \brief
- * \par Function Description
- *
- */
-void o_bus_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
-#ifdef HAS_LIBGD
- int x[2], y[2];
-#endif
- int color;
-
- if (o_current == NULL) {
- printf("got null in o_bus_image_write\n");
- return;
- }
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
-#ifdef HAS_LIBGD
-
- WORLDtoSCREEN(w_current,
- o_current->line->x[0],
- o_current->line->y[0],
- &x[0], &y[0]);
- WORLDtoSCREEN(w_current,
- o_current->line->x[1],
- o_current->line->y[1],
- &x[1], &y[1]);
-
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current, BUS_WIDTH));
-
- gdImageLine(current_im_ptr, x[0], y[0], x[1], y[1], color);
-
-#endif
-}
-
/* \brief
* \par Function Description
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index 458a1a5..b146f20 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -23,9 +23,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
#include "defines.h"
#include "struct.h"
@@ -1172,85 +1169,4 @@ void o_circle_print_hatch(TOPLEVEL *w_current, FILE *fp,
}
}
-#if 0 /* original way of printing circle, no longer used */
-/*! \brief Print Circle to Postscript document using old method.
- * \par Function Description
- * This function is the old function to print a circle.
- * It does not handle line type and filling of a circle.
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] fp FILE pointer to Postscript document.
- * \param [in] o_current Circle object to print.
- * \param [in] origin_x Page x coordinate to place circle OBJECT.
- * \param [in] origin_y Page x coordinate to place circle OBJECT.
- */
-void o_circle_print_old(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current,
- int origin_x, int origin_y)
-{
- if (o_current == NULL) {
- printf("got null in o_circle_print\n");
- return;
- }
-
- o_arc_print_solid(w_current, fp,
- o_current->circle->center_x,
- o_current->circle->center_y,
- o_current->circle->radius,
- 0, FULL_CIRCLE / 64,
- o_current->color),
- o_current->line_width, -1, -1,
- origin_x, origin_y);
-
-}
-#endif
-/*! \brief Draw a circle in an image.
- * \par Function Description
- * This function draws a circle in an image with the libgd function
- * #gdImageArc().
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] o_current Circle OBJECT to draw.
- * \param [in] origin_x (unused).
- * \param [in] origin_y (unused).
- * \param [in] color_mode Draw circle in color if TRUE, B/W otherwise.
- */
-void o_circle_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
-#ifdef HAS_LIBGD
- int diameter;
- int s_x, s_y;
-#endif
- int color;
-
- if (o_current == NULL) {
- printf("got null in o_circle_image_write\n");
- return;
- }
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
-#ifdef HAS_LIBGD
-
- diameter = SCREENabs(w_current, o_current->circle->radius)*2;
- WORLDtoSCREEN(w_current,
- o_current->circle->center_x,
- o_current->circle->center_y,
- &s_x, &s_y);
-
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current,
- o_current->line_width));
-
- gdImageArc(current_im_ptr,
- s_x, s_y,
- diameter,
- diameter,
- 0, 360,
- color);
-#endif
-}
diff --git a/libgeda/src/o_embed.c b/libgeda/src/o_embed.c
index 24608f2..2ded634 100644
--- a/libgeda/src/o_embed.c
+++ b/libgeda/src/o_embed.c
@@ -23,9 +23,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
#include <libgen.h>
#include "defines.h"
diff --git a/libgeda/src/o_image.c b/libgeda/src/o_image.c
deleted file mode 100644
index 870bd2b..0000000
--- a/libgeda/src/o_image.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/* gEDA - GPL Electronic Design Automation
- * libgeda - gEDA's library
- * Copyright (C) 1998-2000 Ales V. Hvezda
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
- */
-#include <config.h>
-
-#include <stdio.h>
-
-#include <gtk/gtk.h>
-#include <libguile.h>
-
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
-#include "defines.h"
-#include "struct.h"
-#include "globals.h"
-#include "o_types.h"
-#include "funcs.h"
-#include "colors.h"
-
-#include "../include/prototype.h"
-
-#ifdef HAVE_LIBDMALLOC
-#include <dmalloc.h>
-#endif
-
-int image_black;
-int image_white;
-#if 0
-int image_red;
-int image_green;
-int image_blue;
-int image_yellow;
-int image_cyan;
-int image_grey;
-#endif
-
-#ifdef HAS_LIBGD
-
-extern COLOR colors[MAX_COLORS];
-
-/*! \brief
- *
- */
-gdImagePtr current_im_ptr;
-
-/*! \brief
- * \par Function Description
- *
- */
-void o_image_init(void)
-{
-
-}
-
-/*! \brief
- * \par Function Description
- *
- * \param [in] x
- * \param [in] y
- * \param [in] color_mode
- */
-/* background color ? */
-void o_image_create(int x, int y, int color_mode)
-{
- gdImagePtr im_ptr;
-
- im_ptr = gdImageCreate(x, y);
-
- if (color_mode == TRUE) {
- /* You can change the background color which is outputed */
- if (colors[BACKGROUND_COLOR].image_red != -1 &&
- colors[BACKGROUND_COLOR].image_green != -1 &&
- colors[BACKGROUND_COLOR].image_blue != -1) {
- image_black = gdImageColorAllocate(im_ptr,
- colors[BACKGROUND_COLOR].image_red,
- colors[BACKGROUND_COLOR].image_green,
- colors[BACKGROUND_COLOR].image_blue);
- } else {
- image_black = gdImageColorAllocate(im_ptr, 0, 0, 0);
- }
- image_white = gdImageColorAllocate(im_ptr, 255, 255, 255);
- } else {
- /* set the background to white */
- image_white = gdImageColorAllocate(im_ptr, 255, 255, 255);
- image_black = gdImageColorAllocate(im_ptr, 0, 0, 0);
- }
-
- current_im_ptr = im_ptr;
-
- s_color_gdcolor_init();
-}
-
-/*! \brief
- * \par Function Description
- *
- */
-void o_image_close(void)
-{
- gdImageDestroy(current_im_ptr);
-}
-
-/*! \brief
- * \par Function Description
- *
- */
-int o_image_write(const char *filename)
-{
- FILE *out;
-
- if (filename == NULL) {
- return(-1);
- }
-
- gdImageInterlace(current_im_ptr, 1);
-
- out = fopen(filename, "wb");
-
- if (out == NULL) {
- s_log_message("Could not open [%s] for image writting\n", filename);
- return(-1);
- }
-
- gdImagePng(current_im_ptr, out);
-
- fclose(out);
- return(0);
-}
-#endif
-
-/*! \brief
- * \par Function Description
- *
- */
-/* this can stay in even if libgd doesn't exist */
-int o_image_geda2gd_color(int color)
-{
- int value;
- value = s_color_image_int(color);
- return(value);
-}
-
-
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index 47dac48..610d219 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -24,9 +24,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
#include "defines.h"
#include "struct.h"
@@ -1184,94 +1181,6 @@ void o_line_print_phantom(TOPLEVEL *w_current, FILE *fp,
fprintf(fp,"] %d dashed\n", line_width);
}
-#if 0 /* original way of printing line, no longer used */
-/*! \brief Print line to Postscript document using old method.
- * \par Function Description
- * This function is the old function to print a line.
- * It does not handle line type.
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] fp FILE pointer to Postscript document.
- * \param [in] o_current Line object to print.
- * \param [in] origin_x Page x coordinate to place line OBJECT.
- * \param [in] origin_y Page x coordinate to place line OBJECT.
- */
-void o_line_print_old(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current,
- int origin_x, int origin_y)
-{
- if (o_current == NULL) {
- printf("got null in o_line_print\n");
- return;
- }
-
- if (w_current->print_color) {
- f_print_set_color(fp, o_current->color);
- }
-
- fprintf(fp, "newpath\n");
-
- fprintf(fp, "%d mils %d mils moveto\n",
- o_current->line_points->x1-origin_x,
- o_current->line_points->y1-origin_y);
- fprintf(fp, "%d mils %d mils lineto\n",
- o_current->line_points->x2-origin_x,
- o_current->line_points->y2-origin_y);
- fprintf(fp, "stroke\n");
-
-}
-#endif
-
-/*! \brief Draw a line in an image.
- * \par Function Description
- * This function draws a line in an image with the libgd function
- * #gdImageLine().
- *
- * \param [in] w_current The TOPLEVEL object.
- * \param [in] o_current Line OBJECT to draw.
- * \param [in] origin_x (unused).
- * \param [in] origin_y (unused).
- * \param [in] color_mode Draw line in color if TRUE, B/W otherwise.
- */
-
-void o_line_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
-#ifdef HAS_LIBGD
- int x[2], y[2];
-#endif
- int color;
-
- if (o_current == NULL) {
- printf("got null in o_line_print\n");
- return;
- }
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
-#ifdef HAS_LIBGD
-
- WORLDtoSCREEN(w_current,
- o_current->line->x[0],
- o_current->line->y[0],
- &x[0], &y[0]);
- WORLDtoSCREEN(w_current,
- o_current->line->x[1],
- o_current->line->y[1],
- &x[1], &y[1]);
-
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current,
- o_current->line_width));
-
- gdImageLine(current_im_ptr,
- x[0], y[0],
- x[1], y[1],
- color);
-#endif
-}
/*! \brief
* \par Function Description
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index b7a19a5..ab27bab 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -24,10 +24,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
#include "defines.h"
#include "struct.h"
#include "globals.h"
@@ -340,51 +336,6 @@ void o_net_print(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current,
fprintf(fp, "%d %d %d %d %d line\n", x1,y1,x2,y2,net_width);
}
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- *
- */
-void o_net_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
-#ifdef HAS_LIBGD
- int x[2], y[2];
-#endif
- int color;
-
- if (o_current == NULL) {
- printf("got null in o_net_image_write\n");
- return;
- }
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
-#ifdef HAS_LIBGD
- WORLDtoSCREEN(w_current,
- o_current->line->x[0],
- o_current->line->y[0],
- &x[0], &y[0]);
- WORLDtoSCREEN(w_current,
- o_current->line->x[1],
- o_current->line->y[1],
- &x[1], &y[1]);
-
- if (w_current->net_style == THICK) {
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current,
- NET_WIDTH));
- } else {
- gdImageSetThickness(current_im_ptr, 0);
- }
-
- gdImageLine(current_im_ptr, x[0], y[0], x[1], y[1], color);
-#endif
-}
/*! \todo Finish function documentation!!!
* \brief
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index a8e681b..d900de7 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -24,10 +24,6 @@
#include <gtk/gtk.h>
#include <libguile.h>
-#ifdef HAS_LIBGD
-#include <gd.h>
-#endif
-
#include "defines.h"
#include "struct.h"
#include "globals.h"
@@ -346,54 +342,6 @@ void o_pin_print(TOPLEVEL *w_current, FILE *fp, OBJECT *o_current,
* \par Function Description
*
*/
-void o_pin_image_write(TOPLEVEL *w_current, OBJECT *o_current,
- int origin_x, int origin_y, int color_mode)
-{
-#ifdef HAS_LIBGD
- int x[2], y[2];
-#endif
- int color;
-
- if (o_current == NULL) {
- printf("got null in o_pin_image_write\n");
- return;
- }
-
- if (color_mode == TRUE) {
- color = o_image_geda2gd_color(o_current->color);
- } else {
- color = image_black;
- }
-
-#ifdef HAS_LIBGD
- WORLDtoSCREEN(w_current,
- o_current->line->x[0],
- o_current->line->y[0],
- &x[0], &y[0]);
- WORLDtoSCREEN(w_current,
- o_current->line->x[1],
- o_current->line->y[1],
- &x[1], &y[1]);
-
- if (w_current->pin_style == THICK) {
- gdImageSetThickness(current_im_ptr, SCREENabs(w_current,
- PIN_WIDTH));
- } else {
- gdImageSetThickness(current_im_ptr, 0);
- }
-
- gdImageLine(current_im_ptr,
- x[0], y[0],
- x[1], y[1],
- color);
-#endif
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
void o_pin_rotate_world(TOPLEVEL *w_current, int world_centerx,
int world_centery, int angle,
OBJECT *object)
diff --git a/libgeda/src/s_color.c b/libgeda/src/s_color.c
index ae68c24..e2ff11a 100644
--- a/libgeda/src/s_color.c
+++ b/libgeda/src/s_color.c
@@ -170,38 +170,6 @@ int s_color_image_int(int color)
* \par Function Description
*
*/
-/* \bug I have no idea if this causes a memory leak or not */
-void s_color_gdcolor_init(void)
-{
- int i;
-
- for (i = 0; i < MAX_COLORS; i++) {
-
- if (colors[i].image_red != -1 && colors[i].image_green != -1 &&
- colors[i].image_blue != -1) {
-#ifdef HAS_LIBGD
- colors[i].image_color = gdImageColorAllocate(
- current_im_ptr,
- colors[i].image_red,
- colors[i].image_green,
- colors[i].image_blue);
-#endif
-
-#if DEBUG
- printf("%d) %d %d %d -> %d\n", i,
- colors[i].image_red,
- colors[i].image_green,
- colors[i].image_blue, colors[i].image_color);
-#endif
- }
- }
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
int s_color_get_name(int index, char *string)
{
if (index > MAX_COLORS) {
diff --git a/libgeda/src/s_cue.c b/libgeda/src/s_cue.c
index 795622f..54f2008 100644
--- a/libgeda/src/s_cue.c
+++ b/libgeda/src/s_cue.c
@@ -96,76 +96,6 @@ void s_cue_postscript_fillcircle(TOPLEVEL * w_current, FILE * fp,
fprintf(fp, "fill\n");
}
-#ifdef HAS_LIBGD
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void s_cue_image_fillbox(TOPLEVEL * w_current, OBJECT * object, int world_x,
- int world_y)
-{
- int endpoint_color;
- int offset, offset2;
- int x, y;
-
- if (w_current->image_color == TRUE) {
- endpoint_color =
- o_image_geda2gd_color(w_current->net_endpoint_color);
- } else {
- endpoint_color = image_black;
- }
-
- WORLDtoSCREEN(w_current, world_x, world_y, &x, &y);
-
- offset = SCREENabs(w_current, CUE_BOX_SIZE);
- offset2 = offset * 2;
-
- gdImageFilledRectangle(current_im_ptr,
- x - offset, y - offset, x - offset + offset2,
- y - offset + offset2, endpoint_color);
-
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void s_cue_image_fillcircle(TOPLEVEL * w_current, int world_x, int world_y,
- int size_flag)
-{
- int endpoint_color;
- int offset, offset2;
- int i;
- int x, y;
-
- if (w_current->image_color == TRUE) {
- endpoint_color =
- o_image_geda2gd_color(w_current->net_endpoint_color);
- } else {
- endpoint_color = image_black;
- }
-
- WORLDtoSCREEN(w_current, world_x, world_y, &x, &y);
-
- /* this needs to be rewritten to be much cleaner */
- if (!size_flag) {
- offset = SCREENabs(w_current, 30); /* large size */
- } else {
- offset = SCREENabs(w_current, 10); /* small size */
- }
- offset2 = offset * 2;
-
- gdImageArc(current_im_ptr, x, y,
- offset2 * 1.25, offset2 * 1.25, 0, 360, endpoint_color);
-
- for (i = 0; i < offset2 * 1.25; i++) {
- gdImageArc(current_im_ptr, x, y, i, i, 0, 360, endpoint_color);
- }
-
-}
-#endif
/*! \todo Finish function documentation!!!
* \brief
@@ -265,10 +195,6 @@ void s_cue_output_lowlevel(TOPLEVEL * w_current, OBJECT * object, int whichone,
if (count < 1) { /* Didn't find anything connected there */
if (output_type == POSTSCRIPT) {
s_cue_postscript_fillbox(w_current, fp, x, y);
-#ifdef HAS_LIBGD
- } else if (output_type == PNG) {
- s_cue_image_fillbox(w_current, object, x, y);
-#endif
}
@@ -279,14 +205,6 @@ void s_cue_output_lowlevel(TOPLEVEL * w_current, OBJECT * object, int whichone,
} else {
s_cue_postscript_fillcircle(w_current, fp, x, y, TRUE);
}
-#ifdef HAS_LIBGD
- } else if (output_type == PNG) {
- if (!bus_involved) {
- s_cue_image_fillcircle(w_current, x, y, FALSE);
- } else {
- s_cue_image_fillcircle(w_current, x, y, TRUE);
- }
-#endif
}
}
}
@@ -299,14 +217,6 @@ void s_cue_output_lowlevel(TOPLEVEL * w_current, OBJECT * object, int whichone,
} else {
s_cue_postscript_fillcircle(w_current, fp, x, y, TRUE);
}
-#ifdef HAS_LIBGD
- } else if (output_type == PNG) {
- if (!bus_involved) {
- s_cue_image_fillcircle(w_current, x, y, FALSE);
- } else {
- s_cue_image_fillcircle(w_current, x, y, TRUE);
- }
-#endif
}
}
@@ -348,10 +258,6 @@ void s_cue_output_lowlevel_midpoints(TOPLEVEL * w_current, OBJECT * object,
if (output_type == POSTSCRIPT) {
s_cue_postscript_fillcircle(w_current, fp, x, y, size_flag);
-#ifdef HAS_LIBGD
- } else if (output_type == PNG) {
- s_cue_image_fillcircle(w_current, x, y, size_flag);
-#endif
}
break;
}
commit 3fa80f60f62e37fd2297c56b1a99bf5a29d5e912
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 24 21:41:30 2007 -0400
Removed indent from gattrib's configure script.
indent is no longer used (hold back from the noweb days).
diff --git a/gattrib/configure.ac b/gattrib/configure.ac
index 5a8c381..6d373c2 100644
--- a/gattrib/configure.ac
+++ b/gattrib/configure.ac
@@ -155,7 +155,7 @@ fi
############################################################################
############################################################################
-# Check for doxygen, indent start
+# Check for doxygen start
#
# Doxygen is a utility for generating html and latex documentation
@@ -190,27 +190,8 @@ fi
# using conditionnal in docs/Makefile.in
AM_CONDITIONAL(BUILDDOC, test x$builddoc = xtrue)
-# search for indent
-AC_PATH_PROG(INDENT, indent, no, ${PATH})
-
-if ! test "$INDENT" = "no"; then
- indentversion=`$INDENT --version | grep GNU`
-else
- indentversion=
-fi
-
-if test "$INDENT" = "no" -o "$indentversion"x = x; then
- AC_PATH_PROG(GINDENT, gindent, no, ${PATH})
- if test "$GINDENT" = "no"; then
- echo "** Cannot find GNU indent or gindent, C code formatting disabled **"
- INDENT=echo
- else
- INDENT=$GINDENT
- fi
-fi
-
#
-# Check for doxygen, indent end
+# Check for doxygen end
#########################################################################
commit 868d31c36736b1ceebdd9a7cea6d12d12ecf89a9
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 24 15:46:46 2007 -0400
Removed libgd and indent tests from configure scripts.
indent is no longer use since noweb was removed a long time ago.
libgd is no longer used since libgeda/gschem uses mage export support in gdk.
diff --git a/gschem/configure.ac.in b/gschem/configure.ac.in
index 381d4fa..8cb5fc4 100644
--- a/gschem/configure.ac.in
+++ b/gschem/configure.ac.in
@@ -28,12 +28,6 @@ AC_ARG_ENABLE(stroke,
no_stroke=yes
fi ])
-# --disable-gd : turn off libgd support
-AC_ARG_ENABLE(gd,
- [ --disable-gd Disable libgd support (don't use libgd at all)], [ if test $enableval = "no"; then
- no_gd=yes
- fi ])
-
# Change default location for rc files
AC_ARG_WITH(rcdir, [ --with-rcdir=path Change where the system-*rc files are installed], [opt_rcdir=$withval])
@@ -249,35 +243,6 @@ fi
############################################################################
############################################################################
-# Check for libgd start
-# Do some very simple tests, as we just need to know if libgeda was
-# built with libgd support.
-#
-
-if test "X$no_gd" != "Xyes"; then
- AC_MSG_CHECKING([if libgeda was compiled with gdlib])
- haslibgd=`$PKG_CONFIG --variable=LIBGEDA_HASGD libgeda`
- if test "$haslibgd" != "yes"; then
- AC_MSG_WARN([libgeda was not built with libgd png support.
-gschem will use the builtin png support. If you want libgd png support, you
-must recompile libgeda with gdlib support.])
- LIBGD=no
- else
- AC_MSG_RESULT([yes])
- LIBGD=yes
- AC_DEFINE(HAS_LIBGD, 1, [If gd has been installed, define this])
- fi
-else
- LIBGD=no
-fi
-
-
-#
-# Check for libgd end
-############################################################################
-
-
-############################################################################
# Check for libstroke start
#
@@ -323,7 +288,7 @@ fi
############################################################################
############################################################################
-# Check for doxygen, indent start
+# Check for doxygen start
#
# Doxygen is a utility for generating html and latex documentation
# from c source code files.
@@ -357,27 +322,8 @@ fi
# using conditionnal in docs/Makefile.in
AM_CONDITIONAL(BUILDDOC, test x$builddoc = xtrue)
-# search for indent
-AC_PATH_PROG(INDENT, indent, no, ${PATH})
-
-if ! test "$INDENT" = "no"; then
- indentversion=`$INDENT --version | grep GNU`
-else
- indentversion=
-fi
-
-if test "$INDENT" = "no" -o "$indentversion"x = x; then
- AC_PATH_PROG(GINDENT, gindent, no, ${PATH})
- if test "$GINDENT" = "no"; then
- echo "** Cannot find GNU indent or gindent, C code formatting disabled **"
- INDENT=echo
- else
- INDENT=$GINDENT
- fi
-fi
-
#
-# Check for doxygen, indent end
+# Check for doxygen end
#########################################################################
#########################################################################
@@ -582,7 +528,6 @@ AC_MSG_RESULT([
GUILE library version: $GUILE_VERSION
libgeda library version: $LIBGEDA_VERSION
libstroke library: $LIBSTROKE
- libgd library: $LIBGD
mingw build: $MINGW
data directory: $expandedGEDADATADIR
rc directory: $expandedGEDARCDIR
diff --git a/libgeda/configure.ac b/libgeda/configure.ac
index 4ce879f..89a8107 100644
--- a/libgeda/configure.ac
+++ b/libgeda/configure.ac
@@ -23,10 +23,6 @@ AM_MAINTAINER_MODE
#########################################################################
# Command line flags start
#
-# --enable-gd : turn off libgd support
-no_gd="yes"
-AC_ARG_ENABLE(gd, [ --enable-gd Enable libgd support (use libgd instead of gdk-pixbuf)],
- [ if test $enableval = "yes"; then no_gd=no; fi ])
# Change default location for rc files
AC_ARG_WITH(rcdir, [ --with-rcdir=path Change where the system-*rc files are installed], [opt_rcdir=$withval])
@@ -109,53 +105,6 @@ AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", DL_LIB="")
############################################################################
############################################################################
-# Check for libgd start
-#
-LIBGEDA_HASGD=no
-if test "X$no_gd" != "Xyes" ; then
-
- AC_PATH_PROG(LIBGDCONFIG, gdlib-config, no, ${PATH})
-
- if test "$LIBGDCONFIG" = "no" ; then
- AC_MSG_WARN([Cannot find gdlib-config.
-Make sure it is installed and in your PATH.
-Libgeda will be built using the builtin png support. gdlib-config is part
-of the GD library available from www.boutell.com/gd. This is needed for
-png export using libgd, however png support is available without libgd.
-])
- GD_CFLAGS=
- GD_LIBS=
- GD_VERSION=
- GD="no"
- LIBGEDA_HASGD=no
-
- else
- GD_CFLAGS=`$LIBGDCONFIG --cflags`
- GD_LIBS1=`$LIBGDCONFIG --ldflags`
- GD_LIBS2=`$LIBGDCONFIG --libs`
- GD_LIBS="$GD_LIBS1 $GD_LIBS2 -lgd"
- GD_VERSION=`$LIBGDCONFIG --version`
- GD="yes"
- LIBGEDA_HASGD=yes
-
- # This is not really used to figure out paths, but just to make
- # sure >= 2.0.15 is installed
- # PKG_CHECK_MODULES(libgd, libgd >= 2.0.15)
- AC_DEFINE(HAS_LIBGD, 1, [If gd has been installed, define this])
- fi
-else
- GD_CFLAGS=
- GD_LIBS=
- GD_VERSION=
- GD="no"
- LIBGEDA_HASGD=no
-fi
-
-#
-# Check for libgd end
-############################################################################
-
-############################################################################
# Check for X11 start
#
@@ -286,7 +235,7 @@ fi
############################################################################
-# Check for doxygen, indent start
+# Check for doxygen start
#
# Doxygen is a utility for generating html and latex documentation
@@ -321,27 +270,8 @@ fi
# using conditionnal in docs/Makefile.in
AM_CONDITIONAL(BUILDDOC, test x$builddoc = xtrue)
-# search for indent
-AC_PATH_PROG(INDENT, indent, no, ${PATH})
-
-if ! test "$INDENT" = "no"; then
- indentversion=`$INDENT --version | grep GNU`
-else
- indentversion=
-fi
-
-if test "$INDENT" = "no" -o "$indentversion"x = x; then
- AC_PATH_PROG(GINDENT, gindent, no, ${PATH})
- if test "$GINDENT" = "no"; then
- echo "** Cannot find GNU indent or gindent, C code formatting disabled **"
- INDENT=echo
- else
- INDENT=$GINDENT
- fi
-fi
-
#
-# Check for doxygen, indent end
+# Check for doxygen end
#########################################################################
#########################################################################
@@ -506,7 +436,6 @@ AC_MSG_RESULT([
GTK+ library version: $GTK_VERSION
GUILE library version: $GUILE_VERSION
GDK-PIXBUF (png output): $GDK_PIXBUF_VERSION
- libgd (png output): $GD $GD_VERSION
mingw build: $MINGW
data directory: $expandedGEDADATADIR
rc directory: $expandedGEDARCDIR
=========
Summary
=========
gattrib/configure.ac | 23 +----
gschem/configure.ac.in | 59 +-----------
gschem/src/x_image.c | 43 --------
libgeda/configure.ac | 80 +--------------
libgeda/include/funcs.h | 1 -
libgeda/include/globals.h | 7 --
libgeda/include/prototype.h | 22 ----
libgeda/libgeda.pc.in | 2 -
libgeda/src/Makefile.am | 4 +-
libgeda/src/f_image.c | 221 ------------------------------------------
libgeda/src/o_arc_basic.c | 152 -----------------------------
libgeda/src/o_box_basic.c | 94 ------------------
libgeda/src/o_bus_basic.c | 45 ---------
libgeda/src/o_circle_basic.c | 84 ----------------
libgeda/src/o_embed.c | 3 -
libgeda/src/o_image.c | 159 ------------------------------
libgeda/src/o_line_basic.c | 91 -----------------
libgeda/src/o_net_basic.c | 49 ---------
libgeda/src/o_pin_basic.c | 52 ----------
libgeda/src/s_color.c | 32 ------
libgeda/src/s_cue.c | 94 ------------------
21 files changed, 10 insertions(+), 1307 deletions(-)
delete mode 100644 libgeda/src/f_image.c
delete mode 100644 libgeda/src/o_image.c
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs