#include <config.h>
#include <stdio.h>
#include <math.h>
#include "gschem.h"
Go to the source code of this file.
Defines |
#define | MAGNETIC_HALFSIZE 6 |
#define | MAGNETIC_PIN_REACH 50 |
#define | MAGNETIC_NET_REACH 20 |
#define | MAGNETIC_BUS_REACH 30 |
#define | MAGNETIC_PIN_WEIGHT 5.0 |
#define | MAGNETIC_NET_WEIGHT 2.0 |
#define | MAGNETIC_BUS_WEIGHT 3.0 |
#define | QUADRANT1 0x01 |
#define | QUADRANT2 0x02 |
#define | QUADRANT3 0x04 |
#define | QUADRANT4 0x08 |
Functions |
void | o_net_reset (GSCHEM_TOPLEVEL *w_current) |
| Reset all variables used for net drawing.
|
void | o_net_draw (GSCHEM_TOPLEVEL *w_current, OBJECT *o_current) |
void | o_net_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current) |
void | o_net_draw_stretch (GSCHEM_TOPLEVEL *w_current, int dx, int dy, int whichone, OBJECT *o_current) |
void | o_net_guess_direction (GSCHEM_TOPLEVEL *w_current, int wx, int wy) |
| guess the best direction for the next net drawing action
|
void | o_net_find_magnetic (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
| find the closest possible location to connect to
|
void | o_net_finishmagnetic (GSCHEM_TOPLEVEL *w_current) |
| calcutates the net route to the magnetic marker
|
void | o_net_start_magnetic (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
| callback function to draw a net marker in magnetic mode
|
void | o_net_start (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
| set the start point of a new net
|
int | o_net_end (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
| finish a net drawing action
|
void | o_net_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
| erase and redraw the rubber lines when drawing a net
|
void | o_net_draw_rubber (GSCHEM_TOPLEVEL *w_current) |
| draw rubbernet lines to the gc
|
void | o_net_invalidate_rubber (GSCHEM_TOPLEVEL *w_current) |
int | o_net_add_busrippers (GSCHEM_TOPLEVEL *w_current, OBJECT *net_obj, GList *prev_conn_objects) |
Define Documentation
#define MAGNETIC_HALFSIZE 6 |
#define MAGNETIC_PIN_REACH 50 |
#define MAGNETIC_NET_REACH 20 |
#define MAGNETIC_BUS_REACH 30 |
#define MAGNETIC_PIN_WEIGHT 5.0 |
#define MAGNETIC_NET_WEIGHT 2.0 |
#define MAGNETIC_BUS_WEIGHT 3.0 |
Function Documentation
- Function Description
- This function resets all variables from GSCHEM_TOPLEVEL that are used for net drawing. This function should be called when escaping from a net drawing action or before entering it.
Definition at line 59 of file o_net.c.
- Todo:
- Finish function documentation!!!
- Function Description
Definition at line 73 of file o_net.c.
void o_net_draw_place |
( |
GSCHEM_TOPLEVEL * |
w_current, |
|
|
int |
dx, |
|
|
int |
dy, |
|
|
OBJECT * |
o_current |
|
) |
| |
- Todo:
- Finish function documentation!!!
- Function Description
Definition at line 116 of file o_net.c.
void o_net_draw_stretch |
( |
GSCHEM_TOPLEVEL * |
w_current, |
|
|
int |
dx, |
|
|
int |
dy, |
|
|
int |
whichone, |
|
|
OBJECT * |
o_current |
|
) |
| |
- Todo:
- Finish function documentation!!!
- Function Description
Definition at line 140 of file o_net.c.
- Function Description
- This function checks all connectable objects at a starting point. It determines the best drawing direction for each quadrant of the possible net endpoint.
The directions are stored in the GSCHEM_TOPLEVEL->net_direction variable as a bitfield.
Definition at line 180 of file o_net.c.
- Function Description
- This function calculates the distance to all connectable objects and searches the closest connection point. It searches for pins, nets and busses.
The connection point is stored in GSCHEM_TOPLEVEL->magnetic_wx and GSCHEM_TOPLEVEL->magnetic_wy. If no connection is found. Both variables are set to -1.
Definition at line 303 of file o_net.c.
- Function Description
- Depending on the two rubbernet lines from start to last and from last to second, the 3 coordinates are manipulated to find a way to the magnetic marker.
Definition at line 438 of file o_net.c.
void o_net_start_magnetic |
( |
GSCHEM_TOPLEVEL * |
w_current, |
|
|
int |
w_x, |
|
|
int |
w_y |
|
) |
| |
- Function Description
- If the mouse is moved, this function is called to update the position of the magnetic marker. If the controllkey is pressed the magnetic marker follows the mouse.
Definition at line 498 of file o_net.c.
- Function Description
- This function sets the start point of a new net at the position of the cursor. If we have a visible magnetic marker, we use that instead of the cursor position
Definition at line 521 of file o_net.c.
- Function Description
- This function finishes the drawing of a net. If we have a visible magnetic marker, we use that instead of the current cursor position.
The rubber nets are removed, the nets and cues are drawn and the net is added to the TOPLEVEL structure.
The function returns TRUE if it has drawn a net, FALSE otherwise.
Definition at line 554 of file o_net.c.
- Function Description
- This function draws the rubbernet lines when drawing a net.
Definition at line 676 of file o_net.c.
- Function Description
- This function draws the rubbernets to the graphic context
Definition at line 743 of file o_net.c.
- Todo:
- Finish function documentation!!!
- Function Description
Definition at line 782 of file o_net.c.
int o_net_add_busrippers |
( |
GSCHEM_TOPLEVEL * |
w_current, |
|
|
OBJECT * |
net_obj, |
|
|
GList * |
prev_conn_objects |
|
) |
| |
- Todo:
- Finish function documentation!!!
- Function Description
Definition at line 836 of file o_net.c.