pcb 4.1.1
An interactive printed circuit board layout editor.

fontmode.c File Reference

More...

#include "global.h"
#include <math.h>
#include <memory.h>
#include <limits.h>
#include "create.h"
#include "data.h"
#include "draw.h"
#include "misc.h"
#include "move.h"
#include "remove.h"
#include "rtree.h"
#include "strflags.h"
#include "undo.h"
#include "pcb-printf.h"
Include dependency graph for fontmode.c:

Go to the source code of this file.

Defines

#define CELL_SIZE   ((Coord)MIL_TO_COORD(100))
#define CELL_OFFSET   ((Coord)MIL_TO_COORD(10))
#define XYtoSym(x, y)

Functions

static int FontEdit (int argc, char **argv, Coord Ux, Coord Uy)
static int FontSave (int argc, char **argv, Coord Ux, Coord Uy)

Variables

static const char fontedit_syntax [] = "FontEdit()"
static const char fontedit_help [] = "Convert the current font to a PCB for editing."
static const char fontsave_syntax [] = "FontSave()"
static const char fontsave_help [] = "Convert the current PCB back to a font."
HID_Action fontmode_action_list []

Detailed Description

Todo:
We currently hardcode the grid and PCB size.
What we should do in the future is scan the font for its extents, and size the grid appropriately.
Also, when we convert back to a font, we should search the grid for the gridlines and use them to figure out where the symbols are.

Copyright.


PCB, interactive printed circuit board design

Copyright (C) 2006 DJ Delorie

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Contact addresses for paper mail and Email: DJ Delorie, 334 North Road, Deerfield NH 03037-1110, USA dj@delorie.com

Definition in file fontmode.c.


Define Documentation

#define CELL_OFFSET   ((Coord)MIL_TO_COORD(10))

Definition at line 66 of file fontmode.c.

#define CELL_SIZE   ((Coord)MIL_TO_COORD(100))

Definition at line 65 of file fontmode.c.

Referenced by FontEdit(), and FontSave().

#define XYtoSym (   x,
  y 
)
Value:
((x + CELL_OFFSET) / CELL_SIZE - 1 \
                      + 16 * ((y + CELL_OFFSET) / CELL_SIZE - 1))

Definition at line 68 of file fontmode.c.

Referenced by FontSave().


Function Documentation

static int FontSave ( int  argc,
char **  argv,
Coord  Ux,
Coord  Uy 
) [static]

Variable Documentation

const char fontedit_help[] = "Convert the current font to a PCB for editing." [static]

Definition at line 73 of file fontmode.c.

const char fontedit_syntax[] = "FontEdit()" [static]

Definition at line 71 of file fontmode.c.

Initial value:
 {
  {"FontEdit", 0, FontEdit,
   fontedit_help, fontedit_syntax},
  {"FontSave", 0, FontSave,
   fontsave_help, fontsave_syntax}
}

Definition at line 263 of file fontmode.c.

const char fontsave_help[] = "Convert the current PCB back to a font." [static]

Definition at line 182 of file fontmode.c.

const char fontsave_syntax[] = "FontSave()" [static]

Definition at line 180 of file fontmode.c.