[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: prototype.h
User: pcjc2
Date: 07/02/25 08:41:24
Modified: . Tag: noscreen prototype.h struct.h
Log:
Switched over to caching world rather than screen coordinates.
Removed screen coordinates from object datastructures, and renamed
variables storing cached bounds with prefix w_ to differentiate their world
coord usage. Changed s_basic.c to initialise all these variables to zero.
Converted code using those variables to world coordinates as appropriate.
Revision Changes Path
No revision
No revision
1.116.2.9 +4 -7 eda/geda/gaf/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/gaf/libgeda/include/prototype.h,v
retrieving revision 1.116.2.8
retrieving revision 1.116.2.9
diff -u -b -r1.116.2.8 -r1.116.2.9
--- prototype.h 24 Feb 2007 17:14:37 -0000 1.116.2.8
+++ prototype.h 25 Feb 2007 13:41:24 -0000 1.116.2.9
@@ -269,15 +269,12 @@
void o_circle_image_write(TOPLEVEL *w_current, OBJECT *o_current, int origin_x, int origin_y, int color_mode);
/* o_complex_basic.c */
-void get_single_object_bounds(TOPLEVEL *w_current, OBJECT *complex,
+int world_get_single_object_bounds(TOPLEVEL *w_current, OBJECT *o_current,
int *rleft, int *rtop,
int *rright, int *rbottom);
-void get_object_list_bounds(TOPLEVEL *w_current, OBJECT *complex,
+int world_get_object_list_bounds(TOPLEVEL *w_current, OBJECT *complex,
int *left, int *top, int *right, int *bottom);
-void get_object_glist_bounds(TOPLEVEL *w_current, GList *o_list,
- int *left, int *top,
- int *right, int *bottom);
-void world_get_single_object_bounds(TOPLEVEL *w_current, OBJECT *o_current,
+int world_get_object_glist_bounds(TOPLEVEL *w_current, GList *o_list,
int *left, int *top,
int *right, int *bottom);
void world_get_complex_bounds(TOPLEVEL *w_current, OBJECT *complex, int *left, int *top, int *right, int *bottom);
@@ -421,7 +418,7 @@
/* o_text_basic.c */
void get_text_bounds(TOPLEVEL *w_current, OBJECT *o_current, int *left, int *top, int *right, int *bottom);
-void world_get_text_bounds(TOPLEVEL *w_current, OBJECT *o_current, int *left, int *top, int *right, int *bottom);
+int world_get_text_bounds(TOPLEVEL *w_current, OBJECT *o_current, int *left, int *top, int *right, int *bottom);
OBJECT *o_text_add_head(void);
void o_text_init(void);
void o_text_print_set(void);
1.98.2.3 +10 -23 eda/geda/gaf/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/gaf/libgeda/include/struct.h,v
retrieving revision 1.98.2.2
retrieving revision 1.98.2.3
diff -u -b -r1.98.2.2 -r1.98.2.3
--- struct.h 24 Feb 2007 17:14:37 -0000 1.98.2.2
+++ struct.h 25 Feb 2007 13:41:24 -0000 1.98.2.3
@@ -72,8 +72,6 @@
int x[2];
int y[2];
- int screen_x[2];
- int screen_y[2];
};
/* pb20011014 - name the grips */
@@ -82,11 +80,9 @@
struct st_arc {
int x, y; /* world */
- int screen_x, screen_y;
int width;
int height;
- int screen_width, screen_height;
int start_angle;
int end_angle;
@@ -102,8 +98,6 @@
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;
};
/* pb20011014 - name the grips */
#define BOX_UPPER_LEFT 0
@@ -125,8 +119,6 @@
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
@@ -137,7 +129,6 @@
struct st_text {
int x, y; /* world origin */
- int screen_x, screen_y;
char *string; /* text stuff */
int length;
@@ -152,7 +143,6 @@
struct st_complex {
int x, y; /* world origin */
- int screen_x, screen_y;
int angle; /* orientation, only multiples
* of 90 degrees allowed */
@@ -168,11 +158,8 @@
int center_x, center_y; /* world */
int radius;
- int screen_x, screen_y;
/* pb20011010 - removed : used only in o_circle_draw_xor() and
meaning unclear */
-/* int screen_left, screen_top; */
- int screen_radius;
};
/* pb20011014 - name the grips */
#define CIRCLE_CENTER 0
@@ -183,10 +170,10 @@
int sid;
char *name;
- int top; /* Bounding box information */
- int left; /* in screen coords */
- int right;
- int bottom;
+ int w_top; /* Bounding box information */
+ int w_left; /* in world coords */
+ int w_right;
+ int w_bottom;
COMPLEX *complex;
LINE *line;
@@ -207,14 +194,14 @@
/* PB : of these fields. If not, value must be ignored. */
OBJECT_END line_end;
OBJECT_TYPE line_type;
- int line_width, screen_line_width;
- int line_space, screen_line_space;
- int line_length, screen_line_length;
+ int line_width;
+ int line_space;
+ int line_length;
OBJECT_FILLING fill_type;
- int fill_width, screen_fill_width;
- int fill_angle1, fill_pitch1, screen_fill_pitch1;
- int fill_angle2, fill_pitch2, screen_fill_pitch2;
+ int fill_width;
+ int fill_angle1, fill_pitch1;
+ int fill_angle2, fill_pitch2;
/* PB : change end */
int visited; /* used in gnetlist for travesal purposes */
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs