KiCad PCB EDA Suite
ERECT Struct Reference

Eagle XML rectangle in binary. More...

Public Member Functions

 ERECT (CPTREE &aRect)
 

Public Attributes

double x1
 
double y1
 
double x2
 
double y2
 
int layer
 
opt_erot rot
 

Detailed Description

Eagle XML rectangle in binary.

Definition at line 420 of file eagle_plugin.cpp.

Constructor & Destructor Documentation

ERECT::ERECT ( CPTREE aRect)

Definition at line 432 of file eagle_plugin.cpp.

References parseOptionalEROT().

433 {
434  CPTREE& attribs = aRect.get_child( "<xmlattr>" );
435 
436  /*
437  <!ELEMENT rectangle EMPTY>
438  <!ATTLIST rectangle
439  x1 %Coord; #REQUIRED
440  y1 %Coord; #REQUIRED
441  x2 %Coord; #REQUIRED
442  y2 %Coord; #REQUIRED
443  layer %Layer; #REQUIRED
444  rot %Rotation; "R0"
445  >
446  */
447 
448  x1 = attribs.get<double>( "x1" );
449  y1 = attribs.get<double>( "y1" );
450  x2 = attribs.get<double>( "x2" );
451  y2 = attribs.get<double>( "y2" );
452  layer = attribs.get<int>( "layer" );
453  rot = parseOptionalEROT( attribs );
454 }
const PTREE CPTREE
Definition: eagle_plugin.h:63
static opt_erot parseOptionalEROT(CPTREE &attribs)
Eagle "rot" fields are optional, handle that by returning opt_erot.
double x1
opt_erot rot
double y1
double x2
double y2

Member Data Documentation

int ERECT::layer

Definition at line 426 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageRectangle().

opt_erot ERECT::rot

Definition at line 427 of file eagle_plugin.cpp.

double ERECT::x1

Definition at line 422 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageRectangle().

double ERECT::x2

Definition at line 424 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageRectangle().

double ERECT::y1

Definition at line 423 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageRectangle().

double ERECT::y2

Definition at line 425 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageRectangle().


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