KiCad PCB EDA Suite
ASCH_POLYGON Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

 ASCH_POLYGON (const std::map< wxString, wxString > &aProperties)
 

Public Attributes

int ownerindex
 
int ownerpartid
 
int ownerpartdisplaymode
 
std::vector< wxPoint > points
 
int lineWidth
 
bool isSolid
 
int color
 
int areacolor
 

Detailed Description

Definition at line 295 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_POLYGON()

ASCH_POLYGON::ASCH_POLYGON ( const std::map< wxString, wxString > &  aProperties)
explicit

Definition at line 274 of file altium_parser_sch.cpp.

275 {
276  wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::POLYGON );
277 
278  ownerindex =
279  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERINDEX", ALTIUM_COMPONENT_NONE );
280  ownerpartid =
281  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERPARTID", ALTIUM_COMPONENT_NONE );
283  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERPARTDISPLAYMODE", 0 );
284 
285  int locationCount = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LOCATIONCOUNT", 0 );
286  for( int i = 1; i <= locationCount; i++ )
287  {
288  const wxString si = std::to_string( i );
289  points.emplace_back( PropertiesReadKiCadUnitFrac( aProperties, "X" + si ),
290  -PropertiesReadKiCadUnitFrac( aProperties, "Y" + si ) );
291  }
292 
293  lineWidth = PropertiesReadKiCadUnitFrac( aProperties, "LINEWIDTH" );
294  isSolid = ALTIUM_PARSER::PropertiesReadBool( aProperties, "ISSOLID", false );
295 
296  color = ALTIUM_PARSER::PropertiesReadInt( aProperties, "COLOR", 0 );
297  areacolor = ALTIUM_PARSER::PropertiesReadInt( aProperties, "AREACOLOR", 0 );
298 }
static int PropertiesReadInt(const std::map< wxString, wxString > &aProperties, const wxString &aKey, int aDefault)
static bool PropertiesReadBool(const std::map< wxString, wxString > &aProperties, const wxString &aKey, bool aDefault)
int PropertiesReadKiCadUnitFrac(const std::map< wxString, wxString > &aProperties, const wxString &aKey)
ALTIUM_SCH_RECORD PropertiesReadRecord(const std::map< wxString, wxString > &aProperties)
const int ALTIUM_COMPONENT_NONE
std::vector< wxPoint > points

References ALTIUM_COMPONENT_NONE, areacolor, color, isSolid, lineWidth, ownerindex, ownerpartdisplaymode, ownerpartid, points, POLYGON, ALTIUM_PARSER::PropertiesReadBool(), ALTIUM_PARSER::PropertiesReadInt(), PropertiesReadKiCadUnitFrac(), and PropertiesReadRecord().

Member Data Documentation

◆ areacolor

int ASCH_POLYGON::areacolor

Definition at line 307 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ color

int ASCH_POLYGON::color

Definition at line 306 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ isSolid

bool ASCH_POLYGON::isSolid

Definition at line 304 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ lineWidth

int ASCH_POLYGON::lineWidth

Definition at line 303 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ ownerindex

int ASCH_POLYGON::ownerindex

Definition at line 297 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ ownerpartdisplaymode

int ASCH_POLYGON::ownerpartdisplaymode

Definition at line 299 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ ownerpartid

int ASCH_POLYGON::ownerpartid

Definition at line 298 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().

◆ points

std::vector<wxPoint> ASCH_POLYGON::points

Definition at line 301 of file altium_parser_sch.h.

Referenced by ASCH_POLYGON(), and SCH_ALTIUM_PLUGIN::ParsePolygon().


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