KiCad PCB EDA Suite
ASCH_POLYGON Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

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

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 333 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_POLYGON()

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

Definition at line 311 of file altium_parser_sch.cpp.

312 {
313  wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::POLYGON );
314 
315  ownerindex = ReadOwnerIndex( aProps );
316  ownerpartid = ReadOwnerPartId( aProps );
317  ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
318 
319  int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
320 
321  for( int i = 1; i <= locationCount; i++ )
322  {
323  const wxString si = std::to_string( i );
324  points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
325  -ReadKiCadUnitFrac( aProps, "Y" + si ) );
326  }
327 
328  lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
329  isSolid = ALTIUM_PARSER::ReadBool( aProps, "ISSOLID", false );
330 
331  color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
332  areacolor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
333 }
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
static bool ReadBool(const std::map< wxString, wxString > &aProps, const wxString &aKey, bool aDefault)
int ReadKiCadUnitFrac(const std::map< wxString, wxString > &aProps, const wxString &aKey)
int ReadOwnerPartId(const std::map< wxString, wxString > &aProperties)
ALTIUM_SCH_RECORD ReadRecord(const std::map< wxString, wxString > &aProps)
std::vector< wxPoint > points
int ReadOwnerIndex(const std::map< wxString, wxString > &aProperties)

References areacolor, color, isSolid, lineWidth, ownerindex, ownerpartdisplaymode, ownerpartid, points, POLYGON, ALTIUM_PARSER::ReadBool(), ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadOwnerIndex(), ReadOwnerPartId(), and ReadRecord().

Member Data Documentation

◆ areacolor

int ASCH_POLYGON::areacolor

Definition at line 345 of file altium_parser_sch.h.

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

◆ color

int ASCH_POLYGON::color

Definition at line 344 of file altium_parser_sch.h.

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

◆ isSolid

bool ASCH_POLYGON::isSolid

Definition at line 342 of file altium_parser_sch.h.

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

◆ lineWidth

int ASCH_POLYGON::lineWidth

Definition at line 341 of file altium_parser_sch.h.

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

◆ ownerindex

int ASCH_POLYGON::ownerindex

Definition at line 335 of file altium_parser_sch.h.

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

◆ ownerpartdisplaymode

int ASCH_POLYGON::ownerpartdisplaymode

Definition at line 337 of file altium_parser_sch.h.

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

◆ ownerpartid

int ASCH_POLYGON::ownerpartid

Definition at line 336 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 339 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: