~ubuntu-branches/ubuntu/precise/pcb/precise

« back to all changes in this revision

Viewing changes to src/crosshair.h

  • Committer: Bazaar Package Importer
  • Author(s): Hamish Moffatt
  • Date: 2005-02-20 13:14:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050220131400-pfz66g5vhx0azl8f
Tags: 1.99j+20050127-2
* Improved package description: (closes: #295405)
* Fixed dependency: tk84 -> tk8.4 (closes: #295404)
* Updated README.debian (closes: #269578)
* Applied patch to src/djopt.c to allow compilation with gcc-4.0
  (closes: #294319), thanks to Andreas Jochens for the patch.
* Prevent example files from being compressed

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23
23
 *  Thomas.Nau@rz.uni-ulm.de
24
24
 *
25
 
 *  RCS: $Id: crosshair.h,v 1.1 1998/02/19 18:06:34 sync Exp $
 
25
 *  RCS: $Id: crosshair.h,v 1.5 2005/01/03 12:56:59 danmc Exp $
26
26
 */
27
27
 
28
28
/* prototypes for crosshair routines
36
36
/* ---------------------------------------------------------------------------
37
37
 * fits screen coordinates into grid
38
38
 */
39
 
#define GRIDFIT_X(x,g)  ((((x) -PCB->GridOffsetX) /(g)) *(g) +PCB->GridOffsetX)
40
 
#define GRIDFIT_Y(y,g)  ((((y) -PCB->GridOffsetY) /(g)) *(g) +PCB->GridOffsetY)
 
39
#define GRIDFIT_X(x,g)  (int)(0.5 + ((int)(((x) -PCB->GridOffsetX + g/2) /(g)) *(g)) +PCB->GridOffsetX)
 
40
#define GRIDFIT_Y(y,g)  (int)(0.5 + ((int)(((y) -PCB->GridOffsetY + g/2) /(g)) *(g)) +PCB->GridOffsetY)
41
41
 
42
42
/* ---------------------------------------------------------------------------
43
43
 * all possible states of an attached object
51
51
void    CrosshairOff(Boolean);
52
52
void    HideCrosshair(Boolean);
53
53
void    RestoreCrosshair(Boolean);
54
 
void    MoveCrosshairRelative(Position, Position);
55
 
void    MoveCrosshairAbsolute(Position, Position);
56
 
void    SetCrosshairRange(Position, Position, Position, Position);
 
54
void    MoveCrosshairRelative(LocationType, LocationType);
 
55
Boolean MoveCrosshairAbsolute(LocationType, LocationType);
 
56
void    SetCrosshairRange(LocationType, LocationType, LocationType, LocationType);
57
57
void    InitCrosshair(void);
58
58
void    DestroyCrosshair(void);
59
59
void    DrawMark(Boolean);
 
60
void    FitCrosshairIntoGrid (LocationType, LocationType);
60
61
 
61
62
#endif