KiCad PCB EDA Suite
ASCH_POLYLINE Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

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

Public Attributes

int OwnerIndex
 
int OwnerPartID
 
int OwnerPartDisplayMode
 
std::vector< VECTOR2IPoints
 
int LineWidth
 
int Color
 
ASCH_POLYLINE_LINESTYLE LineStyle
 

Detailed Description

Definition at line 357 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_POLYLINE()

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

Definition at line 314 of file altium_parser_sch.cpp.

315{
316 wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::POLYLINE );
317
318 OwnerIndex = ReadOwnerIndex( aProps );
319 OwnerPartID = ReadOwnerPartId( aProps );
320 OwnerPartDisplayMode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
321
322 int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
323
324 for( int i = 1; i <= locationCount; i++ )
325 {
326 const wxString si = std::to_string( i );
327 Points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
328 -ReadKiCadUnitFrac( aProps, "Y" + si ) );
329 }
330
331 LineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
332 Color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
333
334 int linestyleVar = ALTIUM_PARSER::ReadInt( aProps, "LINESTYLEEXT", 0 );
335
336 // overwrite if present.
337 linestyleVar = ALTIUM_PARSER::ReadInt( aProps, "LINESTYLE", linestyleVar );
338 LineStyle = linestyleVar >= 0 && linestyleVar <= 3 ?
339 static_cast<ASCH_POLYLINE_LINESTYLE>( linestyleVar ) :
341}
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)
ASCH_POLYLINE_LINESTYLE
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
ASCH_POLYLINE_LINESTYLE LineStyle
std::vector< VECTOR2I > Points

References Color, LineStyle, LineWidth, OwnerIndex, OwnerPartDisplayMode, OwnerPartID, Points, POLYLINE, ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadOwnerIndex(), ReadOwnerPartId(), ReadRecord(), and SOLID.

Member Data Documentation

◆ Color

int ASCH_POLYLINE::Color

Definition at line 366 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ LineStyle

ASCH_POLYLINE_LINESTYLE ASCH_POLYLINE::LineStyle

Definition at line 368 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ LineWidth

int ASCH_POLYLINE::LineWidth

Definition at line 365 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ OwnerIndex

int ASCH_POLYLINE::OwnerIndex

Definition at line 359 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ OwnerPartDisplayMode

int ASCH_POLYLINE::OwnerPartDisplayMode

Definition at line 361 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ OwnerPartID

int ASCH_POLYLINE::OwnerPartID

Definition at line 360 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ Points

std::vector<VECTOR2I> ASCH_POLYLINE::Points

Definition at line 363 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().


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