KiCad PCB EDA Suite
ASCH_POLYGON Struct Reference

#include <altium_parser_sch.h>

Inheritance diagram for ASCH_POLYGON:
ASCH_SHAPE_INTERFACE

Public Member Functions

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

Public Attributes

std::vector< VECTOR2Ipoints
 
int OwnerIndex
 
int OwnerPartID
 
int OwnerPartDisplayMode
 
int LineWidth
 
bool IsSolid
 
int Color
 
int AreaColor
 

Detailed Description

Definition at line 375 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 344 of file altium_parser_sch.cpp.

345{
346 wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::POLYGON );
347
348 OwnerIndex = ReadOwnerIndex( aProps );
349 OwnerPartID = ReadOwnerPartId( aProps );
350 OwnerPartDisplayMode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
351
352 int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
353
354 for( int i = 1; i <= locationCount; i++ )
355 {
356 const wxString si = std::to_string( i );
357 points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
358 -ReadKiCadUnitFrac( aProps, "Y" + si ) );
359 }
360
361 LineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
362 IsSolid = ALTIUM_PARSER::ReadBool( aProps, "ISSOLID", false );
363
364 Color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
365 AreaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
366}
int ReadOwnerPartId(const std::map< wxString, wxString > &aProperties)
int ReadOwnerIndex(const std::map< wxString, wxString > &aProperties)
int ReadKiCadUnitFrac(const std::map< wxString, wxString > &aProps, const wxString &aKey)
ALTIUM_SCH_RECORD ReadRecord(const std::map< wxString, wxString > &aProps)
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)
std::vector< VECTOR2I > points

References ASCH_SHAPE_INTERFACE::AreaColor, ASCH_SHAPE_INTERFACE::Color, ASCH_SHAPE_INTERFACE::IsSolid, ASCH_SHAPE_INTERFACE::LineWidth, ASCH_SHAPE_INTERFACE::OwnerIndex, ASCH_SHAPE_INTERFACE::OwnerPartDisplayMode, ASCH_SHAPE_INTERFACE::OwnerPartID, points, POLYGON, ALTIUM_PARSER::ReadBool(), ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadOwnerIndex(), ReadOwnerPartId(), and ReadRecord().

Member Data Documentation

◆ AreaColor

◆ Color

◆ IsSolid

◆ LineWidth

◆ OwnerIndex

◆ OwnerPartDisplayMode

◆ OwnerPartID

◆ points

std::vector<VECTOR2I> ASCH_POLYGON::points

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