|
gschem
|
#include <config.h>#include <stdio.h>#include <math.h>#include <gschem.h>
Go to the source code of this file.
Data Structures | |
| struct | st_halfspace |
Typedefs | |
| typedef struct st_halfspace | HALFSPACE |
Functions | |
| int | mil_x (GSCHEM_TOPLEVEL *w_current, int val) |
| Convert a x coordinate to mils. | |
| int | mil_y (GSCHEM_TOPLEVEL *w_current, int val) |
| Convert a y coordinate to mils. | |
| int | pix_x (GSCHEM_TOPLEVEL *w_current, int val) |
| Convert a x coordinate to pixels. | |
| int | pix_y (GSCHEM_TOPLEVEL *w_current, int val) |
| Convert a y coordinate to pixels. | |
| void | WORLDtoSCREEN (GSCHEM_TOPLEVEL *w_current, int x, int y, int *px, int *py) |
| Transform WORLD coordinates to SCREEN coordinates. | |
| void | SCREENtoWORLD (GSCHEM_TOPLEVEL *w_current, int mx, int my, int *x, int *y) |
| Transform WORLD coordinates to WORLD coordinates. | |
| int | snap_grid (GSCHEM_TOPLEVEL *w_current, int input) |
| Find the closest grid coordinate. | |
| int | SCREENabs (GSCHEM_TOPLEVEL *w_current, int val) |
| Get absolute SCREEN coordinate. | |
| int | WORLDabs (GSCHEM_TOPLEVEL *w_current, int val) |
| Get absolute WORLD coordinate. | |
| static void | WORLDencode_halfspace (GSCHEM_TOPLEVEL *w_current, sPOINT *point, HALFSPACE *halfspace) |
| Encode WORLD coordinates as halfspace matrix. | |
| int | WORLDclip_change (GSCHEM_TOPLEVEL *w_current, int *x1, int *y1, int *x2, int *y2) |
| Calculate the cliping region for a set of coordinates. | |
| int | clip_nochange (GSCHEM_TOPLEVEL *w_current, int x1, int y1, int x2, int y2) |
| Check if a set of coordinates are within a clipping region. | |
| int | visible (GSCHEM_TOPLEVEL *w_current, int wleft, int wtop, int wright, int wbottom) |
| Check if a bounding box is visible on the screen. | |
| double | round_5_2_1 (double unrounded) |
| Rounds numbers by a power of 10. | |
| typedef struct st_halfspace HALFSPACE |
| int mil_x | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | val | ||
| ) |
| int mil_y | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | val | ||
| ) |
| int pix_x | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | val | ||
| ) |
| int pix_y | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | val | ||
| ) |
| void WORLDtoSCREEN | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | x, | ||
| int | y, | ||
| int * | px, | ||
| int * | py | ||
| ) |
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in] | x | The x coordinate in WORLD units. |
| [in] | y | The y coordinate in WORLD units. |
| [out] | px | The x coordinate in SCREEN units. |
| [out] | py | The y coordinate in SCREEN units. |
Definition at line 167 of file m_basic.c.

| void SCREENtoWORLD | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | mx, | ||
| int | my, | ||
| int * | x, | ||
| int * | y | ||
| ) |
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in] | mx | The x coordinate in SCREEN units. |
| [in] | my | The y coordinate in SCREEN units. |
| [out] | x | The x coordinate in WORLD units. |
| [out] | y | The y coordinate in WORLD units. |
Definition at line 187 of file m_basic.c.

| int snap_grid | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | input | ||
| ) |
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in] | input | The coordinate to snap. |
Definition at line 202 of file m_basic.c.

| int SCREENabs | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | val | ||
| ) |
| int WORLDabs | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | val | ||
| ) |
| static void WORLDencode_halfspace | ( | GSCHEM_TOPLEVEL * | w_current, |
| sPOINT * | point, | ||
| HALFSPACE * | halfspace | ||
| ) | [static] |
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in] | point | The point in WORLD coordinates to be checked. |
| [out] | halfspace | The created HALFSPACE structure. |
| int WORLDclip_change | ( | GSCHEM_TOPLEVEL * | w_current, |
| int * | x1, | ||
| int * | y1, | ||
| int * | x2, | ||
| int * | y2 | ||
| ) |
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in,out] | x1 | x coordinate of the first screen point. |
| [in,out] | y1 | y coordinate of the first screen point. |
| [in,out] | x2 | x coordinate of the second screen point. |
| [in,out] | y2 | y coordinate of the second screen point. |
Definition at line 346 of file m_basic.c.

| int clip_nochange | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in,out] | x1 | x coordinate of the first screen point. |
| [in,out] | y1 | y coordinate of the first screen point. |
| [in,out] | x2 | x coordinate of the second screen point. |
| [in,out] | y2 | y coordinate of the second screen point. |
Definition at line 477 of file m_basic.c.

| int visible | ( | GSCHEM_TOPLEVEL * | w_current, |
| int | wleft, | ||
| int | wtop, | ||
| int | wright, | ||
| int | wbottom | ||
| ) |
WARNING: top and bottom are mis-named in world-coords, top is the smallest "y" value, and bottom is the largest. Be careful! This doesn't correspond to what you'd expect.
| [in] | w_current | The GSCHEM_TOPLEVEL object. |
| [in] | wleft | Left coordinate of the bounding box. |
| [in] | wtop | Top coordinate of the bounding box. |
| [in] | wright | Right coordinate of the bounding box. |
| [in] | wbottom | Bottom coordinate of the bounding box. |
Definition at line 606 of file m_basic.c.

| double round_5_2_1 | ( | double | unrounded | ) |
| [in] | unrounded | The number to be rounded. |