[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: funcs.h
User: cnieves
Date: 05/02/19 18:27:31
Modified: . funcs.h libgeda.h o_types.h prototype.h struct.h
Log:
Added support for pictures within schematics and symbols.
Revision Changes Path
1.6 +1 -0 eda/geda/devel/libgeda/include/funcs.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: funcs.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/funcs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- funcs.h 17 Sep 2002 03:08:17 -0000 1.5
+++ funcs.h 19 Feb 2005 23:27:30 -0000 1.6
@@ -1,5 +1,6 @@
extern void (*arc_draw_func)();
extern void (*box_draw_func)();
+extern void (*picture_draw_func)();
extern void (*circle_draw_func)();
extern void (*complex_draw_func)();
extern void (*line_draw_func)();
1.8 +4 -0 eda/geda/devel/libgeda/include/libgeda.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: libgeda.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/libgeda.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- libgeda.h 18 Feb 2005 02:58:25 -0000 1.7
+++ libgeda.h 19 Feb 2005 23:27:30 -0000 1.8
@@ -37,4 +37,8 @@
#include <libgeda/i_vars.h>
#include <libgeda/prototype.h>
+#ifndef HAS_GTK12
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
#endif
1.8 +1 -0 eda/geda/devel/libgeda/include/o_types.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_types.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/o_types.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- o_types.h 20 Jan 2005 13:38:26 -0000 1.7
+++ o_types.h 19 Feb 2005 23:27:30 -0000 1.8
@@ -25,6 +25,7 @@
#define OBJ_HEAD -1
#define OBJ_LINE 'L'
#define OBJ_BOX 'B'
+#define OBJ_PICTURE 'G'
#define OBJ_CIRCLE 'V'
#define OBJ_NET 'N'
#define OBJ_BUS 'U'
1.93 +30 -0 eda/geda/devel/libgeda/include/prototype.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: prototype.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/prototype.h,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -b -r1.92 -r1.93
--- prototype.h 14 Feb 2005 22:29:42 -0000 1.92
+++ prototype.h 19 Feb 2005 23:27:30 -0000 1.93
@@ -69,6 +69,13 @@
void i_vars_setnames(TOPLEVEL *w_current);
void i_vars_freenames();
+/* gdk-pixbuf-hacks.c */
+#ifndef HAS_GTK12
+GdkPixbuf *gdk_pixbuf_rotate (GdkPixbuf *pixbuf, guint angle);
+void gdk_pixbuf_add (GdkPixbuf *pixbuf, int offset_x, int offset_y, GdkPixbuf *pixbuf_to_add);
+GdkPixbuf *gdk_pixbuf_mirror_flip(GdkPixbuf *src, gint mirror, gint flip);
+#endif
+
/* libgeda.c */
void libgeda_init(void);
@@ -349,6 +356,29 @@
void o_net_consolidate(TOPLEVEL *w_current);
void o_net_modify(TOPLEVEL *w_current, OBJECT *object, int x, int y, int whichone);
+/* o_picture.c */
+#ifndef HAS_GTK12
+OBJECT *o_picture_read(TOPLEVEL *w_current, OBJECT *object_list, char buf[],
+ FILE *fp, unsigned int release_ver, unsigned int fileformat_ver);
+char *o_picture_save(OBJECT *object);
+void o_picture_set_pixbuf(TOPLEVEL *w_current, GdkPixbuf *pixbuf, char *filename);
+OBJECT *o_picture_add(TOPLEVEL *w_current, OBJECT *object_list,
+ GdkPixbuf * pixbuf, char *filename, double ratio,
+ char type,
+ int x1, int y1, int x2, int y2, int angle, char mirrored,
+ char embedded);
+void o_picture_recalc(TOPLEVEL *w_current, OBJECT *o_current);
+void get_picture_bounds(TOPLEVEL *w_current, PICTURE *picture, int *left, int *top, int *right, int *bottom);void world_get_picture_bounds(TOPLEVEL *w_current, PICTURE *picture, int *left, int *top, int *right, int *bottom);
+void o_picture_modify(TOPLEVEL *w_current, OBJECT *object, int x, int y, int whichone);
+void o_picture_rotate(TOPLEVEL *w_current, int centerx, int centery, int angle, OBJECT *object);
+void o_picture_rotate_world(TOPLEVEL *w_current, int world_centerx, int world_centery, int angle,OBJECT *object);
+void o_picture_mirror(TOPLEVEL *w_current, int centerx, int centery, OBJECT *object);
+void o_picture_mirror_world(TOPLEVEL *w_current, int world_centerx, int world_centery, OBJECT *object);
+void o_picture_translate(TOPLEVEL *w_current, int dx, int dy, OBJECT *object);
+void o_picture_translate_world(TOPLEVEL *w_current, int x1, int y1, OBJECT *object);
+OBJECT *o_picture_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current);
+#endif
+
/* o_pin_basic.c */
void get_pin_bounds(TOPLEVEL *w_current, LINE *line, int *left, int *top, int *right, int *bottom);
void world_get_pin_bounds(TOPLEVEL *w_current, LINE *line, int *left, int *top, int *right, int *bottom);
1.73 +37 -0 eda/geda/devel/libgeda/include/struct.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: struct.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/struct.h,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- struct.h 11 Feb 2005 18:18:35 -0000 1.72
+++ struct.h 19 Feb 2005 23:27:30 -0000 1.73
@@ -28,6 +28,7 @@
typedef struct st_circle CIRCLE;
typedef struct st_arc ARC;
typedef struct st_box BOX;
+typedef struct st_picture PICTURE;
typedef struct st_text TEXT;
typedef struct st_attrib ATTRIB;
@@ -76,6 +77,7 @@
int screen_x[2];
int screen_y[2];
};
+
/* pb20011014 - name the grips */
#define LINE_END1 0
#define LINE_END2 1
@@ -111,6 +113,30 @@
#define BOX_UPPER_RIGHT 2
#define BOX_LOWER_LEFT 3
+struct st_picture {
+#ifndef HAS_GTK12
+ GdkPixbuf *original_picture;
+ GdkPixbuf *displayed_picture;
+#endif
+ double ratio;
+ char *filename;
+ int angle;
+ char mirrored;
+
+ /* upper is considered the origin */
+ int upper_x, upper_y; /* world */
+ int lower_x, lower_y;
+
+ int screen_upper_x, screen_upper_y;
+ int screen_lower_x, screen_lower_y;
+};
+
+#define PICTURE_UPPER_LEFT 0
+#define PICTURE_LOWER_RIGHT 1
+#define PICTURE_UPPER_RIGHT 2
+#define PICTURE_LOWER_LEFT 3
+
+
struct st_text {
int x, y; /* world origin */
int screen_x, screen_y;
@@ -170,6 +196,7 @@
ARC *arc;
BOX *box;
TEXT *text;
+ PICTURE *picture;
GList *tile_locs; /* tile locations */
@@ -426,6 +453,14 @@
/* also used by text add dialog */
char *current_attribute;
+
+ /* used by add picture dialog */
+#ifndef HAS_GTK12
+ GdkPixbuf *current_pixbuf;
+#endif
+ double pixbuf_wh_ratio; /* width/height ratio of the pixbuf */
+ char *pixbuf_filename;
+
int current_visible; /* in o_attrib.c */
int current_show;
/* have to decided on attribute list stuff */
@@ -547,6 +582,8 @@
GtkWidget *fowindow; /* File open */
GtkWidget *fswindow; /* File save */
GtkWidget *sowindow; /* Script open */
+ GtkWidget *pfswindow; /* Picture File Selection window */
+ GtkWidget *pcfswindow; /* Picture Change File Selection window */
int saveas_flag; /* what action after save? */
GtkWidget *aswindow; /* Attribute select */