KiCad PCB EDA Suite
legacy_plugin.cpp File Reference
#include <cmath>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <wx/ffile.h>
#include <wx/string.h>
#include <legacy_plugin.h>
#include <kicad_string.h>
#include <macros.h>
#include <properties.h>
#include <zones.h>
#include <class_board.h>
#include <class_module.h>
#include <class_track.h>
#include <class_pcb_text.h>
#include <class_zone.h>
#include <class_dimension.h>
#include <class_drawsegment.h>
#include <class_mire.h>
#include <class_edge_mod.h>
#include <3d_cache/3d_info.h>
#include <pcb_plot_params.h>
#include <pcb_plot_params_parser.h>
#include <drawtxt.h>
#include <convert_to_biu.h>
#include <trigo.h>
#include <build_version.h>
#include <boost/ptr_container/ptr_map.hpp>
#include <wx/filename.h>

Go to the source code of this file.

Classes

struct  LP_CACHE
 Class LP_CACHE assists only for the footprint portion of the PLUGIN API, and only for the LEGACY_PLUGIN, so therefore is private to this implementation file, i.e. More...
 

Macros

#define VERSION_ERROR_FORMAT   _( "File '%s' is format version: %d.\nI only support format version <= %d.\nPlease upgrade Pcbnew to load this file." )
 
#define UNKNOWN_GRAPHIC_FORMAT   _( "unknown graphic type: %d")
 
#define UNKNOWN_PAD_FORMAT   _( "unknown pad type: %d")
 
#define UNKNOWN_PAD_ATTRIBUTE   _( "unknown pad attribute: %d" )
 
#define FIRST_LAYER   0
 
#define FIRST_COPPER_LAYER   0
 
#define LAYER_N_BACK   0
 
#define LAYER_N_2   1
 
#define LAYER_N_3   2
 
#define LAYER_N_4   3
 
#define LAYER_N_5   4
 
#define LAYER_N_6   5
 
#define LAYER_N_7   6
 
#define LAYER_N_8   7
 
#define LAYER_N_9   8
 
#define LAYER_N_10   9
 
#define LAYER_N_11   10
 
#define LAYER_N_12   11
 
#define LAYER_N_13   12
 
#define LAYER_N_14   13
 
#define LAYER_N_15   14
 
#define LAYER_N_FRONT   15
 
#define LAST_COPPER_LAYER   LAYER_N_FRONT
 
#define FIRST_NON_COPPER_LAYER   16
 
#define ADHESIVE_N_BACK   16
 
#define ADHESIVE_N_FRONT   17
 
#define SOLDERPASTE_N_BACK   18
 
#define SOLDERPASTE_N_FRONT   19
 
#define SILKSCREEN_N_BACK   20
 
#define SILKSCREEN_N_FRONT   21
 
#define SOLDERMASK_N_BACK   22
 
#define SOLDERMASK_N_FRONT   23
 
#define DRAW_N   24
 
#define COMMENT_N   25
 
#define ECO1_N   26
 
#define ECO2_N   27
 
#define EDGE_N   28
 
#define LAST_NON_COPPER_LAYER   28
 
#define LAYER_BACK   (1 << LAYER_N_BACK)
 bit mask for copper layer More...
 
#define LAYER_2   (1 << LAYER_N_2)
 bit mask for layer 2 More...
 
#define LAYER_3   (1 << LAYER_N_3)
 bit mask for layer 3 More...
 
#define LAYER_4   (1 << LAYER_N_4)
 bit mask for layer 4 More...
 
#define LAYER_5   (1 << LAYER_N_5)
 bit mask for layer 5 More...
 
#define LAYER_6   (1 << LAYER_N_6)
 bit mask for layer 6 More...
 
#define LAYER_7   (1 << LAYER_N_7)
 bit mask for layer 7 More...
 
#define LAYER_8   (1 << LAYER_N_8)
 bit mask for layer 8 More...
 
#define LAYER_9   (1 << LAYER_N_9)
 bit mask for layer 9 More...
 
#define LAYER_10   (1 << LAYER_N_10)
 bit mask for layer 10 More...
 
#define LAYER_11   (1 << LAYER_N_11)
 bit mask for layer 11 More...
 
#define LAYER_12   (1 << LAYER_N_12)
 bit mask for layer 12 More...
 
#define LAYER_13   (1 << LAYER_N_13)
 bit mask for layer 13 More...
 
#define LAYER_14   (1 << LAYER_N_14)
 bit mask for layer 14 More...
 
#define LAYER_15   (1 << LAYER_N_15)
 bit mask for layer 15 More...
 
#define LAYER_FRONT   (1 << LAYER_N_FRONT)
 bit mask for component layer More...
 
#define ADHESIVE_LAYER_BACK   (1 << ADHESIVE_N_BACK)
 
#define ADHESIVE_LAYER_FRONT   (1 << ADHESIVE_N_FRONT)
 
#define SOLDERPASTE_LAYER_BACK   (1 << SOLDERPASTE_N_BACK)
 
#define SOLDERPASTE_LAYER_FRONT   (1 << SOLDERPASTE_N_FRONT)
 
#define SILKSCREEN_LAYER_BACK   (1 << SILKSCREEN_N_BACK)
 
#define SILKSCREEN_LAYER_FRONT   (1 << SILKSCREEN_N_FRONT)
 
#define SOLDERMASK_LAYER_BACK   (1 << SOLDERMASK_N_BACK)
 
#define SOLDERMASK_LAYER_FRONT   (1 << SOLDERMASK_N_FRONT)
 
#define DRAW_LAYER   (1 << DRAW_N)
 
#define COMMENT_LAYER   (1 << COMMENT_N)
 
#define ECO1_LAYER   (1 << ECO1_N)
 
#define ECO2_LAYER   (1 << ECO2_N)
 
#define EDGE_LAYER   (1 << EDGE_N)
 
#define ALL_NO_CU_LAYERS   0x1FFF0000
 
#define ALL_CU_LAYERS   0x0000FFFF
 
#define FRONT_TECH_LAYERS
 
#define BACK_TECH_LAYERS
 
#define ALL_TECH_LAYERS   (FRONT_TECH_LAYERS | BACK_TECH_LAYERS)
 
#define BACK_LAYERS   (LAYER_BACK | BACK_TECH_LAYERS)
 
#define FRONT_LAYERS   (LAYER_FRONT | FRONT_TECH_LAYERS)
 
#define ALL_USER_LAYERS   (DRAW_LAYER | COMMENT_LAYER | ECO1_LAYER | ECO2_LAYER )
 
#define NO_LAYERS   0x00000000
 
#define PCB_LEGACY_INTERNAL_UNIT   10000
 
#define SZ(x)   (sizeof(x)-1)
 Get the length of a string constant, at compile time. More...
 
#define MASK(x)   (1<<(x))
 
#define TESTLINE(x)   ( !strncasecmp( line, x, SZ( x ) ) && isSpace( line[SZ( x )] ) )
 C string compare test for a specific length of characters. More...
 
#define TESTSUBSTR(x)   ( !strncasecmp( line, x, SZ( x ) ) )
 C sub-string compare test for a specific length of characters. More...
 
#define READLINE(rdr)   rdr->ReadLine()
 

Typedefs

typedef LEGACY_PLUGIN::BIU BIU
 
typedef unsigned LEG_MASK
 
typedef unsigned LAYER_MSK
 
typedef boost::ptr_map< std::string, MODULEMODULE_MAP
 
typedef MODULE_MAP::iterator MODULE_ITER
 
typedef MODULE_MAP::const_iterator MODULE_CITER
 

Functions

static bool isSpace (int c)
 
static EDA_TEXT_HJUSTIFY_T horizJustify (const char *horizontal)
 
static EDA_TEXT_VJUSTIFY_T vertJustify (const char *vertical)
 
int layerMaskCountSet (LEG_MASK aMask)
 Count the number of set layers in the mask. More...
 
bool is_leg_copperlayer_valid (int aCu_Count, LAYER_NUM aLegacyLayerNum)
 
static int intParse (const char *next, const char **out=NULL)
 Function intParse parses an ASCII integer string with possible leading whitespace into an integer and updates the pointer at out if it is not NULL, just like "man strtol()". More...
 
static LAYER_NUM layerParse (const char *next, const char **out=NULL)
 Function layerParse Like intParse but returns a LAYER_NUM. More...
 
static long hexParse (const char *next, const char **out=NULL)
 Function hexParse parses an ASCII hex integer string with possible leading whitespace into a long integer and updates the pointer at out if it is not NULL, just like "man strtol". More...
 

Variables

static const char delims [] = " \t\r\n"
 

Macro Definition Documentation

#define ADHESIVE_LAYER_BACK   (1 << ADHESIVE_N_BACK)

Definition at line 157 of file legacy_plugin.cpp.

#define ADHESIVE_LAYER_FRONT   (1 << ADHESIVE_N_FRONT)

Definition at line 158 of file legacy_plugin.cpp.

#define ADHESIVE_N_BACK   16

Definition at line 124 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define ADHESIVE_N_FRONT   17

Definition at line 125 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define ALL_CU_LAYERS   0x0000FFFF
#define ALL_NO_CU_LAYERS   0x1FFF0000

Definition at line 174 of file legacy_plugin.cpp.

#define ALL_TECH_LAYERS   (FRONT_TECH_LAYERS | BACK_TECH_LAYERS)

Definition at line 180 of file legacy_plugin.cpp.

#define ALL_USER_LAYERS   (DRAW_LAYER | COMMENT_LAYER | ECO1_LAYER | ECO2_LAYER )

Definition at line 184 of file legacy_plugin.cpp.

#define BACK_LAYERS   (LAYER_BACK | BACK_TECH_LAYERS)

Definition at line 181 of file legacy_plugin.cpp.

#define BACK_TECH_LAYERS
Value:
#define ADHESIVE_LAYER_BACK
#define SOLDERPASTE_LAYER_BACK
#define SOLDERMASK_LAYER_BACK
#define SILKSCREEN_LAYER_BACK

Definition at line 178 of file legacy_plugin.cpp.

#define COMMENT_LAYER   (1 << COMMENT_N)

Definition at line 166 of file legacy_plugin.cpp.

#define COMMENT_N   25

Definition at line 133 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define DRAW_LAYER   (1 << DRAW_N)

Definition at line 165 of file legacy_plugin.cpp.

#define DRAW_N   24

Definition at line 132 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define ECO1_LAYER   (1 << ECO1_N)

Definition at line 167 of file legacy_plugin.cpp.

#define ECO1_N   26

Definition at line 134 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define ECO2_LAYER   (1 << ECO2_N)

Definition at line 168 of file legacy_plugin.cpp.

#define ECO2_N   27

Definition at line 135 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define EDGE_LAYER   (1 << EDGE_N)

Definition at line 169 of file legacy_plugin.cpp.

#define EDGE_N   28

Definition at line 136 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define FIRST_COPPER_LAYER   0
#define FIRST_LAYER   0
#define FRONT_LAYERS   (LAYER_FRONT | FRONT_TECH_LAYERS)

Definition at line 182 of file legacy_plugin.cpp.

#define FRONT_TECH_LAYERS
Value:
#define ADHESIVE_LAYER_FRONT
#define SOLDERMASK_LAYER_FRONT
#define SOLDERPASTE_LAYER_FRONT
#define SILKSCREEN_LAYER_FRONT

Definition at line 176 of file legacy_plugin.cpp.

#define LAST_COPPER_LAYER   LAYER_N_FRONT

Definition at line 121 of file legacy_plugin.cpp.

#define LAYER_10   (1 << LAYER_N_10)

bit mask for layer 10

Definition at line 150 of file legacy_plugin.cpp.

#define LAYER_11   (1 << LAYER_N_11)

bit mask for layer 11

Definition at line 151 of file legacy_plugin.cpp.

#define LAYER_12   (1 << LAYER_N_12)

bit mask for layer 12

Definition at line 152 of file legacy_plugin.cpp.

#define LAYER_13   (1 << LAYER_N_13)

bit mask for layer 13

Definition at line 153 of file legacy_plugin.cpp.

#define LAYER_14   (1 << LAYER_N_14)

bit mask for layer 14

Definition at line 154 of file legacy_plugin.cpp.

#define LAYER_15   (1 << LAYER_N_15)

bit mask for layer 15

Definition at line 155 of file legacy_plugin.cpp.

#define LAYER_2   (1 << LAYER_N_2)

bit mask for layer 2

Definition at line 142 of file legacy_plugin.cpp.

#define LAYER_3   (1 << LAYER_N_3)

bit mask for layer 3

Definition at line 143 of file legacy_plugin.cpp.

#define LAYER_4   (1 << LAYER_N_4)

bit mask for layer 4

Definition at line 144 of file legacy_plugin.cpp.

#define LAYER_5   (1 << LAYER_N_5)

bit mask for layer 5

Definition at line 145 of file legacy_plugin.cpp.

#define LAYER_6   (1 << LAYER_N_6)

bit mask for layer 6

Definition at line 146 of file legacy_plugin.cpp.

#define LAYER_7   (1 << LAYER_N_7)

bit mask for layer 7

Definition at line 147 of file legacy_plugin.cpp.

#define LAYER_8   (1 << LAYER_N_8)

bit mask for layer 8

Definition at line 148 of file legacy_plugin.cpp.

#define LAYER_9   (1 << LAYER_N_9)

bit mask for layer 9

Definition at line 149 of file legacy_plugin.cpp.

#define LAYER_BACK   (1 << LAYER_N_BACK)

bit mask for copper layer

Definition at line 141 of file legacy_plugin.cpp.

Referenced by BOARD_DESIGN_SETTINGS::SetCopperLayerCount().

#define LAYER_FRONT   (1 << LAYER_N_FRONT)

bit mask for component layer

Definition at line 156 of file legacy_plugin.cpp.

Referenced by BOARD_DESIGN_SETTINGS::SetCopperLayerCount().

#define LAYER_N_10   9

Definition at line 114 of file legacy_plugin.cpp.

#define LAYER_N_11   10

Definition at line 115 of file legacy_plugin.cpp.

#define LAYER_N_12   11

Definition at line 116 of file legacy_plugin.cpp.

#define LAYER_N_13   12

Definition at line 117 of file legacy_plugin.cpp.

#define LAYER_N_14   13

Definition at line 118 of file legacy_plugin.cpp.

#define LAYER_N_15   14

Definition at line 119 of file legacy_plugin.cpp.

#define LAYER_N_2   1

Definition at line 106 of file legacy_plugin.cpp.

Referenced by BOARD_DESIGN_SETTINGS::SetCopperLayerCount().

#define LAYER_N_3   2

Definition at line 107 of file legacy_plugin.cpp.

#define LAYER_N_4   3

Definition at line 108 of file legacy_plugin.cpp.

#define LAYER_N_5   4

Definition at line 109 of file legacy_plugin.cpp.

#define LAYER_N_6   5

Definition at line 110 of file legacy_plugin.cpp.

#define LAYER_N_7   6

Definition at line 111 of file legacy_plugin.cpp.

#define LAYER_N_8   7

Definition at line 112 of file legacy_plugin.cpp.

#define LAYER_N_9   8

Definition at line 113 of file legacy_plugin.cpp.

#define LAYER_N_BACK   0
#define LAYER_N_FRONT   15
#define MASK (   x)    (1<<(x))

Definition at line 201 of file legacy_plugin.cpp.

#define NO_LAYERS   0x00000000

Definition at line 186 of file legacy_plugin.cpp.

#define PCB_LEGACY_INTERNAL_UNIT   10000

Definition at line 190 of file legacy_plugin.cpp.

#define SILKSCREEN_LAYER_BACK   (1 << SILKSCREEN_N_BACK)

Definition at line 161 of file legacy_plugin.cpp.

#define SILKSCREEN_LAYER_FRONT   (1 << SILKSCREEN_N_FRONT)

Definition at line 162 of file legacy_plugin.cpp.

#define SILKSCREEN_N_BACK   20
#define SILKSCREEN_N_FRONT   21
#define SOLDERMASK_LAYER_BACK   (1 << SOLDERMASK_N_BACK)

Definition at line 163 of file legacy_plugin.cpp.

#define SOLDERMASK_LAYER_FRONT   (1 << SOLDERMASK_N_FRONT)

Definition at line 164 of file legacy_plugin.cpp.

#define SOLDERMASK_N_BACK   22

Definition at line 130 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define SOLDERMASK_N_FRONT   23

Definition at line 131 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define SOLDERPASTE_LAYER_BACK   (1 << SOLDERPASTE_N_BACK)

Definition at line 159 of file legacy_plugin.cpp.

#define SOLDERPASTE_LAYER_FRONT   (1 << SOLDERPASTE_N_FRONT)

Definition at line 160 of file legacy_plugin.cpp.

#define SOLDERPASTE_N_BACK   18

Definition at line 126 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define SOLDERPASTE_N_FRONT   19

Definition at line 127 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::leg_layer2new().

#define TESTSUBSTR (   x)    ( !strncasecmp( line, x, SZ( x ) ) )

C sub-string compare test for a specific length of characters.

Definition at line 209 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::loadMODULE(), and LEGACY_PLUGIN::loadSETUP().

#define UNKNOWN_GRAPHIC_FORMAT   _( "unknown graphic type: %d")

Definition at line 96 of file legacy_plugin.cpp.

#define UNKNOWN_PAD_ATTRIBUTE   _( "unknown pad attribute: %d" )

Definition at line 98 of file legacy_plugin.cpp.

#define UNKNOWN_PAD_FORMAT   _( "unknown pad type: %d")

Definition at line 97 of file legacy_plugin.cpp.

#define VERSION_ERROR_FORMAT   _( "File '%s' is format version: %d.\nI only support format version <= %d.\nPlease upgrade Pcbnew to load this file." )

Definition at line 95 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::checkVersion().

Typedef Documentation

Definition at line 92 of file legacy_plugin.cpp.

typedef unsigned LAYER_MSK

Definition at line 140 of file legacy_plugin.cpp.

typedef unsigned LEG_MASK

Definition at line 101 of file legacy_plugin.cpp.

typedef MODULE_MAP::const_iterator MODULE_CITER

Definition at line 3142 of file legacy_plugin.cpp.

typedef MODULE_MAP::iterator MODULE_ITER

Definition at line 3141 of file legacy_plugin.cpp.

typedef boost::ptr_map< std::string, MODULE > MODULE_MAP

Definition at line 3140 of file legacy_plugin.cpp.

Function Documentation

static long hexParse ( const char *  next,
const char **  out = NULL 
)
inlinestatic

Function hexParse parses an ASCII hex integer string with possible leading whitespace into a long integer and updates the pointer at out if it is not NULL, just like "man strtol".

I can use this without casting, and its name says what I am doing.

Definition at line 382 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::loadGENERAL(), LEGACY_PLUGIN::loadMODULE(), LEGACY_PLUGIN::loadPAD(), LEGACY_PLUGIN::loadPCB_LINE(), LEGACY_PLUGIN::loadPCB_TARGET(), LEGACY_PLUGIN::loadPCB_TEXT(), LEGACY_PLUGIN::loadSETUP(), and LEGACY_PLUGIN::loadZONE_CONTAINER().

383 {
384  // please just compile this and be quiet, hide casting ugliness:
385  return strtol( next, (char**) out, 16 );
386 }
CITER next(CITER it)
Definition: ptree.cpp:130
static EDA_TEXT_HJUSTIFY_T horizJustify ( const char *  horizontal)
static

Definition at line 243 of file legacy_plugin.cpp.

References GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, and GR_TEXT_HJUSTIFY_RIGHT.

Referenced by LEGACY_PLUGIN::loadMODULE_TEXT(), and LEGACY_PLUGIN::loadPCB_TEXT().

244 {
245  if( !strcmp( "L", horizontal ) )
246  return GR_TEXT_HJUSTIFY_LEFT;
247  if( !strcmp( "R", horizontal ) )
248  return GR_TEXT_HJUSTIFY_RIGHT;
250 }
static int intParse ( const char *  next,
const char **  out = NULL 
)
inlinestatic

Function intParse parses an ASCII integer string with possible leading whitespace into an integer and updates the pointer at out if it is not NULL, just like "man strtol()".

I can use this without casting, and its name says what I am doing.

Definition at line 360 of file legacy_plugin.cpp.

Referenced by layerParse(), LEGACY_PLUGIN::loadDIMENSION(), LEGACY_PLUGIN::loadGENERAL(), LEGACY_PLUGIN::loadMODULE(), LEGACY_PLUGIN::loadMODULE_EDGE(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadNETINFO_ITEM(), LEGACY_PLUGIN::loadPAD(), LEGACY_PLUGIN::loadPCB_LINE(), LEGACY_PLUGIN::loadPCB_TARGET(), LEGACY_PLUGIN::loadPCB_TEXT(), LEGACY_PLUGIN::loadSETUP(), LEGACY_PLUGIN::loadSHEET(), LEGACY_PLUGIN::loadTrackList(), and LEGACY_PLUGIN::loadZONE_CONTAINER().

361 {
362  // please just compile this and be quiet, hide casting ugliness:
363  return (int) strtol( next, (char**) out, 10 );
364 }
CITER next(CITER it)
Definition: ptree.cpp:130
bool is_leg_copperlayer_valid ( int  aCu_Count,
LAYER_NUM  aLegacyLayerNum 
)
inline

Definition at line 279 of file legacy_plugin.cpp.

References LAYER_N_FRONT.

Referenced by LEGACY_PLUGIN::loadPCB_TEXT(), and LEGACY_PLUGIN::loadTrackList().

280 {
281  return ( aLegacyLayerNum == LAYER_N_FRONT ) || ( aLegacyLayerNum < aCu_Count );
282 }
#define LAYER_N_FRONT
static bool isSpace ( int  c)
inlinestatic

Definition at line 199 of file legacy_plugin.cpp.

References delims.

Referenced by LEGACY_PLUGIN::loadPAD().

199 { return strchr( delims, c ) != 0; }
static const char delims[]
int layerMaskCountSet ( LEG_MASK  aMask)
inline

Count the number of set layers in the mask.

Definition at line 263 of file legacy_plugin.cpp.

Referenced by LEGACY_PLUGIN::loadGENERAL().

264 {
265  int count = 0;
266 
267  for( int i = 0; aMask; ++i, aMask >>= 1 )
268  {
269  if( aMask & 1 )
270  ++count;
271  }
272 
273  return count;
274 }
static LAYER_NUM layerParse ( const char *  next,
const char **  out = NULL 
)
inlinestatic

Function layerParse Like intParse but returns a LAYER_NUM.

Definition at line 370 of file legacy_plugin.cpp.

References intParse().

Referenced by LEGACY_PLUGIN::loadMODULE(), LEGACY_PLUGIN::loadMODULE_EDGE(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_LINE(), LEGACY_PLUGIN::loadPCB_TARGET(), LEGACY_PLUGIN::loadPCB_TEXT(), LEGACY_PLUGIN::loadSETUP(), and LEGACY_PLUGIN::loadZONE_CONTAINER().

371 {
372  return intParse( next, out );
373 }
CITER next(CITER it)
Definition: ptree.cpp:130
static int intParse(const char *next, const char **out=NULL)
Function intParse parses an ASCII integer string with possible leading whitespace into an integer and...
static EDA_TEXT_VJUSTIFY_T vertJustify ( const char *  vertical)
static

Definition at line 252 of file legacy_plugin.cpp.

References GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, and GR_TEXT_VJUSTIFY_TOP.

Referenced by LEGACY_PLUGIN::loadMODULE_TEXT(), and LEGACY_PLUGIN::loadPCB_TEXT().

253 {
254  if( !strcmp( "T", vertical ) )
255  return GR_TEXT_VJUSTIFY_TOP;
256  if( !strcmp( "B", vertical ) )
259 }

Variable Documentation