2011-09-20 13:57:40 +00:00
|
|
|
/**
|
|
|
|
* @file ar_protos.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _AR_PROTOS_H_
|
|
|
|
#define _AR_PROTOS_H_
|
|
|
|
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <autorout.h>
|
2011-09-20 13:57:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PCB_EDIT_FRAME;
|
|
|
|
class BOARD;
|
|
|
|
class D_PAD;
|
|
|
|
class RATSNEST_ITEM;
|
2011-09-23 13:57:12 +00:00
|
|
|
class TRACK;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2011-03-09 14:30:39 +00:00
|
|
|
|
|
|
|
int Propagation( PCB_EDIT_FRAME* frame );
|
|
|
|
|
2011-09-20 13:57:40 +00:00
|
|
|
/* Initialize a color value, the cells included in the board edge of the
|
|
|
|
* pad surface by pt_pad, with the margin reserved for isolation and the
|
|
|
|
* half width of the runway
|
|
|
|
* Parameters:
|
|
|
|
* Pt_pad: pointer to the description of the pad
|
|
|
|
* color: mask write in cells
|
|
|
|
* margin: add a value to the radius or half the score pad
|
|
|
|
* op_logic: type of writing in the cell (WRITE, OR)
|
|
|
|
*/
|
|
|
|
void PlacePad( BOARD* Pcb, D_PAD* pt_pad, int type, int marge, int op_logic );
|
2009-11-12 15:43:38 +00:00
|
|
|
|
|
|
|
/* Draws a segment of track on the board. */
|
2011-09-20 13:57:40 +00:00
|
|
|
void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int type, int marge, int op_logic );
|
2009-11-12 15:43:38 +00:00
|
|
|
|
|
|
|
/* Uses the color value of all cells included in the board
|
|
|
|
* coord of the rectangle ux0, uy0 (top right corner)
|
|
|
|
* a ux1, uy1 (lower left corner) (coord PCB)
|
|
|
|
* the rectangle is horizontal (or vertical)
|
|
|
|
* masque_layer = mask layers;
|
2011-09-20 13:57:40 +00:00
|
|
|
* op_logic = WRITE_CELL, WRITE_OR_CELL, WRITE_XOR_CELL, WRITE_AND_CELL
|
2009-11-12 15:43:38 +00:00
|
|
|
*/
|
2011-09-20 13:57:40 +00:00
|
|
|
void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
|
|
|
|
int side, int color, int op_logic);
|
2009-11-12 15:43:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Same as above, but the rectangle is inclined angle angle. */
|
2011-09-20 13:57:40 +00:00
|
|
|
void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
|
|
|
|
int angle, int masque_layer, int color, int op_logic );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* QUEUE.CPP */
|
2009-11-12 15:43:38 +00:00
|
|
|
void FreeQueue();
|
2007-09-01 12:00:30 +00:00
|
|
|
void InitQueue();
|
2007-06-05 12:10:51 +00:00
|
|
|
void GetQueue( int *, int *, int *, int *, int * );
|
|
|
|
int SetQueue( int, int, int, int, int, int, int );
|
|
|
|
void ReSetQueue( int, int, int, int, int, int, int );
|
|
|
|
|
|
|
|
/* WORK.CPP */
|
2007-09-01 12:00:30 +00:00
|
|
|
void InitWork();
|
|
|
|
void ReInitWork();
|
2009-05-24 18:28:36 +00:00
|
|
|
int SetWork( int, int, int , int, int, RATSNEST_ITEM *, int );
|
|
|
|
void GetWork( int *, int *, int *, int *, int *, RATSNEST_ITEM ** );
|
2007-09-01 12:00:30 +00:00
|
|
|
void SortWork(); /* order the work items; shortest first */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* DIST.CPP */
|
|
|
|
int GetApxDist( int, int, int, int );
|
|
|
|
int CalcDist( int, int, int ,int );
|
|
|
|
|
|
|
|
/* BOARD.CPP */
|
2009-11-12 15:43:38 +00:00
|
|
|
int Build_Work( BOARD * Pcb );
|
|
|
|
void PlaceCells( BOARD * Pcb, int net_code, int flag = 0 );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2011-03-09 14:30:39 +00:00
|
|
|
MATRIX_CELL GetCell( int aRow, int aCol, int aSide);
|
|
|
|
void SetCell( int aRow, int aCol, int aSide, MATRIX_CELL aCell);
|
|
|
|
void OrCell( int aRow, int aCol, int aSide, MATRIX_CELL aCell);
|
|
|
|
void XorCell( int aRow, int aCol, int aSide, MATRIX_CELL aCell);
|
|
|
|
void AndCell( int aRow, int aCol, int aSide, MATRIX_CELL aCell);
|
|
|
|
void AddCell( int aRow, int aCol, int aSide, MATRIX_CELL aCell);
|
|
|
|
DIST_CELL GetDist( int aRow, int aCol, int aSide );
|
|
|
|
void SetDist( int aRow, int aCol, int aSide, DIST_CELL );
|
|
|
|
int GetDir( int aRow, int aCol, int aSide );
|
|
|
|
void SetDir( int aRow, int aCol, int aSide, int aDir);
|
2011-09-20 13:57:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif // _AR_PROTOS_H_
|