KiCad PCB EDA Suite
ETEXT Struct Reference

Eagle text element. More...

#include <eagle_parser.h>

Public Types

enum  {
  CENTER, CENTER_LEFT, TOP_CENTER, TOP_LEFT,
  TOP_RIGHT, CENTER_RIGHT = -CENTER_LEFT, BOTTOM_CENTER = -TOP_CENTER, BOTTOM_LEFT = -TOP_RIGHT,
  BOTTOM_RIGHT = -TOP_LEFT
}
 

Public Member Functions

 ETEXT (wxXmlNode *aText)
 

Public Attributes

string text
 
double x
 
double y
 
double size
 
int layer
 
opt_string font
 
opt_double ratio
 
opt_erot rot
 
opt_int align
 

Detailed Description

Eagle text element.

Definition at line 515 of file eagle_parser.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CENTER 
CENTER_LEFT 
TOP_CENTER 
TOP_LEFT 
TOP_RIGHT 
CENTER_RIGHT 
BOTTOM_CENTER 
BOTTOM_LEFT 
BOTTOM_RIGHT 

Definition at line 526 of file eagle_parser.h.

526  { // for align
527  CENTER,
528  CENTER_LEFT,
529  TOP_CENTER,
530  TOP_LEFT,
531  TOP_RIGHT,
532 
533  // opposites are -1 x above, used by code tricks in here
538  };

Constructor & Destructor Documentation

ETEXT::ETEXT ( wxXmlNode *  aText)

Definition at line 336 of file eagle_parser.cpp.

References align, BOTTOM_CENTER, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER, CENTER_LEFT, CENTER_RIGHT, font, layer, ratio, rot, size, text, TOP_CENTER, TOP_LEFT, TOP_RIGHT, x, and y.

337 {
338  /*
339  <!ELEMENT text (#PCDATA)>
340  <!ATTLIST text
341  x %Coord; #REQUIRED
342  y %Coord; #REQUIRED
343  size %Dimension; #REQUIRED
344  layer %Layer; #REQUIRED
345  font %TextFont; "proportional"
346  ratio %Int; "8"
347  rot %Rotation; "R0"
348  align %Align; "bottom-left"
349  >
350  */
351 
352  text = aText->GetNodeContent();
353  x = parseRequiredAttribute<double>( aText, "x" );
354  y = parseRequiredAttribute<double>( aText, "y" );
355  size = parseRequiredAttribute<double>( aText, "size" );
356  layer = parseRequiredAttribute<int>( aText, "layer" );
357 
358  font = parseOptionalAttribute<string>( aText, "font" );
359  ratio = parseOptionalAttribute<double>( aText, "ratio" );
360  rot = parseOptionalAttribute<EROT>( aText, "rot" );
361 
362  opt_string stemp = parseOptionalAttribute<string>( aText, "align" );
363 
364  // (bottom-left | bottom-center | bottom-right | center-left |
365  // center | center-right | top-left | top-center | top-right)
366  if( stemp == "center" )
368  else if( stemp == "center-right" )
370  else if( stemp == "top-left" )
372  else if( stemp == "top-center" )
374  else if( stemp == "top-right" )
376  else if( stemp == "bottom-left" )
378  else if( stemp == "bottom-center" )
380  else if( stemp == "bottom-right" )
382  else if( stemp == "center-left" )
384 }
double size
Definition: eagle_parser.h:520
opt_double ratio
Definition: eagle_parser.h:523
string text
Definition: eagle_parser.h:517
opt_int align
Definition: eagle_parser.h:540
opt_erot rot
Definition: eagle_parser.h:524
double y
Definition: eagle_parser.h:519
opt_string font
Definition: eagle_parser.h:522
int layer
Definition: eagle_parser.h:521
double x
Definition: eagle_parser.h:518

Member Data Documentation

opt_int ETEXT::align

Definition at line 540 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

opt_string ETEXT::font

Definition at line 522 of file eagle_parser.h.

Referenced by ETEXT().

int ETEXT::layer

Definition at line 521 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

opt_double ETEXT::ratio

Definition at line 523 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

opt_erot ETEXT::rot

Definition at line 524 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

double ETEXT::size

Definition at line 520 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

string ETEXT::text

Definition at line 517 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

double ETEXT::x

Definition at line 518 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().

double ETEXT::y

Definition at line 519 of file eagle_parser.h.

Referenced by ETEXT(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageText().


The documentation for this struct was generated from the following files: