libgeda
|
functions for the net object More...
#include <config.h>
#include <stdio.h>
#include <math.h>
#include "libgeda_priv.h"
Go to the source code of this file.
Functions | |
gboolean | o_net_get_position (TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object) |
get the position of the first net point | |
void | world_get_net_bounds (TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom) |
calculate and return the boundaries of a net object | |
OBJECT * | o_net_new (TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2) |
create a new net object | |
void | o_net_recalc (TOPLEVEL *toplevel, OBJECT *o_current) |
recalc the visual properties of a net object | |
OBJECT * | o_net_read (TOPLEVEL *toplevel, const char buf[], unsigned int release_ver, unsigned int fileformat_ver, GError **err) |
read a net object from a char buffer | |
char * | o_net_save (TOPLEVEL *toplevel, OBJECT *object) |
Create a string representation of the net object. | |
void | o_net_translate_world (TOPLEVEL *toplevel, int dx, int dy, OBJECT *object) |
move a net object | |
OBJECT * | o_net_copy (TOPLEVEL *toplevel, OBJECT *o_current) |
create a copy of a net object | |
void | o_net_print (TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y) |
postscript print command for a net object | |
void | o_net_rotate_world (TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object) |
rotate a net object around a centerpoint | |
void | o_net_mirror_world (TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object) |
mirror a net object horizontaly at a centerpoint | |
int | o_net_orientation (OBJECT *object) |
calculate the orientation of a net object | |
static void | o_net_consolidate_lowlevel (OBJECT *object, OBJECT *del_object, int orient) |
merge two net object | |
static int | o_net_consolidate_nomidpoint (OBJECT *object, int x, int y) |
Check if there's a midpoint connection at (x,y) | |
static int | o_net_consolidate_segments (TOPLEVEL *toplevel, OBJECT *object) |
try to consolidate a net object | |
void | o_net_consolidate (TOPLEVEL *toplevel, PAGE *page) |
consolidate all net objects | |
void | o_net_modify (TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone) |
modify one point of a net object | |
void | o_net_refresh_conn_cache (TOPLEVEL *toplevel, OBJECT *o_current) |
Refresh & cache number of connected entities. | |
gboolean | o_net_is_fully_connected (TOPLEVEL *toplevel, OBJECT *o_current) |
Check if net is fully connected. |
Definition in file o_net_basic.c.
[in] | toplevel | The toplevel environment. |
[out] | x | pointer to the x-position |
[out] | y | pointer to the y-position |
[in] | object | The object to get the position. |
Definition at line 45 of file o_net_basic.c.
void world_get_net_bounds | ( | TOPLEVEL * | toplevel, |
OBJECT * | object, | ||
int * | left, | ||
int * | top, | ||
int * | right, | ||
int * | bottom | ||
) |
[in] | toplevel | The TOPLEVEL object. |
[in] | object | a net object |
[out] | left | the left world coord |
[out] | top | the top world coord |
[out] | right | the right world coord |
[out] | bottom | the bottom world coord |
Definition at line 62 of file o_net_basic.c.
[in] | toplevel | The TOPLEVEL object. |
[in] | type | The OBJECT type (usually OBJ_NET) |
[in] | color | The color of the net |
[in] | x1 | x-coord of the first point |
[in] | y1 | y-coord of the first point |
[in] | x2 | x-coord of the second point |
[in] | y2 | y-coord of the second point |
Definition at line 81 of file o_net_basic.c.
[in] | toplevel | The TOPLEVEL object. |
[in] | o_current | a net object. |
Definition at line 111 of file o_net_basic.c.
OBJECT* o_net_read | ( | TOPLEVEL * | toplevel, |
const char | buf[], | ||
unsigned int | release_ver, | ||
unsigned int | fileformat_ver, | ||
GError ** | err | ||
) |
[in] | toplevel | The TOPLEVEL object |
[in] | buf | a text buffer (usually a line of a schematic file) |
[in] | release_ver | The release number gEDA |
[in] | fileformat_ver | a integer value of the file format |
Definition at line 146 of file o_net_basic.c.
[in] | toplevel | a TOPLEVEL structure |
[in] | object | a net OBJECT |
Definition at line 190 of file o_net_basic.c.
[in] | toplevel | The TOPLEVEL object |
[in] | dx | The x-distance to move the object |
[in] | dy | The y-distance to move the object |
[in] | object | The net OBJECT to be moved |
Definition at line 214 of file o_net_basic.c.
[in] | toplevel | The TOPLEVEL object |
[in] | o_current | The object that is copied |
Definition at line 237 of file o_net_basic.c.
[in] | toplevel | The TOPLEVEL object |
[in] | fp | pointer to a FILE structure |
[in] | o_current | The OBJECT to print |
[in] | origin_x | x-coord of the postscript origin |
[in] | origin_y | y-coord of the postscript origin |
Definition at line 263 of file o_net_basic.c.
void o_net_rotate_world | ( | TOPLEVEL * | toplevel, |
int | world_centerx, | ||
int | world_centery, | ||
int | angle, | ||
OBJECT * | object | ||
) |
[in] | toplevel | The TOPLEVEL object |
[in] | world_centerx | x-coord of the rotation center |
[in] | world_centery | y-coord of the rotation center |
[in] | angle | The angle to rotat the net object |
[in] | object | The net object |
Definition at line 303 of file o_net_basic.c.
void o_net_mirror_world | ( | TOPLEVEL * | toplevel, |
int | world_centerx, | ||
int | world_centery, | ||
OBJECT * | object | ||
) |
[in] | toplevel | The TOPLEVEL object |
[in] | world_centerx | x-coord of the mirror position |
[in] | world_centery | y-coord of the mirror position |
[in] | object | The net object |
Definition at line 341 of file o_net_basic.c.
int o_net_orientation | ( | OBJECT * | object | ) |
[in] | object | The net object |
Definition at line 362 of file o_net_basic.c.
static void o_net_consolidate_lowlevel | ( | OBJECT * | object, |
OBJECT * | del_object, | ||
int | orient | ||
) | [static] |
[in] | object | A net object to extend |
[in] | del_object | A net object to be merged into object |
[in] | orient | The orientation of both net objects |
Definition at line 390 of file o_net_basic.c.
static int o_net_consolidate_nomidpoint | ( | OBJECT * | object, |
int | x, | ||
int | y | ||
) | [static] |
object | a net OBJECT to check |
x | x-coord of the connection location |
y | y-coord of the connection location |
Definition at line 474 of file o_net_basic.c.
toplevel | The TOPLEVEL object |
object | The object to consolidate |
Definition at line 509 of file o_net_basic.c.
toplevel | The TOPLEVEL object. |
page | The PAGE to consolidate nets in. |
Definition at line 590 of file o_net_basic.c.
toplevel | The TOPLEVEL object |
object | The net OBJECT to modify |
x | new x-coord of the net point |
y | new y-coord of the net point |
whichone | net point to modify |
Definition at line 630 of file o_net_basic.c.
For the purpose of this function, an entity is:
Computed number of entities is afterwards stored in all traversed net segments.
The algorithm does not handle corner cases, ie two bus segments belonging to the same bus will be counted twice.
[in] | toplevel | The TOPLEVEL object |
[in] | o_current | The NET OBJECT to check connectivity of |
Definition at line 661 of file o_net_basic.c.
[in] | toplevel | The TOPLEVEL object |
[in] | o_current | The OBJECT to check connectivity of |
Definition at line 779 of file o_net_basic.c.