Cleanup.
It's been a long time since line style was specific to plotting.
This commit is contained in:
parent
d4ce2c8982
commit
df83e24eb7
|
@ -598,9 +598,9 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
|
||||||
{
|
{
|
||||||
// The full width of the lines to create
|
// The full width of the lines to create
|
||||||
const float linewidth3DU = TO_3DU( aShape->GetWidth() );
|
const float linewidth3DU = TO_3DU( aShape->GetWidth() );
|
||||||
PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
switch( aShape->GetShape() )
|
switch( aShape->GetShape() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
EDA_SHAPE::EDA_SHAPE( SHAPE_T aType, int aLineWidth, FILL_T aFill ) :
|
EDA_SHAPE::EDA_SHAPE( SHAPE_T aType, int aLineWidth, FILL_T aFill ) :
|
||||||
m_endsSwapped( false ),
|
m_endsSwapped( false ),
|
||||||
m_shape( aType ),
|
m_shape( aType ),
|
||||||
m_stroke( aLineWidth, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
m_stroke( aLineWidth, LINE_STYLE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
||||||
m_fill( aFill ),
|
m_fill( aFill ),
|
||||||
m_fillColor( COLOR4D::UNSPECIFIED ),
|
m_fillColor( COLOR4D::UNSPECIFIED ),
|
||||||
m_rectangleHeight( 0 ),
|
m_rectangleHeight( 0 ),
|
||||||
|
@ -1599,7 +1599,7 @@ int EDA_SHAPE::Compare( const EDA_SHAPE* aOther ) const
|
||||||
TEST_PT( m_poly.CVertex( ii ), aOther->m_poly.CVertex( ii ) );
|
TEST_PT( m_poly.CVertex( ii ), aOther->m_poly.CVertex( ii ) );
|
||||||
|
|
||||||
TEST_E( m_stroke.GetWidth(), aOther->m_stroke.GetWidth() );
|
TEST_E( m_stroke.GetWidth(), aOther->m_stroke.GetWidth() );
|
||||||
TEST( (int) m_stroke.GetPlotStyle(), (int) aOther->m_stroke.GetPlotStyle() );
|
TEST( (int) m_stroke.GetLineStyle(), (int) aOther->m_stroke.GetLineStyle() );
|
||||||
TEST( (int) m_fill, (int) aOther->m_fill );
|
TEST( (int) m_fill, (int) aOther->m_fill );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1718,18 +1718,18 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_SHAPE::SetLineStyle( const PLOT_DASH_TYPE aStyle )
|
void EDA_SHAPE::SetLineStyle( const LINE_STYLE aStyle )
|
||||||
{
|
{
|
||||||
m_stroke.SetPlotStyle( aStyle );
|
m_stroke.SetLineStyle( aStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PLOT_DASH_TYPE EDA_SHAPE::GetLineStyle() const
|
LINE_STYLE EDA_SHAPE::GetLineStyle() const
|
||||||
{
|
{
|
||||||
if( m_stroke.GetPlotStyle() != PLOT_DASH_TYPE::DEFAULT )
|
if( m_stroke.GetLineStyle() != LINE_STYLE::DEFAULT )
|
||||||
return m_stroke.GetPlotStyle();
|
return m_stroke.GetLineStyle();
|
||||||
|
|
||||||
return PLOT_DASH_TYPE::SOLID;
|
return LINE_STYLE::SOLID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1744,7 +1744,7 @@ bool EDA_SHAPE::operator==( const EDA_SHAPE& aOther ) const
|
||||||
if( m_stroke.GetWidth() != aOther.m_stroke.GetWidth() )
|
if( m_stroke.GetWidth() != aOther.m_stroke.GetWidth() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( m_stroke.GetPlotStyle() != aOther.m_stroke.GetPlotStyle() )
|
if( m_stroke.GetLineStyle() != aOther.m_stroke.GetLineStyle() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( m_fillColor != aOther.m_fillColor )
|
if( m_fillColor != aOther.m_fillColor )
|
||||||
|
@ -1791,7 +1791,7 @@ double EDA_SHAPE::Similarity( const EDA_SHAPE& aOther ) const
|
||||||
if( m_stroke.GetWidth() != aOther.m_stroke.GetWidth() )
|
if( m_stroke.GetWidth() != aOther.m_stroke.GetWidth() )
|
||||||
similarity *= 0.9;
|
similarity *= 0.9;
|
||||||
|
|
||||||
if( m_stroke.GetPlotStyle() != aOther.m_stroke.GetPlotStyle() )
|
if( m_stroke.GetLineStyle() != aOther.m_stroke.GetLineStyle() )
|
||||||
similarity *= 0.9;
|
similarity *= 0.9;
|
||||||
|
|
||||||
if( m_fillColor != aOther.m_fillColor )
|
if( m_fillColor != aOther.m_fillColor )
|
||||||
|
@ -1857,7 +1857,7 @@ double EDA_SHAPE::Similarity( const EDA_SHAPE& aOther ) const
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_ENUM_TO_WXANY( SHAPE_T )
|
IMPLEMENT_ENUM_TO_WXANY( SHAPE_T )
|
||||||
IMPLEMENT_ENUM_TO_WXANY( PLOT_DASH_TYPE )
|
IMPLEMENT_ENUM_TO_WXANY( LINE_STYLE )
|
||||||
|
|
||||||
|
|
||||||
static struct EDA_SHAPE_DESC
|
static struct EDA_SHAPE_DESC
|
||||||
|
@ -1872,16 +1872,16 @@ static struct EDA_SHAPE_DESC
|
||||||
.Map( SHAPE_T::POLY, _HKI( "Polygon" ) )
|
.Map( SHAPE_T::POLY, _HKI( "Polygon" ) )
|
||||||
.Map( SHAPE_T::BEZIER, _HKI( "Bezier" ) );
|
.Map( SHAPE_T::BEZIER, _HKI( "Bezier" ) );
|
||||||
|
|
||||||
auto& plotDashTypeEnum = ENUM_MAP<PLOT_DASH_TYPE>::Instance();
|
auto& plotDashTypeEnum = ENUM_MAP<LINE_STYLE>::Instance();
|
||||||
|
|
||||||
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
||||||
{
|
{
|
||||||
plotDashTypeEnum.Map( PLOT_DASH_TYPE::DEFAULT, _HKI( "Default" ) )
|
plotDashTypeEnum.Map( LINE_STYLE::DEFAULT, _HKI( "Default" ) )
|
||||||
.Map( PLOT_DASH_TYPE::SOLID, _HKI( "Solid" ) )
|
.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASH, _HKI( "Dashed" ) )
|
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DOT, _HKI( "Dotted" ) )
|
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOT, _HKI( "Dash-Dot" ) )
|
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
|
@ -1920,8 +1920,8 @@ static struct EDA_SHAPE_DESC
|
||||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
|
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
|
||||||
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ) );
|
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ) );
|
||||||
|
|
||||||
void ( EDA_SHAPE::*lineStyleSetter )( PLOT_DASH_TYPE ) = &EDA_SHAPE::SetLineStyle;
|
void ( EDA_SHAPE::*lineStyleSetter )( LINE_STYLE ) = &EDA_SHAPE::SetLineStyle;
|
||||||
propMgr.AddProperty( new PROPERTY_ENUM<EDA_SHAPE, PLOT_DASH_TYPE>(
|
propMgr.AddProperty( new PROPERTY_ENUM<EDA_SHAPE, LINE_STYLE>(
|
||||||
_HKI( "Line Style" ), lineStyleSetter, &EDA_SHAPE::GetLineStyle ) );
|
_HKI( "Line Style" ), lineStyleSetter, &EDA_SHAPE::GetLineStyle ) );
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, COLOR4D>( _HKI( "Line Color" ),
|
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, COLOR4D>( _HKI( "Line Color" ),
|
||||||
|
|
|
@ -47,7 +47,7 @@ class EDA_ITEM;
|
||||||
class IMPORTED_STROKE
|
class IMPORTED_STROKE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IMPORTED_STROKE( double aWidth = 0, PLOT_DASH_TYPE aPlotStyle = PLOT_DASH_TYPE::DEFAULT,
|
IMPORTED_STROKE( double aWidth = 0, LINE_STYLE aPlotStyle = LINE_STYLE::DEFAULT,
|
||||||
const KIGFX::COLOR4D& aColor = KIGFX::COLOR4D::UNSPECIFIED ) :
|
const KIGFX::COLOR4D& aColor = KIGFX::COLOR4D::UNSPECIFIED ) :
|
||||||
m_width( aWidth ),
|
m_width( aWidth ),
|
||||||
m_plotstyle( aPlotStyle ), m_color( aColor )
|
m_plotstyle( aPlotStyle ), m_color( aColor )
|
||||||
|
@ -57,15 +57,15 @@ public:
|
||||||
double GetWidth() const { return m_width; }
|
double GetWidth() const { return m_width; }
|
||||||
void SetWidth( double aWidth ) { m_width = aWidth; }
|
void SetWidth( double aWidth ) { m_width = aWidth; }
|
||||||
|
|
||||||
PLOT_DASH_TYPE GetPlotStyle() const { return m_plotstyle; }
|
LINE_STYLE GetPlotStyle() const { return m_plotstyle; }
|
||||||
void SetPlotStyle( PLOT_DASH_TYPE aPlotStyle ) { m_plotstyle = aPlotStyle; }
|
void SetPlotStyle( LINE_STYLE aPlotStyle ) { m_plotstyle = aPlotStyle; }
|
||||||
|
|
||||||
KIGFX::COLOR4D GetColor() const { return m_color; }
|
KIGFX::COLOR4D GetColor() const { return m_color; }
|
||||||
void SetColor( const KIGFX::COLOR4D& aColor ) { m_color = aColor; }
|
void SetColor( const KIGFX::COLOR4D& aColor ) { m_color = aColor; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double m_width;
|
double m_width;
|
||||||
PLOT_DASH_TYPE m_plotstyle;
|
LINE_STYLE m_plotstyle;
|
||||||
KIGFX::COLOR4D m_color;
|
KIGFX::COLOR4D m_color;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ bool SVG_IMPORT_PLUGIN::Import()
|
||||||
strokeColor = COLOR4D::UNSPECIFIED;
|
strokeColor = COLOR4D::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
PLOT_DASH_TYPE dashType = PLOT_DASH_TYPE::SOLID;
|
LINE_STYLE dashType = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
if( shape->strokeDashCount > 0 )
|
if( shape->strokeDashCount > 0 )
|
||||||
{
|
{
|
||||||
|
@ -165,13 +165,13 @@ bool SVG_IMPORT_PLUGIN::Import()
|
||||||
}
|
}
|
||||||
|
|
||||||
if( dotCount > 0 && dashCount == 0 )
|
if( dotCount > 0 && dashCount == 0 )
|
||||||
dashType = PLOT_DASH_TYPE::DOT;
|
dashType = LINE_STYLE::DOT;
|
||||||
else if( dotCount == 0 && dashCount > 0 )
|
else if( dotCount == 0 && dashCount > 0 )
|
||||||
dashType = PLOT_DASH_TYPE::DASH;
|
dashType = LINE_STYLE::DASH;
|
||||||
else if( dotCount == 1 && dashCount == 1 )
|
else if( dotCount == 1 && dashCount == 1 )
|
||||||
dashType = PLOT_DASH_TYPE::DASHDOT;
|
dashType = LINE_STYLE::DASHDOT;
|
||||||
else if( dotCount == 2 && dashCount == 1 )
|
else if( dotCount == 2 && dashCount == 1 )
|
||||||
dashType = PLOT_DASH_TYPE::DASHDOTDOT;
|
dashType = LINE_STYLE::DASHDOTDOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPORTED_STROKE stroke( lineWidth, dashType, strokeColor );
|
IMPORTED_STROKE stroke( lineWidth, dashType, strokeColor );
|
||||||
|
|
|
@ -96,21 +96,21 @@ static const struct
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const char* getDXFLineType( PLOT_DASH_TYPE aType )
|
static const char* getDXFLineType( LINE_STYLE aType )
|
||||||
{
|
{
|
||||||
switch( aType )
|
switch( aType )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DEFAULT:
|
case LINE_STYLE::DEFAULT:
|
||||||
case PLOT_DASH_TYPE::SOLID:
|
case LINE_STYLE::SOLID:
|
||||||
return "CONTINUOUS";
|
return "CONTINUOUS";
|
||||||
case PLOT_DASH_TYPE::DASH:
|
case LINE_STYLE::DASH:
|
||||||
return "DASHED";
|
return "DASHED";
|
||||||
case PLOT_DASH_TYPE::DOT:
|
case LINE_STYLE::DOT:
|
||||||
return "DOTTED";
|
return "DOTTED";
|
||||||
case PLOT_DASH_TYPE::DASHDOT:
|
case LINE_STYLE::DASHDOT:
|
||||||
return "DASHDOT";
|
return "DASHDOT";
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "Unhandled PLOT_DASH_TYPE" );
|
wxFAIL_MSG( "Unhandled LINE_STYLE" );
|
||||||
return "CONTINUOUS";
|
return "CONTINUOUS";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -623,11 +623,11 @@ void DXF_PLOTTER::PenTo( const VECTOR2I& pos, char plume )
|
||||||
|
|
||||||
if( m_penLastpos != pos && plume == 'D' )
|
if( m_penLastpos != pos && plume == 'D' )
|
||||||
{
|
{
|
||||||
wxASSERT( m_currentLineType >= PLOT_DASH_TYPE::FIRST_TYPE
|
wxASSERT( m_currentLineType >= LINE_STYLE::FIRST_TYPE
|
||||||
&& m_currentLineType <= PLOT_DASH_TYPE::LAST_TYPE );
|
&& m_currentLineType <= LINE_STYLE::LAST_TYPE );
|
||||||
// DXF LINE
|
// DXF LINE
|
||||||
wxString cname = getDXFColorName( m_currentColor );
|
wxString cname = getDXFColorName( m_currentColor );
|
||||||
const char* lname = getDXFLineType( static_cast<PLOT_DASH_TYPE>( m_currentLineType ) );
|
const char* lname = getDXFLineType( static_cast<LINE_STYLE>( m_currentLineType ) );
|
||||||
fprintf( m_outputFile, "0\nLINE\n8\n%s\n6\n%s\n10\n%s\n20\n%s\n11\n%s\n21\n%s\n",
|
fprintf( m_outputFile, "0\nLINE\n8\n%s\n6\n%s\n10\n%s\n20\n%s\n11\n%s\n21\n%s\n",
|
||||||
TO_UTF8( cname ), lname,
|
TO_UTF8( cname ), lname,
|
||||||
formatCoord( pen_lastpos_dev.x ).c_str(),
|
formatCoord( pen_lastpos_dev.x ).c_str(),
|
||||||
|
@ -640,10 +640,10 @@ void DXF_PLOTTER::PenTo( const VECTOR2I& pos, char plume )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DXF_PLOTTER::SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle )
|
void DXF_PLOTTER::SetDash( int aLineWidth, LINE_STYLE aLineStyle )
|
||||||
{
|
{
|
||||||
wxASSERT( aLineStyle >= PLOT_DASH_TYPE::FIRST_TYPE
|
wxASSERT( aLineStyle >= LINE_STYLE::FIRST_TYPE
|
||||||
&& aLineStyle <= PLOT_DASH_TYPE::LAST_TYPE );
|
&& aLineStyle <= LINE_STYLE::LAST_TYPE );
|
||||||
|
|
||||||
m_currentLineType = aLineStyle;
|
m_currentLineType = aLineStyle;
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ static const double PLUsPERDECIMIL = 0.1016;
|
||||||
HPGL_PLOTTER::HPGL_PLOTTER() :
|
HPGL_PLOTTER::HPGL_PLOTTER() :
|
||||||
m_arcTargetChordLength( 0 ),
|
m_arcTargetChordLength( 0 ),
|
||||||
m_arcMinChordDegrees( 5.0, DEGREES_T ),
|
m_arcMinChordDegrees( 5.0, DEGREES_T ),
|
||||||
m_lineStyle( PLOT_DASH_TYPE::SOLID ),
|
m_lineStyle( LINE_STYLE::SOLID ),
|
||||||
m_useUserCoords( false ),
|
m_useUserCoords( false ),
|
||||||
m_fitUserCoords( false ),
|
m_fitUserCoords( false ),
|
||||||
m_current_item( nullptr )
|
m_current_item( nullptr )
|
||||||
|
@ -305,10 +305,10 @@ bool HPGL_PLOTTER::EndPlot()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VECTOR2I loc = m_items.begin()->loc_start;
|
VECTOR2I loc = m_items.begin()->loc_start;
|
||||||
bool pen_up = true;
|
bool pen_up = true;
|
||||||
PLOT_DASH_TYPE current_dash = PLOT_DASH_TYPE::SOLID;
|
LINE_STYLE current_dash = LINE_STYLE::SOLID;
|
||||||
int current_pen = m_penNumber;
|
int current_pen = m_penNumber;
|
||||||
|
|
||||||
for( HPGL_ITEM const& item : m_items )
|
for( HPGL_ITEM const& item : m_items )
|
||||||
{
|
{
|
||||||
|
@ -531,7 +531,7 @@ void HPGL_PLOTTER::PenTo( const VECTOR2I& pos, char plume )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void HPGL_PLOTTER::SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle )
|
void HPGL_PLOTTER::SetDash( int aLineWidth, LINE_STYLE aLineStyle )
|
||||||
{
|
{
|
||||||
m_lineStyle = aLineStyle;
|
m_lineStyle = aLineStyle;
|
||||||
flushItem();
|
flushItem();
|
||||||
|
@ -906,15 +906,15 @@ void HPGL_PLOTTER::sortItems( std::list<HPGL_ITEM>& items )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* HPGL_PLOTTER::lineStyleCommand( PLOT_DASH_TYPE aLineStyle )
|
const char* HPGL_PLOTTER::lineStyleCommand( LINE_STYLE aLineStyle )
|
||||||
{
|
{
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DASH: return "LT 2 4 1;";
|
case LINE_STYLE::DASH: return "LT 2 4 1;";
|
||||||
case PLOT_DASH_TYPE::DOT: return "LT 1 1 1;";
|
case LINE_STYLE::DOT: return "LT 1 1 1;";
|
||||||
case PLOT_DASH_TYPE::DASHDOT: return "LT 4 6 1;";
|
case LINE_STYLE::DASHDOT: return "LT 4 6 1;";
|
||||||
case PLOT_DASH_TYPE::DASHDOTDOT: return "LT 7 8 1;";
|
case LINE_STYLE::DASHDOTDOT: return "LT 7 8 1;";
|
||||||
default: return "LT;";
|
default: return "LT;";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,29 +183,29 @@ void PDF_PLOTTER::emitSetRGBColor( double r, double g, double b, double a )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PDF_PLOTTER::SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle )
|
void PDF_PLOTTER::SetDash( int aLineWidth, LINE_STYLE aLineStyle )
|
||||||
{
|
{
|
||||||
wxASSERT( m_workFile );
|
wxASSERT( m_workFile );
|
||||||
|
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DASH:
|
case LINE_STYLE::DASH:
|
||||||
fprintf( m_workFile, "[%d %d] 0 d\n",
|
fprintf( m_workFile, "[%d %d] 0 d\n",
|
||||||
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DOT:
|
case LINE_STYLE::DOT:
|
||||||
fprintf( m_workFile, "[%d %d] 0 d\n",
|
fprintf( m_workFile, "[%d %d] 0 d\n",
|
||||||
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DASHDOT:
|
case LINE_STYLE::DASHDOT:
|
||||||
fprintf( m_workFile, "[%d %d %d %d] 0 d\n",
|
fprintf( m_workFile, "[%d %d %d %d] 0 d\n",
|
||||||
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
||||||
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DASHDOTDOT:
|
case LINE_STYLE::DASHDOTDOT:
|
||||||
fprintf( m_workFile, "[%d %d %d %d %d %d] 0 d\n",
|
fprintf( m_workFile, "[%d %d %d %d %d %d] 0 d\n",
|
||||||
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
||||||
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
||||||
|
|
|
@ -461,27 +461,27 @@ void PS_PLOTTER::emitSetRGBColor( double r, double g, double b, double a )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PS_PLOTTER::SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle )
|
void PS_PLOTTER::SetDash( int aLineWidth, LINE_STYLE aLineStyle )
|
||||||
{
|
{
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DASH:
|
case LINE_STYLE::DASH:
|
||||||
fprintf( m_outputFile, "[%d %d] 0 setdash\n",
|
fprintf( m_outputFile, "[%d %d] 0 setdash\n",
|
||||||
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DOT:
|
case LINE_STYLE::DOT:
|
||||||
fprintf( m_outputFile, "[%d %d] 0 setdash\n",
|
fprintf( m_outputFile, "[%d %d] 0 setdash\n",
|
||||||
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DASHDOT:
|
case LINE_STYLE::DASHDOT:
|
||||||
fprintf( m_outputFile, "[%d %d %d %d] 0 setdash\n",
|
fprintf( m_outputFile, "[%d %d %d %d] 0 setdash\n",
|
||||||
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
||||||
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DASHDOTDOT:
|
case LINE_STYLE::DASHDOTDOT:
|
||||||
fprintf( m_outputFile, "[%d %d %d %d %d %d] 0 setdash\n",
|
fprintf( m_outputFile, "[%d %d %d %d %d %d] 0 setdash\n",
|
||||||
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
(int) GetDashMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
||||||
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
(int) GetDotMarkLenIU( aLineWidth ), (int) GetDashGapLenIU( aLineWidth ),
|
||||||
|
|
|
@ -170,7 +170,7 @@ SVG_PLOTTER::SVG_PLOTTER()
|
||||||
m_pen_rgb_color = 0; // current color value (black)
|
m_pen_rgb_color = 0; // current color value (black)
|
||||||
m_brush_rgb_color = 0; // current color value (black)
|
m_brush_rgb_color = 0; // current color value (black)
|
||||||
m_brush_alpha = 1.0;
|
m_brush_alpha = 1.0;
|
||||||
m_dashed = PLOT_DASH_TYPE::SOLID;
|
m_dashed = LINE_STYLE::SOLID;
|
||||||
m_precision = 4; // default: 4 digits in mantissa.
|
m_precision = 4; // default: 4 digits in mantissa.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,31 +262,31 @@ void SVG_PLOTTER::setSVGPlotStyle( int aLineWidth, bool aIsGroup, const std::str
|
||||||
//set any extra attributes for non-solid lines
|
//set any extra attributes for non-solid lines
|
||||||
switch( m_dashed )
|
switch( m_dashed )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DASH:
|
case LINE_STYLE::DASH:
|
||||||
fprintf( m_outputFile, "stroke-dasharray:%.*f,%.*f;", m_precision,
|
fprintf( m_outputFile, "stroke-dasharray:%.*f,%.*f;", m_precision,
|
||||||
GetDashMarkLenIU( aLineWidth ), m_precision, GetDashGapLenIU( aLineWidth ) );
|
GetDashMarkLenIU( aLineWidth ), m_precision, GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DOT:
|
case LINE_STYLE::DOT:
|
||||||
fprintf( m_outputFile, "stroke-dasharray:%f,%f;", GetDotMarkLenIU( aLineWidth ),
|
fprintf( m_outputFile, "stroke-dasharray:%f,%f;", GetDotMarkLenIU( aLineWidth ),
|
||||||
GetDashGapLenIU( aLineWidth ) );
|
GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DASHDOT:
|
case LINE_STYLE::DASHDOT:
|
||||||
fprintf( m_outputFile, "stroke-dasharray:%f,%f,%f,%f;", GetDashMarkLenIU( aLineWidth ),
|
fprintf( m_outputFile, "stroke-dasharray:%f,%f,%f,%f;", GetDashMarkLenIU( aLineWidth ),
|
||||||
GetDashGapLenIU( aLineWidth ), GetDotMarkLenIU( aLineWidth ),
|
GetDashGapLenIU( aLineWidth ), GetDotMarkLenIU( aLineWidth ),
|
||||||
GetDashGapLenIU( aLineWidth ) );
|
GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DASHDOTDOT:
|
case LINE_STYLE::DASHDOTDOT:
|
||||||
fprintf( m_outputFile, "stroke-dasharray:%f,%f,%f,%f,%f,%f;",
|
fprintf( m_outputFile, "stroke-dasharray:%f,%f,%f,%f,%f,%f;",
|
||||||
GetDashMarkLenIU( aLineWidth ), GetDashGapLenIU( aLineWidth ),
|
GetDashMarkLenIU( aLineWidth ), GetDashGapLenIU( aLineWidth ),
|
||||||
GetDotMarkLenIU( aLineWidth ), GetDashGapLenIU( aLineWidth ),
|
GetDotMarkLenIU( aLineWidth ), GetDashGapLenIU( aLineWidth ),
|
||||||
GetDotMarkLenIU( aLineWidth ), GetDashGapLenIU( aLineWidth ) );
|
GetDotMarkLenIU( aLineWidth ), GetDashGapLenIU( aLineWidth ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_DASH_TYPE::DEFAULT:
|
case LINE_STYLE::DEFAULT:
|
||||||
case PLOT_DASH_TYPE::SOLID:
|
case LINE_STYLE::SOLID:
|
||||||
default:
|
default:
|
||||||
//do nothing
|
//do nothing
|
||||||
break;
|
break;
|
||||||
|
@ -359,7 +359,7 @@ void SVG_PLOTTER::emitSetRGBColor( double r, double g, double b, double a )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SVG_PLOTTER::SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle )
|
void SVG_PLOTTER::SetDash( int aLineWidth, LINE_STYLE aLineStyle )
|
||||||
{
|
{
|
||||||
if( m_dashed != aLineStyle )
|
if( m_dashed != aLineStyle )
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,16 +32,16 @@
|
||||||
using namespace STROKEPARAMS_T;
|
using namespace STROKEPARAMS_T;
|
||||||
|
|
||||||
|
|
||||||
const std::map<PLOT_DASH_TYPE, struct lineTypeStruct> lineTypeNames = {
|
const std::map<LINE_STYLE, struct LINE_STYLE_DESC> lineTypeNames = {
|
||||||
{ PLOT_DASH_TYPE::SOLID, { _( "Solid" ), BITMAPS::stroke_solid } },
|
{ LINE_STYLE::SOLID, { _( "Solid" ), BITMAPS::stroke_solid } },
|
||||||
{ PLOT_DASH_TYPE::DASH, { _( "Dashed" ), BITMAPS::stroke_dash } },
|
{ LINE_STYLE::DASH, { _( "Dashed" ), BITMAPS::stroke_dash } },
|
||||||
{ PLOT_DASH_TYPE::DOT, { _( "Dotted" ), BITMAPS::stroke_dot } },
|
{ LINE_STYLE::DOT, { _( "Dotted" ), BITMAPS::stroke_dot } },
|
||||||
{ PLOT_DASH_TYPE::DASHDOT, { _( "Dash-Dot" ), BITMAPS::stroke_dashdot } },
|
{ LINE_STYLE::DASHDOT, { _( "Dash-Dot" ), BITMAPS::stroke_dashdot } },
|
||||||
{ PLOT_DASH_TYPE::DASHDOTDOT, { _( "Dash-Dot-Dot" ), BITMAPS::stroke_dashdotdot } }
|
{ LINE_STYLE::DASHDOTDOT, { _( "Dash-Dot-Dot" ), BITMAPS::stroke_dashdotdot } }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void STROKE_PARAMS::Stroke( const SHAPE* aShape, PLOT_DASH_TYPE aLineStyle, int aWidth,
|
void STROKE_PARAMS::Stroke( const SHAPE* aShape, LINE_STYLE aLineStyle, int aWidth,
|
||||||
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
||||||
std::function<void( const VECTOR2I& a, const VECTOR2I& b )> aStroker )
|
std::function<void( const VECTOR2I& a, const VECTOR2I& b )> aStroker )
|
||||||
{
|
{
|
||||||
|
@ -51,24 +51,24 @@ void STROKE_PARAMS::Stroke( const SHAPE* aShape, PLOT_DASH_TYPE aLineStyle, int
|
||||||
|
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DASH:
|
case LINE_STYLE::DASH:
|
||||||
strokes[0] = aRenderSettings->GetDashLength( aWidth );
|
strokes[0] = aRenderSettings->GetDashLength( aWidth );
|
||||||
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
||||||
wrapAround = 2;
|
wrapAround = 2;
|
||||||
break;
|
break;
|
||||||
case PLOT_DASH_TYPE::DOT:
|
case LINE_STYLE::DOT:
|
||||||
strokes[0] = aRenderSettings->GetDotLength( aWidth );
|
strokes[0] = aRenderSettings->GetDotLength( aWidth );
|
||||||
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
||||||
wrapAround = 2;
|
wrapAround = 2;
|
||||||
break;
|
break;
|
||||||
case PLOT_DASH_TYPE::DASHDOT:
|
case LINE_STYLE::DASHDOT:
|
||||||
strokes[0] = aRenderSettings->GetDashLength( aWidth );
|
strokes[0] = aRenderSettings->GetDashLength( aWidth );
|
||||||
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
||||||
strokes[2] = aRenderSettings->GetDotLength( aWidth );
|
strokes[2] = aRenderSettings->GetDotLength( aWidth );
|
||||||
strokes[3] = aRenderSettings->GetGapLength( aWidth );
|
strokes[3] = aRenderSettings->GetGapLength( aWidth );
|
||||||
wrapAround = 4;
|
wrapAround = 4;
|
||||||
break;
|
break;
|
||||||
case PLOT_DASH_TYPE::DASHDOTDOT:
|
case LINE_STYLE::DASHDOTDOT:
|
||||||
strokes[0] = aRenderSettings->GetDashLength( aWidth );
|
strokes[0] = aRenderSettings->GetDashLength( aWidth );
|
||||||
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
strokes[1] = aRenderSettings->GetGapLength( aWidth );
|
||||||
strokes[2] = aRenderSettings->GetDotLength( aWidth );
|
strokes[2] = aRenderSettings->GetDotLength( aWidth );
|
||||||
|
@ -181,18 +181,18 @@ void STROKE_PARAMS::Stroke( const SHAPE* aShape, PLOT_DASH_TYPE aLineStyle, int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString STROKE_PARAMS::GetLineStyleToken( PLOT_DASH_TYPE aStyle )
|
wxString STROKE_PARAMS::GetLineStyleToken( LINE_STYLE aStyle )
|
||||||
{
|
{
|
||||||
wxString token;
|
wxString token;
|
||||||
|
|
||||||
switch( aStyle )
|
switch( aStyle )
|
||||||
{
|
{
|
||||||
case PLOT_DASH_TYPE::DASH: token = wxT( "dash" ); break;
|
case LINE_STYLE::DASH: token = wxT( "dash" ); break;
|
||||||
case PLOT_DASH_TYPE::DOT: token = wxT( "dot" ); break;
|
case LINE_STYLE::DOT: token = wxT( "dot" ); break;
|
||||||
case PLOT_DASH_TYPE::DASHDOT: token = wxT( "dash_dot" ); break;
|
case LINE_STYLE::DASHDOT: token = wxT( "dash_dot" ); break;
|
||||||
case PLOT_DASH_TYPE::DASHDOTDOT: token = wxT( "dash_dot_dot" ); break;
|
case LINE_STYLE::DASHDOTDOT: token = wxT( "dash_dot_dot" ); break;
|
||||||
case PLOT_DASH_TYPE::SOLID: token = wxT( "solid" ); break;
|
case LINE_STYLE::SOLID: token = wxT( "solid" ); break;
|
||||||
case PLOT_DASH_TYPE::DEFAULT: token = wxT( "default" ); break;
|
case LINE_STYLE::DEFAULT: token = wxT( "default" ); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return token;
|
return token;
|
||||||
|
@ -207,9 +207,9 @@ void STROKE_PARAMS::GetMsgPanelInfo( UNITS_PROVIDER* aUnitsProvider,
|
||||||
{
|
{
|
||||||
wxString lineStyle = _( "Default" );
|
wxString lineStyle = _( "Default" );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const std::pair<const LINE_STYLE, LINE_STYLE_DESC>& typeEntry : lineTypeNames )
|
||||||
{
|
{
|
||||||
if( typeEntry.first == GetPlotStyle() )
|
if( typeEntry.first == GetLineStyle() )
|
||||||
{
|
{
|
||||||
lineStyle = typeEntry.second.name;
|
lineStyle = typeEntry.second.name;
|
||||||
break;
|
break;
|
||||||
|
@ -233,13 +233,13 @@ void STROKE_PARAMS::Format( OUTPUTFORMATTER* aFormatter, const EDA_IU_SCALE& aIu
|
||||||
{
|
{
|
||||||
aFormatter->Print( aNestLevel, "(stroke (width %s) (type %s))",
|
aFormatter->Print( aNestLevel, "(stroke (width %s) (type %s))",
|
||||||
EDA_UNIT_UTILS::FormatInternalUnits( aIuScale, GetWidth() ).c_str(),
|
EDA_UNIT_UTILS::FormatInternalUnits( aIuScale, GetWidth() ).c_str(),
|
||||||
TO_UTF8( GetLineStyleToken( GetPlotStyle() ) ) );
|
TO_UTF8( GetLineStyleToken( GetLineStyle() ) ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aFormatter->Print( aNestLevel, "(stroke (width %s) (type %s) (color %d %d %d %s))",
|
aFormatter->Print( aNestLevel, "(stroke (width %s) (type %s) (color %d %d %d %s))",
|
||||||
EDA_UNIT_UTILS::FormatInternalUnits( aIuScale, GetWidth() ).c_str(),
|
EDA_UNIT_UTILS::FormatInternalUnits( aIuScale, GetWidth() ).c_str(),
|
||||||
TO_UTF8( GetLineStyleToken( GetPlotStyle() ) ),
|
TO_UTF8( GetLineStyleToken( GetLineStyle() ) ),
|
||||||
KiROUND( GetColor().r * 255.0 ),
|
KiROUND( GetColor().r * 255.0 ),
|
||||||
KiROUND( GetColor().g * 255.0 ),
|
KiROUND( GetColor().g * 255.0 ),
|
||||||
KiROUND( GetColor().b * 255.0 ),
|
KiROUND( GetColor().b * 255.0 ),
|
||||||
|
@ -270,12 +270,12 @@ void STROKE_PARAMS_PARSER::ParseStroke( STROKE_PARAMS& aStroke )
|
||||||
|
|
||||||
switch( token )
|
switch( token )
|
||||||
{
|
{
|
||||||
case T_dash: aStroke.SetPlotStyle( PLOT_DASH_TYPE::DASH ); break;
|
case T_dash: aStroke.SetLineStyle( LINE_STYLE::DASH ); break;
|
||||||
case T_dot: aStroke.SetPlotStyle( PLOT_DASH_TYPE::DOT ); break;
|
case T_dot: aStroke.SetLineStyle( LINE_STYLE::DOT ); break;
|
||||||
case T_dash_dot: aStroke.SetPlotStyle( PLOT_DASH_TYPE::DASHDOT ); break;
|
case T_dash_dot: aStroke.SetLineStyle( LINE_STYLE::DASHDOT ); break;
|
||||||
case T_dash_dot_dot: aStroke.SetPlotStyle( PLOT_DASH_TYPE::DASHDOTDOT ); break;
|
case T_dash_dot_dot: aStroke.SetLineStyle( LINE_STYLE::DASHDOTDOT ); break;
|
||||||
case T_solid: aStroke.SetPlotStyle( PLOT_DASH_TYPE::SOLID ); break;
|
case T_solid: aStroke.SetLineStyle( LINE_STYLE::SOLID ); break;
|
||||||
case T_default: aStroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT ); break;
|
case T_default: aStroke.SetLineStyle( LINE_STYLE::DEFAULT ); break;
|
||||||
default:
|
default:
|
||||||
Expecting( "solid, dash, dash_dot, dash_dot_dot, dot or default" );
|
Expecting( "solid, dash, dash_dot, dash_dot_dot, dot or default" );
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,9 +336,9 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( SCH_COMMIT* aCommit,
|
||||||
if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
|
if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
|
||||||
{
|
{
|
||||||
if( m_lineStyle->GetStringSelection() == DEFAULT_STYLE )
|
if( m_lineStyle->GetStringSelection() == DEFAULT_STYLE )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( (PLOT_DASH_TYPE) m_lineStyle->GetSelection() );
|
stroke.SetLineStyle( (LINE_STYLE) m_lineStyle->GetSelection() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_setColor->GetValue() )
|
if( m_setColor->GetValue() )
|
||||||
|
|
|
@ -50,8 +50,8 @@ DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* aPa
|
||||||
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
m_borderColorSwatch->SetSwatchColor( m_shape->GetStroke().GetColor(), false );
|
m_borderColorSwatch->SetSwatchColor( m_shape->GetStroke().GetColor(), false );
|
||||||
|
|
||||||
int style = static_cast<int>( m_shape->GetStroke().GetPlotStyle() );
|
int style = static_cast<int>( m_shape->GetStroke().GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -260,9 +260,9 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( it->first );
|
stroke.SetLineStyle( it->first );
|
||||||
|
|
||||||
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME*
|
||||||
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
m_borderColorSwatch->SetSwatchColor( m_currentText->GetStroke().GetColor(), false );
|
m_borderColorSwatch->SetSwatchColor( m_currentText->GetStroke().GetColor(), false );
|
||||||
|
|
||||||
int style = static_cast<int>( m_currentText->GetStroke().GetPlotStyle() );
|
int style = static_cast<int>( m_currentText->GetStroke().GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -326,9 +326,9 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( it->first );
|
stroke.SetLineStyle( it->first );
|
||||||
|
|
||||||
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
SetInitialFocus( m_lineWidth );
|
SetInitialFocus( m_lineWidth );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_typeCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_typeCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_typeCombo->Append( DEFAULT_STYLE );
|
m_typeCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -94,10 +94,10 @@ bool DIALOG_LINE_PROPERTIES::TransferDataToWindow()
|
||||||
if( std::all_of( m_lines.begin() + 1, m_lines.end(),
|
if( std::all_of( m_lines.begin() + 1, m_lines.end(),
|
||||||
[&]( const SCH_LINE* r )
|
[&]( const SCH_LINE* r )
|
||||||
{
|
{
|
||||||
return r->GetStroke().GetPlotStyle() == first_stroke_item->GetStroke().GetPlotStyle();
|
return r->GetStroke().GetLineStyle() == first_stroke_item->GetStroke().GetLineStyle();
|
||||||
} ) )
|
} ) )
|
||||||
{
|
{
|
||||||
int style = static_cast<int>( first_stroke_item->GetStroke().GetPlotStyle() );
|
int style = static_cast<int>( first_stroke_item->GetStroke().GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_typeCombo->SetStringSelection( DEFAULT_STYLE );
|
m_typeCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -142,7 +142,7 @@ bool DIALOG_LINE_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_typeCombo->GetSelection() );
|
std::advance( it, m_typeCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
line->SetLineStyle( PLOT_DASH_TYPE::DEFAULT );
|
line->SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
line->SetLineStyle( it->first );
|
line->SetLineStyle( it->first );
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S
|
||||||
|
|
||||||
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
m_borderColorSwatch->SetSwatchColor( m_shape->GetStroke().GetColor(), false );
|
m_borderColorSwatch->SetSwatchColor( m_shape->GetStroke().GetColor(), false );
|
||||||
|
|
||||||
int style = static_cast<int>( m_shape->GetStroke().GetPlotStyle() );
|
int style = static_cast<int>( m_shape->GetStroke().GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -153,9 +153,9 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( it->first );
|
stroke.SetLineStyle( it->first );
|
||||||
|
|
||||||
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,8 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_ITE
|
||||||
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
m_borderColorSwatch->SetSwatchColor( textBox->GetStroke().GetColor(), false );
|
m_borderColorSwatch->SetSwatchColor( textBox->GetStroke().GetColor(), false );
|
||||||
|
|
||||||
int style = static_cast<int>( textBox->GetStroke().GetPlotStyle() );
|
int style = static_cast<int>( textBox->GetStroke().GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -520,9 +520,9 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( it->first );
|
stroke.SetLineStyle( it->first );
|
||||||
|
|
||||||
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
SetInitialFocus( m_lineWidth );
|
SetInitialFocus( m_lineWidth );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_typeCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_typeCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_typeCombo->Append( DEFAULT_STYLE );
|
m_typeCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -119,10 +119,10 @@ bool DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow()
|
||||||
[&]( const SCH_ITEM* item )
|
[&]( const SCH_ITEM* item )
|
||||||
{
|
{
|
||||||
return !item->HasLineStroke()
|
return !item->HasLineStroke()
|
||||||
|| item->GetStroke().GetPlotStyle() == stroke.GetPlotStyle();
|
|| item->GetStroke().GetLineStyle() == stroke.GetLineStyle();
|
||||||
} ) )
|
} ) )
|
||||||
{
|
{
|
||||||
int style = static_cast<int>( stroke.GetPlotStyle() );
|
int style = static_cast<int>( stroke.GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_typeCombo->SetStringSelection( DEFAULT_STYLE );
|
m_typeCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -195,7 +195,7 @@ bool DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow()
|
||||||
|
|
||||||
if( m_typeCombo->GetStringSelection() != INDETERMINATE_STYLE )
|
if( m_typeCombo->GetStringSelection() != INDETERMINATE_STYLE )
|
||||||
{
|
{
|
||||||
PLOT_DASH_TYPE lineStyle = PLOT_DASH_TYPE::DEFAULT;
|
LINE_STYLE lineStyle = LINE_STYLE::DEFAULT;
|
||||||
|
|
||||||
size_t lineTypeSelection = m_typeCombo->GetSelection();
|
size_t lineTypeSelection = m_typeCombo->GetSelection();
|
||||||
auto it = lineTypeNames.begin();
|
auto it = lineTypeNames.begin();
|
||||||
|
|
|
@ -291,7 +291,7 @@ void PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems()
|
||||||
|
|
||||||
if( line.first != LAYER_NOTES )
|
if( line.first != LAYER_NOTES )
|
||||||
{
|
{
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::SOLID );
|
stroke.SetLineStyle( LINE_STYLE::SOLID );
|
||||||
|
|
||||||
if( line.first == LAYER_BUS )
|
if( line.first == LAYER_BUS )
|
||||||
stroke.SetWidth( schIUScale.MilsToIU( 12 ) );
|
stroke.SetWidth( schIUScale.MilsToIU( 12 ) );
|
||||||
|
@ -379,7 +379,7 @@ void PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems()
|
||||||
|
|
||||||
comp_body->SetUnit( 0 );
|
comp_body->SetUnit( 0 );
|
||||||
comp_body->SetConvert( 0 );
|
comp_body->SetConvert( 0 );
|
||||||
comp_body->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
comp_body->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
comp_body->SetFillMode( FILL_T::FILLED_WITH_BG_BODYCOLOR );
|
comp_body->SetFillMode( FILL_T::FILLED_WITH_BG_BODYCOLOR );
|
||||||
comp_body->AddPoint( MILS_POINT( p.x - 200, p.y + 200 ) );
|
comp_body->AddPoint( MILS_POINT( p.x - 200, p.y + 200 ) );
|
||||||
comp_body->AddPoint( MILS_POINT( p.x + 200, p.y ) );
|
comp_body->AddPoint( MILS_POINT( p.x + 200, p.y ) );
|
||||||
|
|
|
@ -158,10 +158,10 @@ void LIB_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffs
|
||||||
cornerList.push_back( aTransform.TransformCoordinate( pt ) + aOffset );
|
cornerList.push_back( aTransform.TransformCoordinate( pt ) + aOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
int penWidth;
|
int penWidth;
|
||||||
COLOR4D color = GetStroke().GetColor();
|
COLOR4D color = GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE lineStyle = GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = GetStroke().GetLineStyle();
|
||||||
FILL_T fill = m_fill;
|
FILL_T fill = m_fill;
|
||||||
|
|
||||||
if( aBackground )
|
if( aBackground )
|
||||||
{
|
{
|
||||||
|
@ -186,15 +186,15 @@ void LIB_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffs
|
||||||
}
|
}
|
||||||
|
|
||||||
penWidth = 0;
|
penWidth = 0;
|
||||||
lineStyle = PLOT_DASH_TYPE::SOLID;
|
lineStyle = LINE_STYLE::SOLID;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
||||||
color = aPlotter->RenderSettings()->GetLayerColor( LAYER_DEVICE );
|
color = aPlotter->RenderSettings()->GetLayerColor( LAYER_DEVICE );
|
||||||
|
|
||||||
if( lineStyle == PLOT_DASH_TYPE::DEFAULT )
|
if( lineStyle == LINE_STYLE::DEFAULT )
|
||||||
lineStyle = PLOT_DASH_TYPE::SOLID;
|
lineStyle = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
if( m_fill == FILL_T::FILLED_SHAPE )
|
if( m_fill == FILL_T::FILLED_SHAPE )
|
||||||
fill = m_fill;
|
fill = m_fill;
|
||||||
|
@ -249,7 +249,7 @@ void LIB_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffs
|
||||||
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
|
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
aPlotter->SetDash( penWidth, PLOT_DASH_TYPE::SOLID );
|
aPlotter->SetDash( penWidth, LINE_STYLE::SOLID );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ void LIB_SHAPE::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset
|
||||||
|
|
||||||
if( penWidth > 0 )
|
if( penWidth > 0 )
|
||||||
{
|
{
|
||||||
if( GetEffectiveLineStyle() == PLOT_DASH_TYPE::SOLID )
|
if( GetEffectiveLineStyle() == LINE_STYLE::SOLID )
|
||||||
{
|
{
|
||||||
switch( GetShape() )
|
switch( GetShape() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,12 +62,12 @@ public:
|
||||||
|
|
||||||
int GetPenWidth() const override;
|
int GetPenWidth() const override;
|
||||||
|
|
||||||
PLOT_DASH_TYPE GetEffectiveLineStyle() const
|
LINE_STYLE GetEffectiveLineStyle() const
|
||||||
{
|
{
|
||||||
if( m_stroke.GetPlotStyle() == PLOT_DASH_TYPE::DEFAULT )
|
if( m_stroke.GetLineStyle() == LINE_STYLE::DEFAULT )
|
||||||
return PLOT_DASH_TYPE::SOLID;
|
return LINE_STYLE::SOLID;
|
||||||
else
|
else
|
||||||
return m_stroke.GetPlotStyle();
|
return m_stroke.GetLineStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
const BOX2I GetBoundingBox() const override;
|
const BOX2I GetBoundingBox() const override;
|
||||||
|
|
|
@ -228,11 +228,11 @@ void LIB_TEXTBOX::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
|
||||||
if( IsPrivate() )
|
if( IsPrivate() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool forceNoFill = static_cast<bool>( aData );
|
bool forceNoFill = static_cast<bool>( aData );
|
||||||
bool blackAndWhiteMode = GetGRForceBlackPenState();
|
bool blackAndWhiteMode = GetGRForceBlackPenState();
|
||||||
int penWidth = GetEffectivePenWidth( aSettings );
|
int penWidth = GetEffectivePenWidth( aSettings );
|
||||||
COLOR4D color = GetStroke().GetColor();
|
COLOR4D color = GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE lineStyle = GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = GetStroke().GetLineStyle();
|
||||||
|
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
VECTOR2I pt1 = aTransform.TransformCoordinate( m_start ) + aOffset;
|
VECTOR2I pt1 = aTransform.TransformCoordinate( m_start ) + aOffset;
|
||||||
|
@ -259,10 +259,10 @@ void LIB_TEXTBOX::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
|
||||||
color = color.Mix( bg, 0.5f );
|
color = color.Mix( bg, 0.5f );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( lineStyle == PLOT_DASH_TYPE::DEFAULT )
|
if( lineStyle == LINE_STYLE::DEFAULT )
|
||||||
lineStyle = PLOT_DASH_TYPE::SOLID;
|
lineStyle = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
GRRect( DC, pt1, pt2, penWidth, color );
|
GRRect( DC, pt1, pt2, penWidth, color );
|
||||||
}
|
}
|
||||||
|
@ -405,17 +405,17 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf
|
||||||
if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() )
|
if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() )
|
||||||
bg = COLOR4D::WHITE;
|
bg = COLOR4D::WHITE;
|
||||||
|
|
||||||
int penWidth = GetEffectivePenWidth( renderSettings );
|
int penWidth = GetEffectivePenWidth( renderSettings );
|
||||||
COLOR4D color = GetStroke().GetColor();
|
COLOR4D color = GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE lineStyle = GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( penWidth > 0 )
|
if( penWidth > 0 )
|
||||||
{
|
{
|
||||||
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
||||||
color = renderSettings->GetLayerColor( LAYER_DEVICE );
|
color = renderSettings->GetLayerColor( LAYER_DEVICE );
|
||||||
|
|
||||||
if( lineStyle == PLOT_DASH_TYPE::DEFAULT )
|
if( lineStyle == LINE_STYLE::DEFAULT )
|
||||||
lineStyle = PLOT_DASH_TYPE::DASH;
|
lineStyle = LINE_STYLE::DASH;
|
||||||
|
|
||||||
if( aDimmed )
|
if( aDimmed )
|
||||||
{
|
{
|
||||||
|
@ -426,7 +426,7 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf
|
||||||
aPlotter->SetColor( color );
|
aPlotter->SetColor( color );
|
||||||
aPlotter->SetDash( penWidth, lineStyle );
|
aPlotter->SetDash( penWidth, lineStyle );
|
||||||
aPlotter->Rect( start, end, FILL_T::NO_FILL, penWidth );
|
aPlotter->Rect( start, end, FILL_T::NO_FILL, penWidth );
|
||||||
aPlotter->SetDash( penWidth, PLOT_DASH_TYPE::SOLID );
|
aPlotter->SetDash( penWidth, LINE_STYLE::SOLID );
|
||||||
}
|
}
|
||||||
|
|
||||||
KIFONT::FONT* font = GetFont();
|
KIFONT::FONT* font = GetFont();
|
||||||
|
|
|
@ -52,7 +52,7 @@ SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE( KICAD_T aType, const VECTOR2I& pos, bool
|
||||||
m_size.y = schIUScale.MilsToIU( DEFAULT_SCH_ENTRY_SIZE );
|
m_size.y = schIUScale.MilsToIU( DEFAULT_SCH_ENTRY_SIZE );
|
||||||
|
|
||||||
m_stroke.SetWidth( 0 );
|
m_stroke.SetWidth( 0 );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
if( aFlipY )
|
if( aFlipY )
|
||||||
|
@ -61,7 +61,7 @@ SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE( KICAD_T aType, const VECTOR2I& pos, bool
|
||||||
m_isDanglingStart = m_isDanglingEnd = true;
|
m_isDanglingStart = m_isDanglingEnd = true;
|
||||||
|
|
||||||
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
||||||
m_lastResolvedLineStyle = PLOT_DASH_TYPE::SOLID;
|
m_lastResolvedLineStyle = LINE_STYLE::SOLID;
|
||||||
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const VECTOR2I& pos, bool aFlipY ) :
|
||||||
m_connected_bus_item = nullptr;
|
m_connected_bus_item = nullptr;
|
||||||
|
|
||||||
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
||||||
m_lastResolvedLineStyle = PLOT_DASH_TYPE::SOLID;
|
m_lastResolvedLineStyle = LINE_STYLE::SOLID;
|
||||||
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const VECTOR2I& pos, int aQuadrant ) :
|
||||||
m_connected_bus_item = nullptr;
|
m_connected_bus_item = nullptr;
|
||||||
|
|
||||||
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
||||||
m_lastResolvedLineStyle = PLOT_DASH_TYPE::SOLID;
|
m_lastResolvedLineStyle = LINE_STYLE::SOLID;
|
||||||
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ SCH_BUS_BUS_ENTRY::SCH_BUS_BUS_ENTRY( const VECTOR2I& pos, bool aFlipY ) :
|
||||||
m_connected_bus_items[1] = nullptr;
|
m_connected_bus_items[1] = nullptr;
|
||||||
|
|
||||||
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_WIRE_WIDTH_MILS );
|
||||||
m_lastResolvedLineStyle = PLOT_DASH_TYPE::SOLID;
|
m_lastResolvedLineStyle = LINE_STYLE::SOLID;
|
||||||
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,20 +205,20 @@ void SCH_BUS_ENTRY_BASE::SetBusEntryColor( const COLOR4D& aColor )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PLOT_DASH_TYPE SCH_BUS_ENTRY_BASE::GetLineStyle() const
|
LINE_STYLE SCH_BUS_ENTRY_BASE::GetLineStyle() const
|
||||||
{
|
{
|
||||||
if( m_stroke.GetPlotStyle() != PLOT_DASH_TYPE::DEFAULT )
|
if( m_stroke.GetLineStyle() != LINE_STYLE::DEFAULT )
|
||||||
m_lastResolvedLineStyle = m_stroke.GetPlotStyle();
|
m_lastResolvedLineStyle = m_stroke.GetLineStyle();
|
||||||
else if( IsConnectable() && !IsConnectivityDirty() )
|
else if( IsConnectable() && !IsConnectivityDirty() )
|
||||||
m_lastResolvedLineStyle = (PLOT_DASH_TYPE) GetEffectiveNetClass()->GetLineStyle();
|
m_lastResolvedLineStyle = (LINE_STYLE) GetEffectiveNetClass()->GetLineStyle();
|
||||||
|
|
||||||
return m_lastResolvedLineStyle;
|
return m_lastResolvedLineStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_BUS_ENTRY_BASE::SetLineStyle( PLOT_DASH_TYPE aStyle )
|
void SCH_BUS_ENTRY_BASE::SetLineStyle( LINE_STYLE aStyle )
|
||||||
{
|
{
|
||||||
m_stroke.SetPlotStyle( aStyle );
|
m_stroke.SetLineStyle( aStyle );
|
||||||
m_lastResolvedLineStyle = aStyle;
|
m_lastResolvedLineStyle = aStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ void SCH_BUS_ENTRY_BASE::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I
|
||||||
VECTOR2I end = GetEnd() + aOffset;
|
VECTOR2I end = GetEnd() + aOffset;
|
||||||
int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth();
|
int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth();
|
||||||
|
|
||||||
if( GetLineStyle() <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( GetLineStyle() <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
GRLine( DC, start.x, start.y, end.x, end.y, penWidth, color );
|
GRLine( DC, start.x, start.y, end.x, end.y, penWidth, color );
|
||||||
}
|
}
|
||||||
|
@ -490,7 +490,7 @@ void SCH_BUS_ENTRY_BASE::Plot( PLOTTER* aPlotter, bool aBackground,
|
||||||
aPlotter->MoveTo( m_pos );
|
aPlotter->MoveTo( m_pos );
|
||||||
aPlotter->FinishTo( GetEnd() );
|
aPlotter->FinishTo( GetEnd() );
|
||||||
|
|
||||||
aPlotter->SetDash( penWidth, PLOT_DASH_TYPE::SOLID );
|
aPlotter->SetDash( penWidth, LINE_STYLE::SOLID );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -630,23 +630,23 @@ static struct SCH_BUS_ENTRY_DESC
|
||||||
propMgr.InheritsAfter( TYPE_HASH( SCH_BUS_WIRE_ENTRY ), TYPE_HASH( SCH_BUS_ENTRY_BASE ) );
|
propMgr.InheritsAfter( TYPE_HASH( SCH_BUS_WIRE_ENTRY ), TYPE_HASH( SCH_BUS_ENTRY_BASE ) );
|
||||||
propMgr.InheritsAfter( TYPE_HASH( SCH_BUS_BUS_ENTRY ), TYPE_HASH( SCH_BUS_ENTRY_BASE ) );
|
propMgr.InheritsAfter( TYPE_HASH( SCH_BUS_BUS_ENTRY ), TYPE_HASH( SCH_BUS_ENTRY_BASE ) );
|
||||||
|
|
||||||
ENUM_MAP<PLOT_DASH_TYPE>& plotDashTypeEnum = ENUM_MAP<PLOT_DASH_TYPE>::Instance();
|
ENUM_MAP<LINE_STYLE>& plotDashTypeEnum = ENUM_MAP<LINE_STYLE>::Instance();
|
||||||
|
|
||||||
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
||||||
{
|
{
|
||||||
plotDashTypeEnum.Map( PLOT_DASH_TYPE::DEFAULT, _HKI( "Default" ) )
|
plotDashTypeEnum.Map( LINE_STYLE::DEFAULT, _HKI( "Default" ) )
|
||||||
.Map( PLOT_DASH_TYPE::SOLID, _HKI( "Solid" ) )
|
.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASH, _HKI( "Dashed" ) )
|
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DOT, _HKI( "Dotted" ) )
|
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOT, _HKI( "Dash-Dot" ) )
|
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Maybe SCH_BUS_ENTRY_BASE should inherit from or mix in with SCH_LINE
|
// TODO: Maybe SCH_BUS_ENTRY_BASE should inherit from or mix in with SCH_LINE
|
||||||
void ( SCH_BUS_ENTRY_BASE::*lineStyleSetter )( PLOT_DASH_TYPE ) =
|
void ( SCH_BUS_ENTRY_BASE::*lineStyleSetter )( LINE_STYLE ) =
|
||||||
&SCH_BUS_ENTRY_BASE::SetLineStyle;
|
&SCH_BUS_ENTRY_BASE::SetLineStyle;
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY_ENUM<SCH_BUS_ENTRY_BASE, PLOT_DASH_TYPE>(
|
propMgr.AddProperty( new PROPERTY_ENUM<SCH_BUS_ENTRY_BASE, LINE_STYLE>(
|
||||||
_HKI( "Line Style" ),
|
_HKI( "Line Style" ),
|
||||||
lineStyleSetter, &SCH_BUS_ENTRY_BASE::GetLineStyle ) );
|
lineStyleSetter, &SCH_BUS_ENTRY_BASE::GetLineStyle ) );
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,8 @@ public:
|
||||||
virtual STROKE_PARAMS GetStroke() const override { return m_stroke; }
|
virtual STROKE_PARAMS GetStroke() const override { return m_stroke; }
|
||||||
virtual void SetStroke( const STROKE_PARAMS& aStroke ) override { m_stroke = aStroke; }
|
virtual void SetStroke( const STROKE_PARAMS& aStroke ) override { m_stroke = aStroke; }
|
||||||
|
|
||||||
PLOT_DASH_TYPE GetLineStyle() const;
|
LINE_STYLE GetLineStyle() const;
|
||||||
void SetLineStyle( PLOT_DASH_TYPE aStyle );
|
void SetLineStyle( LINE_STYLE aStyle );
|
||||||
|
|
||||||
COLOR4D GetBusEntryColor() const;
|
COLOR4D GetBusEntryColor() const;
|
||||||
void SetBusEntryColor( const COLOR4D& aColor );
|
void SetBusEntryColor( const COLOR4D& aColor );
|
||||||
|
@ -150,9 +150,9 @@ protected:
|
||||||
// If real-time connectivity gets disabled (due to being too slow on a particular
|
// If real-time connectivity gets disabled (due to being too slow on a particular
|
||||||
// design), we can no longer rely on getting the NetClass to find netclass-specific
|
// design), we can no longer rely on getting the NetClass to find netclass-specific
|
||||||
// linestyles, linewidths and colors.
|
// linestyles, linewidths and colors.
|
||||||
mutable PLOT_DASH_TYPE m_lastResolvedLineStyle;
|
mutable LINE_STYLE m_lastResolvedLineStyle;
|
||||||
mutable int m_lastResolvedWidth;
|
mutable int m_lastResolvedWidth;
|
||||||
mutable COLOR4D m_lastResolvedColor;
|
mutable COLOR4D m_lastResolvedColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,7 +46,7 @@ SCH_LINE::SCH_LINE( const VECTOR2I& pos, int layer ) :
|
||||||
m_start = pos;
|
m_start = pos;
|
||||||
m_end = pos;
|
m_end = pos;
|
||||||
m_stroke.SetWidth( 0 );
|
m_stroke.SetWidth( 0 );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
switch( layer )
|
switch( layer )
|
||||||
|
@ -68,7 +68,7 @@ SCH_LINE::SCH_LINE( const VECTOR2I& pos, int layer ) :
|
||||||
else
|
else
|
||||||
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS );
|
m_lastResolvedWidth = schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS );
|
||||||
|
|
||||||
m_lastResolvedLineStyle = PLOT_DASH_TYPE::SOLID;
|
m_lastResolvedLineStyle = LINE_STYLE::SOLID;
|
||||||
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
m_lastResolvedColor = COLOR4D::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,34 +279,34 @@ COLOR4D SCH_LINE::GetLineColor() const
|
||||||
|
|
||||||
void SCH_LINE::SetLineStyle( const int aStyleId )
|
void SCH_LINE::SetLineStyle( const int aStyleId )
|
||||||
{
|
{
|
||||||
SetLineStyle( static_cast<PLOT_DASH_TYPE>( aStyleId ) );
|
SetLineStyle( static_cast<LINE_STYLE>( aStyleId ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_LINE::SetLineStyle( const PLOT_DASH_TYPE aStyle )
|
void SCH_LINE::SetLineStyle( const LINE_STYLE aStyle )
|
||||||
{
|
{
|
||||||
m_stroke.SetPlotStyle( aStyle );
|
m_stroke.SetLineStyle( aStyle );
|
||||||
m_lastResolvedLineStyle = GetLineStyle();
|
m_lastResolvedLineStyle = GetLineStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PLOT_DASH_TYPE SCH_LINE::GetLineStyle() const
|
LINE_STYLE SCH_LINE::GetLineStyle() const
|
||||||
{
|
{
|
||||||
if( m_stroke.GetPlotStyle() != PLOT_DASH_TYPE::DEFAULT )
|
if( m_stroke.GetLineStyle() != LINE_STYLE::DEFAULT )
|
||||||
return m_stroke.GetPlotStyle();
|
return m_stroke.GetLineStyle();
|
||||||
|
|
||||||
return PLOT_DASH_TYPE::SOLID;
|
return LINE_STYLE::SOLID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PLOT_DASH_TYPE SCH_LINE::GetEffectiveLineStyle() const
|
LINE_STYLE SCH_LINE::GetEffectiveLineStyle() const
|
||||||
{
|
{
|
||||||
if( m_stroke.GetPlotStyle() != PLOT_DASH_TYPE::DEFAULT )
|
if( m_stroke.GetLineStyle() != LINE_STYLE::DEFAULT )
|
||||||
m_lastResolvedLineStyle = m_stroke.GetPlotStyle();
|
m_lastResolvedLineStyle = m_stroke.GetLineStyle();
|
||||||
else if( !IsConnectable() )
|
else if( !IsConnectable() )
|
||||||
m_lastResolvedLineStyle = PLOT_DASH_TYPE::SOLID;
|
m_lastResolvedLineStyle = LINE_STYLE::SOLID;
|
||||||
else if( !IsConnectivityDirty() )
|
else if( !IsConnectivityDirty() )
|
||||||
m_lastResolvedLineStyle = (PLOT_DASH_TYPE) GetEffectiveNetClass()->GetLineStyle();
|
m_lastResolvedLineStyle = (LINE_STYLE) GetEffectiveNetClass()->GetLineStyle();
|
||||||
|
|
||||||
return m_lastResolvedLineStyle;
|
return m_lastResolvedLineStyle;
|
||||||
}
|
}
|
||||||
|
@ -361,12 +361,12 @@ void SCH_LINE::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& offset )
|
||||||
if( color == COLOR4D::UNSPECIFIED )
|
if( color == COLOR4D::UNSPECIFIED )
|
||||||
color = aSettings->GetLayerColor( GetLayer() );
|
color = aSettings->GetLayerColor( GetLayer() );
|
||||||
|
|
||||||
VECTOR2I start = m_start;
|
VECTOR2I start = m_start;
|
||||||
VECTOR2I end = m_end;
|
VECTOR2I end = m_end;
|
||||||
PLOT_DASH_TYPE lineStyle = GetEffectiveLineStyle();
|
LINE_STYLE lineStyle = GetEffectiveLineStyle();
|
||||||
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
GRLine( DC, start.x, start.y, end.x, end.y, penWidth, color );
|
GRLine( DC, start.x, start.y, end.x, end.y, penWidth, color );
|
||||||
}
|
}
|
||||||
|
@ -881,7 +881,7 @@ void SCH_LINE::Plot( PLOTTER* aPlotter, bool aBackground,
|
||||||
aPlotter->MoveTo( m_start );
|
aPlotter->MoveTo( m_start );
|
||||||
aPlotter->FinishTo( m_end );
|
aPlotter->FinishTo( m_end );
|
||||||
|
|
||||||
aPlotter->SetDash( penWidth, PLOT_DASH_TYPE::SOLID );
|
aPlotter->SetDash( penWidth, LINE_STYLE::SOLID );
|
||||||
|
|
||||||
// Plot attributes to a hypertext menu
|
// Plot attributes to a hypertext menu
|
||||||
std::vector<wxString> properties;
|
std::vector<wxString> properties;
|
||||||
|
@ -939,7 +939,7 @@ void SCH_LINE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
||||||
|
|
||||||
aList.emplace_back( _( "Line Type" ), msg );
|
aList.emplace_back( _( "Line Type" ), msg );
|
||||||
|
|
||||||
PLOT_DASH_TYPE lineStyle = GetLineStyle();
|
LINE_STYLE lineStyle = GetLineStyle();
|
||||||
|
|
||||||
if( GetEffectiveLineStyle() != lineStyle )
|
if( GetEffectiveLineStyle() != lineStyle )
|
||||||
aList.emplace_back( _( "Line Style" ), _( "from netclass" ) );
|
aList.emplace_back( _( "Line Style" ), _( "from netclass" ) );
|
||||||
|
@ -1004,7 +1004,7 @@ bool SCH_LINE::operator==( const SCH_ITEM& aOther ) const
|
||||||
if( m_stroke.GetColor() != other.m_stroke.GetColor() )
|
if( m_stroke.GetColor() != other.m_stroke.GetColor() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( m_stroke.GetPlotStyle() != other.m_stroke.GetPlotStyle() )
|
if( m_stroke.GetLineStyle() != other.m_stroke.GetLineStyle() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1038,7 +1038,7 @@ double SCH_LINE::Similarity( const SCH_ITEM& aOther ) const
|
||||||
if( m_stroke.GetColor() != other.m_stroke.GetColor() )
|
if( m_stroke.GetColor() != other.m_stroke.GetColor() )
|
||||||
similarity *= 0.9;
|
similarity *= 0.9;
|
||||||
|
|
||||||
if( m_stroke.GetPlotStyle() != other.m_stroke.GetPlotStyle() )
|
if( m_stroke.GetLineStyle() != other.m_stroke.GetLineStyle() )
|
||||||
similarity *= 0.9;
|
similarity *= 0.9;
|
||||||
|
|
||||||
return similarity;
|
return similarity;
|
||||||
|
@ -1049,25 +1049,25 @@ static struct SCH_LINE_DESC
|
||||||
{
|
{
|
||||||
SCH_LINE_DESC()
|
SCH_LINE_DESC()
|
||||||
{
|
{
|
||||||
ENUM_MAP<PLOT_DASH_TYPE>& plotDashTypeEnum = ENUM_MAP<PLOT_DASH_TYPE>::Instance();
|
ENUM_MAP<LINE_STYLE>& plotDashTypeEnum = ENUM_MAP<LINE_STYLE>::Instance();
|
||||||
|
|
||||||
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
||||||
{
|
{
|
||||||
plotDashTypeEnum.Map( PLOT_DASH_TYPE::DEFAULT, _HKI( "Default" ) )
|
plotDashTypeEnum.Map( LINE_STYLE::DEFAULT, _HKI( "Default" ) )
|
||||||
.Map( PLOT_DASH_TYPE::SOLID, _HKI( "Solid" ) )
|
.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASH, _HKI( "Dashed" ) )
|
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DOT, _HKI( "Dotted" ) )
|
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOT, _HKI( "Dash-Dot" ) )
|
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
REGISTER_TYPE( SCH_LINE );
|
REGISTER_TYPE( SCH_LINE );
|
||||||
propMgr.InheritsAfter( TYPE_HASH( SCH_LINE ), TYPE_HASH( SCH_ITEM ) );
|
propMgr.InheritsAfter( TYPE_HASH( SCH_LINE ), TYPE_HASH( SCH_ITEM ) );
|
||||||
|
|
||||||
void ( SCH_LINE::*lineStyleSetter )( PLOT_DASH_TYPE ) = &SCH_LINE::SetLineStyle;
|
void ( SCH_LINE::*lineStyleSetter )( LINE_STYLE ) = &SCH_LINE::SetLineStyle;
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY_ENUM<SCH_LINE, PLOT_DASH_TYPE>( _HKI( "Line Style" ),
|
propMgr.AddProperty( new PROPERTY_ENUM<SCH_LINE, LINE_STYLE>( _HKI( "Line Style" ),
|
||||||
lineStyleSetter, &SCH_LINE::GetLineStyle ) );
|
lineStyleSetter, &SCH_LINE::GetLineStyle ) );
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_LINE, int>( _HKI( "Line Width" ),
|
propMgr.AddProperty( new PROPERTY<SCH_LINE, int>( _HKI( "Line Width" ),
|
||||||
|
|
|
@ -158,13 +158,13 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetLineStyle( const PLOT_DASH_TYPE aStyle );
|
void SetLineStyle( const LINE_STYLE aStyle );
|
||||||
void SetLineStyle( const int aStyleId );
|
void SetLineStyle( const int aStyleId );
|
||||||
PLOT_DASH_TYPE GetLineStyle() const;
|
LINE_STYLE GetLineStyle() const;
|
||||||
|
|
||||||
/// @return the style that the line should be drawn in
|
/// @return the style that the line should be drawn in
|
||||||
/// this might be set on the line or inherited from the line's netclass
|
/// this might be set on the line or inherited from the line's netclass
|
||||||
PLOT_DASH_TYPE GetEffectiveLineStyle() const;
|
LINE_STYLE GetEffectiveLineStyle() const;
|
||||||
|
|
||||||
void SetLineColor( const COLOR4D& aColor );
|
void SetLineColor( const COLOR4D& aColor );
|
||||||
|
|
||||||
|
@ -188,12 +188,12 @@ public:
|
||||||
if( m_stroke.GetColor() != aLine->GetStroke().GetColor() )
|
if( m_stroke.GetColor() != aLine->GetStroke().GetColor() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
PLOT_DASH_TYPE style_a = m_stroke.GetPlotStyle();
|
LINE_STYLE style_a = m_stroke.GetLineStyle();
|
||||||
PLOT_DASH_TYPE style_b = aLine->GetStroke().GetPlotStyle();
|
LINE_STYLE style_b = aLine->GetStroke().GetLineStyle();
|
||||||
|
|
||||||
return style_a == style_b
|
return style_a == style_b
|
||||||
|| ( style_a == PLOT_DASH_TYPE::DEFAULT && style_b == PLOT_DASH_TYPE::SOLID )
|
|| ( style_a == LINE_STYLE::DEFAULT && style_b == LINE_STYLE::SOLID )
|
||||||
|| ( style_a == PLOT_DASH_TYPE::SOLID && style_b == PLOT_DASH_TYPE::DEFAULT );
|
|| ( style_a == LINE_STYLE::SOLID && style_b == LINE_STYLE::DEFAULT );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||||
|
@ -345,21 +345,22 @@ private:
|
||||||
const SCH_SHEET_PATH &aSheet ) const;
|
const SCH_SHEET_PATH &aSheet ) const;
|
||||||
bool doIsConnected( const VECTOR2I& aPosition ) const override;
|
bool doIsConnected( const VECTOR2I& aPosition ) const override;
|
||||||
|
|
||||||
bool m_startIsDangling; ///< True if start point is not connected.
|
private:
|
||||||
bool m_endIsDangling; ///< True if end point is not connected.
|
bool m_startIsDangling; ///< True if start point is not connected.
|
||||||
VECTOR2I m_start; ///< Line start point
|
bool m_endIsDangling; ///< True if end point is not connected.
|
||||||
VECTOR2I m_end; ///< Line end point
|
VECTOR2I m_start; ///< Line start point
|
||||||
EDA_ANGLE m_storedAngle; ///< Stored angle
|
VECTOR2I m_end; ///< Line end point
|
||||||
STROKE_PARAMS m_stroke; ///< Line stroke properties.
|
EDA_ANGLE m_storedAngle; ///< Stored angle
|
||||||
|
STROKE_PARAMS m_stroke; ///< Line stroke properties.
|
||||||
|
|
||||||
// If real-time connectivity gets disabled (due to being too slow on a particular
|
// If real-time connectivity gets disabled (due to being too slow on a particular
|
||||||
// design), we can no longer rely on getting the NetClass to find netclass-specific
|
// design), we can no longer rely on getting the NetClass to find netclass-specific
|
||||||
// linestyles, linewidths and colors.
|
// linestyles, linewidths and colors.
|
||||||
mutable PLOT_DASH_TYPE m_lastResolvedLineStyle;
|
mutable LINE_STYLE m_lastResolvedLineStyle;
|
||||||
mutable int m_lastResolvedWidth;
|
mutable int m_lastResolvedWidth;
|
||||||
mutable COLOR4D m_lastResolvedColor;
|
mutable COLOR4D m_lastResolvedColor;
|
||||||
|
|
||||||
wxString m_operatingPoint;
|
wxString m_operatingPoint;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -885,9 +885,9 @@ void SCH_PAINTER::draw( const LIB_SHAPE* aShape, int aLayer, bool aDimmed )
|
||||||
if( !setDeviceColors( aShape, aLayer, aDimmed ) )
|
if( !setDeviceColors( aShape, aLayer, aDimmed ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS;
|
bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS;
|
||||||
PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
|
||||||
COLOR4D color = getRenderColor( aShape, aLayer, drawingShadows, aDimmed );
|
COLOR4D color = getRenderColor( aShape, aLayer, drawingShadows, aDimmed );
|
||||||
|
|
||||||
auto drawShape =
|
auto drawShape =
|
||||||
[&]( const LIB_SHAPE* shape )
|
[&]( const LIB_SHAPE* shape )
|
||||||
|
@ -992,7 +992,7 @@ void SCH_PAINTER::draw( const LIB_SHAPE* aShape, int aLayer, bool aDimmed )
|
||||||
m_gal->SetLineWidth( lineWidth );
|
m_gal->SetLineWidth( lineWidth );
|
||||||
m_gal->SetStrokeColor( color );
|
m_gal->SetStrokeColor( color );
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE || drawingShadows )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE || drawingShadows )
|
||||||
{
|
{
|
||||||
drawShape( aShape );
|
drawShape( aShape );
|
||||||
}
|
}
|
||||||
|
@ -1252,8 +1252,8 @@ void SCH_PAINTER::draw( const LIB_TEXTBOX* aTextBox, int aLayer, bool aDimmed )
|
||||||
|
|
||||||
if( borderWidth > 0 )
|
if( borderWidth > 0 )
|
||||||
{
|
{
|
||||||
COLOR4D borderColor = aTextBox->GetStroke().GetColor();
|
COLOR4D borderColor = aTextBox->GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE borderStyle = aTextBox->GetStroke().GetPlotStyle();
|
LINE_STYLE borderStyle = aTextBox->GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( m_schSettings.m_OverrideItemColors || aTextBox->IsBrightened()
|
if( m_schSettings.m_OverrideItemColors || aTextBox->IsBrightened()
|
||||||
|| borderColor == COLOR4D::UNSPECIFIED )
|
|| borderColor == COLOR4D::UNSPECIFIED )
|
||||||
|
@ -1272,7 +1272,7 @@ void SCH_PAINTER::draw( const LIB_TEXTBOX* aTextBox, int aLayer, bool aDimmed )
|
||||||
m_gal->SetStrokeColor( borderColor );
|
m_gal->SetStrokeColor( borderColor );
|
||||||
m_gal->SetLineWidth( borderWidth );
|
m_gal->SetLineWidth( borderWidth );
|
||||||
|
|
||||||
if( borderStyle <= PLOT_DASH_TYPE::FIRST_TYPE || drawingShadows )
|
if( borderStyle <= LINE_STYLE::FIRST_TYPE || drawingShadows )
|
||||||
{
|
{
|
||||||
m_gal->DrawRectangle( mapCoords( aTextBox->GetPosition() ),
|
m_gal->DrawRectangle( mapCoords( aTextBox->GetPosition() ),
|
||||||
mapCoords( aTextBox->GetEnd() ) );
|
mapCoords( aTextBox->GetEnd() ) );
|
||||||
|
@ -1891,9 +1891,9 @@ void SCH_PAINTER::draw( const SCH_LINE* aLine, int aLayer )
|
||||||
if( aLine->IsNew() && drawingDangling )
|
if( aLine->IsNew() && drawingDangling )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
COLOR4D color = getRenderColor( aLine, aLine->GetLayer(), drawingShadows );
|
COLOR4D color = getRenderColor( aLine, aLine->GetLayer(), drawingShadows );
|
||||||
float width = getLineWidth( aLine, drawingShadows );
|
float width = getLineWidth( aLine, drawingShadows );
|
||||||
PLOT_DASH_TYPE lineStyle = aLine->GetEffectiveLineStyle();
|
LINE_STYLE lineStyle = aLine->GetEffectiveLineStyle();
|
||||||
|
|
||||||
if( ( drawingDangling || drawingShadows ) && !aLine->IsNew() )
|
if( ( drawingDangling || drawingShadows ) && !aLine->IsNew() )
|
||||||
{
|
{
|
||||||
|
@ -1958,7 +1958,7 @@ color = COLOR4D( 0.0, 0.3, 0.2, 1.0 );
|
||||||
m_gal->SetStrokeColor( color );
|
m_gal->SetStrokeColor( color );
|
||||||
m_gal->SetLineWidth( width );
|
m_gal->SetLineWidth( width );
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE || drawingShadows )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE || drawingShadows )
|
||||||
{
|
{
|
||||||
m_gal->DrawLine( aLine->GetStartPoint(), aLine->GetEndPoint() );
|
m_gal->DrawLine( aLine->GetStartPoint(), aLine->GetEndPoint() );
|
||||||
}
|
}
|
||||||
|
@ -1982,9 +1982,9 @@ color = COLOR4D( 0.0, 0.3, 0.2, 1.0 );
|
||||||
|
|
||||||
void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer )
|
void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer )
|
||||||
{
|
{
|
||||||
bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS;
|
bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS;
|
||||||
PLOT_DASH_TYPE lineStyle = aShape->GetEffectiveLineStyle();
|
LINE_STYLE lineStyle = aShape->GetEffectiveLineStyle();
|
||||||
COLOR4D color = getRenderColor( aShape, aLayer, drawingShadows );
|
COLOR4D color = getRenderColor( aShape, aLayer, drawingShadows );
|
||||||
|
|
||||||
if( drawingShadows && !( aShape->IsBrightened() || aShape->IsSelected() ) )
|
if( drawingShadows && !( aShape->IsBrightened() || aShape->IsSelected() ) )
|
||||||
return;
|
return;
|
||||||
|
@ -2084,7 +2084,7 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer )
|
||||||
m_gal->SetLineWidth( lineWidth );
|
m_gal->SetLineWidth( lineWidth );
|
||||||
m_gal->SetStrokeColor( color );
|
m_gal->SetStrokeColor( color );
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE || drawingShadows )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE || drawingShadows )
|
||||||
{
|
{
|
||||||
drawShape( aShape );
|
drawShape( aShape );
|
||||||
}
|
}
|
||||||
|
@ -2321,8 +2321,8 @@ void SCH_PAINTER::draw( const SCH_TEXTBOX* aTextBox, int aLayer )
|
||||||
|
|
||||||
if( borderWidth > 0 )
|
if( borderWidth > 0 )
|
||||||
{
|
{
|
||||||
COLOR4D borderColor = aTextBox->GetStroke().GetColor();
|
COLOR4D borderColor = aTextBox->GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE borderStyle = aTextBox->GetEffectiveLineStyle();
|
LINE_STYLE borderStyle = aTextBox->GetEffectiveLineStyle();
|
||||||
|
|
||||||
if( m_schSettings.m_OverrideItemColors || aTextBox->IsBrightened()
|
if( m_schSettings.m_OverrideItemColors || aTextBox->IsBrightened()
|
||||||
|| borderColor == COLOR4D::UNSPECIFIED )
|
|| borderColor == COLOR4D::UNSPECIFIED )
|
||||||
|
@ -2335,7 +2335,7 @@ void SCH_PAINTER::draw( const SCH_TEXTBOX* aTextBox, int aLayer )
|
||||||
m_gal->SetStrokeColor( borderColor );
|
m_gal->SetStrokeColor( borderColor );
|
||||||
m_gal->SetLineWidth( borderWidth );
|
m_gal->SetLineWidth( borderWidth );
|
||||||
|
|
||||||
if( borderStyle <= PLOT_DASH_TYPE::FIRST_TYPE || drawingShadows )
|
if( borderStyle <= LINE_STYLE::FIRST_TYPE || drawingShadows )
|
||||||
{
|
{
|
||||||
m_gal->DrawRectangle( aTextBox->GetPosition(), aTextBox->GetEnd() );
|
m_gal->DrawRectangle( aTextBox->GetPosition(), aTextBox->GetEnd() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,22 +99,22 @@ static COLOR4D GetColorFromInt( int color )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PLOT_DASH_TYPE GetPlotDashType( const ASCH_POLYLINE_LINESTYLE linestyle )
|
static LINE_STYLE GetPlotDashType( const ASCH_POLYLINE_LINESTYLE linestyle )
|
||||||
{
|
{
|
||||||
switch( linestyle )
|
switch( linestyle )
|
||||||
{
|
{
|
||||||
case ASCH_POLYLINE_LINESTYLE::SOLID: return PLOT_DASH_TYPE::SOLID;
|
case ASCH_POLYLINE_LINESTYLE::SOLID: return LINE_STYLE::SOLID;
|
||||||
case ASCH_POLYLINE_LINESTYLE::DASHED: return PLOT_DASH_TYPE::DASH;
|
case ASCH_POLYLINE_LINESTYLE::DASHED: return LINE_STYLE::DASH;
|
||||||
case ASCH_POLYLINE_LINESTYLE::DOTTED: return PLOT_DASH_TYPE::DOT;
|
case ASCH_POLYLINE_LINESTYLE::DOTTED: return LINE_STYLE::DOT;
|
||||||
case ASCH_POLYLINE_LINESTYLE::DASH_DOTTED: return PLOT_DASH_TYPE::DASHDOT;
|
case ASCH_POLYLINE_LINESTYLE::DASH_DOTTED: return LINE_STYLE::DASHDOT;
|
||||||
default: return PLOT_DASH_TYPE::DEFAULT;
|
default: return LINE_STYLE::DEFAULT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void SetSchShapeLine( const ASCH_BORDER_INTERFACE& elem, SCH_SHAPE* shape )
|
static void SetSchShapeLine( const ASCH_BORDER_INTERFACE& elem, SCH_SHAPE* shape )
|
||||||
{
|
{
|
||||||
shape->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID,
|
shape->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID,
|
||||||
GetColorFromInt( elem.Color ) ) );
|
GetColorFromInt( elem.Color ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ static void SetLibShapeLine( const ASCH_BORDER_INTERFACE& elem, LIB_SHAPE* shape
|
||||||
if( color == default_color || color == alt_default_color )
|
if( color == default_color || color == alt_default_color )
|
||||||
color = COLOR4D::UNSPECIFIED;
|
color = COLOR4D::UNSPECIFIED;
|
||||||
|
|
||||||
shape->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID, color ) );
|
shape->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID, color ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetLibShapeFillAndColor( const ASCH_FILL_INTERFACE& elem, LIB_SHAPE* shape, ALTIUM_SCH_RECORD aType, int aStrokeColor )
|
static void SetLibShapeFillAndColor( const ASCH_FILL_INTERFACE& elem, LIB_SHAPE* shape, ALTIUM_SCH_RECORD aType, int aStrokeColor )
|
||||||
|
@ -1368,10 +1368,10 @@ void SCH_ALTIUM_PLUGIN::AddTextBox(const ASCH_TEXT_FRAME *aElem )
|
||||||
textBox->SetFilled( false );
|
textBox->SetFilled( false );
|
||||||
|
|
||||||
if( aElem->ShowBorder )
|
if( aElem->ShowBorder )
|
||||||
textBox->SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::DEFAULT,
|
textBox->SetStroke( STROKE_PARAMS( 0, LINE_STYLE::DEFAULT,
|
||||||
GetColorFromInt( aElem->BorderColor ) ) );
|
GetColorFromInt( aElem->BorderColor ) ) );
|
||||||
else
|
else
|
||||||
textBox->SetStroke( STROKE_PARAMS( -1, PLOT_DASH_TYPE::DEFAULT,
|
textBox->SetStroke( STROKE_PARAMS( -1, LINE_STYLE::DEFAULT,
|
||||||
GetColorFromInt( aElem->BorderColor ) ) );
|
GetColorFromInt( aElem->BorderColor ) ) );
|
||||||
|
|
||||||
switch( aElem->Alignment )
|
switch( aElem->Alignment )
|
||||||
|
@ -1463,7 +1463,7 @@ void SCH_ALTIUM_PLUGIN::AddLibTextBox(const ASCH_TEXT_FRAME *aElem, std::vector<
|
||||||
textBox->SetFilled( false );
|
textBox->SetFilled( false );
|
||||||
|
|
||||||
if( aElem->ShowBorder )
|
if( aElem->ShowBorder )
|
||||||
textBox->SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::DEFAULT,
|
textBox->SetStroke( STROKE_PARAMS( 0, LINE_STYLE::DEFAULT,
|
||||||
GetColorFromInt( aElem->BorderColor ) ) );
|
GetColorFromInt( aElem->BorderColor ) ) );
|
||||||
else
|
else
|
||||||
textBox->SetStroke( STROKE_PARAMS( -1 ) );
|
textBox->SetStroke( STROKE_PARAMS( -1 ) );
|
||||||
|
@ -1518,7 +1518,7 @@ void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProper
|
||||||
SCH_LAYER_ID::LAYER_NOTES );
|
SCH_LAYER_ID::LAYER_NOTES );
|
||||||
|
|
||||||
line->SetEndPoint( elem.points.at( i + 1 ) + m_sheetOffset );
|
line->SetEndPoint( elem.points.at( i + 1 ) + m_sheetOffset );
|
||||||
line->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
line->SetFlags( IS_NEW );
|
line->SetFlags( IS_NEW );
|
||||||
|
|
||||||
|
@ -1542,7 +1542,7 @@ void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProper
|
||||||
SCH_LAYER_ID::LAYER_NOTES );
|
SCH_LAYER_ID::LAYER_NOTES );
|
||||||
|
|
||||||
line->SetEndPoint( polyPoints.at( k + 1 ) + m_sheetOffset );
|
line->SetEndPoint( polyPoints.at( k + 1 ) + m_sheetOffset );
|
||||||
line->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
line->SetFlags( IS_NEW );
|
line->SetFlags( IS_NEW );
|
||||||
currentScreen->Append( line );
|
currentScreen->Append( line );
|
||||||
|
@ -1596,7 +1596,7 @@ void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProper
|
||||||
schsym ) );
|
schsym ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
line->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
else if( i + 3 == elem.points.size() )
|
else if( i + 3 == elem.points.size() )
|
||||||
{
|
{
|
||||||
|
@ -1618,7 +1618,7 @@ void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProper
|
||||||
schsym ) );
|
schsym ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
line->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1647,7 +1647,7 @@ void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bezier->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
bezier->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1717,7 +1717,7 @@ void SCH_ALTIUM_PLUGIN::ParsePolyline( const std::map<wxString, wxString>& aProp
|
||||||
|
|
||||||
SetLibShapeLine( elem, line, ALTIUM_SCH_RECORD::POLYLINE );
|
SetLibShapeLine( elem, line, ALTIUM_SCH_RECORD::POLYLINE );
|
||||||
STROKE_PARAMS stroke = line->GetStroke();
|
STROKE_PARAMS stroke = line->GetStroke();
|
||||||
stroke.SetPlotStyle( GetPlotDashType( elem.LineStyle ) );
|
stroke.SetLineStyle( GetPlotDashType( elem.LineStyle ) );
|
||||||
|
|
||||||
line->SetStroke( stroke );
|
line->SetStroke( stroke );
|
||||||
}
|
}
|
||||||
|
@ -1916,7 +1916,7 @@ void SCH_ALTIUM_PLUGIN::ParseArc( const std::map<wxString, wxString>& aPropertie
|
||||||
|
|
||||||
circle->SetPosition( elem.m_Center + m_sheetOffset );
|
circle->SetPosition( elem.m_Center + m_sheetOffset );
|
||||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( arc_radius, 0 ) );
|
circle->SetEnd( circle->GetPosition() + VECTOR2I( arc_radius, 0 ) );
|
||||||
circle->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
currentScreen->Append( circle );
|
currentScreen->Append( circle );
|
||||||
}
|
}
|
||||||
|
@ -1932,7 +1932,7 @@ void SCH_ALTIUM_PLUGIN::ParseArc( const std::map<wxString, wxString>& aPropertie
|
||||||
arc->SetStart( elem.m_Center + startOffset + m_sheetOffset );
|
arc->SetStart( elem.m_Center + startOffset + m_sheetOffset );
|
||||||
arc->SetArcAngleAndEnd( includedAngle.Normalize(), true );
|
arc->SetArcAngleAndEnd( includedAngle.Normalize(), true );
|
||||||
|
|
||||||
arc->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
currentScreen->Append( arc );
|
currentScreen->Append( arc );
|
||||||
}
|
}
|
||||||
|
@ -2034,7 +2034,7 @@ void SCH_ALTIUM_PLUGIN::ParseEllipticalArc( const std::map<wxString, wxString>&
|
||||||
schbezier->SetBezierC1( bezier.C1 );
|
schbezier->SetBezierC1( bezier.C1 );
|
||||||
schbezier->SetBezierC2( bezier.C2 );
|
schbezier->SetBezierC2( bezier.C2 );
|
||||||
schbezier->SetEnd( bezier.End );
|
schbezier->SetEnd( bezier.End );
|
||||||
schbezier->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
schbezier->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
schbezier->RebuildBezierToSegmentsPointsList( elem.LineWidth );
|
schbezier->RebuildBezierToSegmentsPointsList( elem.LineWidth );
|
||||||
|
|
||||||
currentScreen->Append( schbezier );
|
currentScreen->Append( schbezier );
|
||||||
|
@ -2131,7 +2131,7 @@ void SCH_ALTIUM_PLUGIN::ParseEllipse( const std::map<wxString, wxString>& aPrope
|
||||||
schbezier->SetBezierC1( bezier.C1 );
|
schbezier->SetBezierC1( bezier.C1 );
|
||||||
schbezier->SetBezierC2( bezier.C2 );
|
schbezier->SetBezierC2( bezier.C2 );
|
||||||
schbezier->SetEnd( bezier.End );
|
schbezier->SetEnd( bezier.End );
|
||||||
schbezier->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID ) );
|
schbezier->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||||
schbezier->SetFillColor( GetColorFromInt( elem.AreaColor ) );
|
schbezier->SetFillColor( GetColorFromInt( elem.AreaColor ) );
|
||||||
|
|
||||||
if( elem.IsSolid )
|
if( elem.IsSolid )
|
||||||
|
@ -2245,7 +2245,7 @@ void SCH_ALTIUM_PLUGIN::ParseCircle( const std::map<wxString, wxString>& aProper
|
||||||
|
|
||||||
circle->SetPosition( elem.Center + m_sheetOffset );
|
circle->SetPosition( elem.Center + m_sheetOffset );
|
||||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( elem.Radius, 0 ) );
|
circle->SetEnd( circle->GetPosition() + VECTOR2I( elem.Radius, 0 ) );
|
||||||
circle->SetStroke( STROKE_PARAMS( 1, PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( 1, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
circle->SetFillColor( GetColorFromInt( elem.AreaColor ) );
|
circle->SetFillColor( GetColorFromInt( elem.AreaColor ) );
|
||||||
|
|
||||||
|
@ -2380,7 +2380,7 @@ void SCH_ALTIUM_PLUGIN::ParseSignalHarness( const std::map<wxString, wxString>&
|
||||||
for( VECTOR2I& point : elem.Points )
|
for( VECTOR2I& point : elem.Points )
|
||||||
poly->AddPoint( point + m_sheetOffset );
|
poly->AddPoint( point + m_sheetOffset );
|
||||||
|
|
||||||
poly->SetStroke( STROKE_PARAMS( elem.LineWidth, PLOT_DASH_TYPE::SOLID,
|
poly->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID,
|
||||||
GetColorFromInt( elem.Color ) ) );
|
GetColorFromInt( elem.Color ) ) );
|
||||||
poly->SetFlags( IS_NEW );
|
poly->SetFlags( IS_NEW );
|
||||||
|
|
||||||
|
@ -2720,7 +2720,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1, false );
|
aKsymbol->AddDrawItem( line1, false );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -50 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -50 ) } );
|
||||||
|
|
||||||
|
@ -2728,7 +2728,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
||||||
aKsymbol->AddDrawItem( circle, false );
|
aKsymbol->AddDrawItem( circle, false );
|
||||||
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), LINE_STYLE::SOLID ) );
|
||||||
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -75 ) } );
|
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -75 ) } );
|
||||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 25 ), 0 ) );
|
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 25 ), 0 ) );
|
||||||
}
|
}
|
||||||
|
@ -2736,7 +2736,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
@ -2749,13 +2749,13 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line, false );
|
aKsymbol->AddDrawItem( line, false );
|
||||||
line->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line->AddPoint( { 0, 0 } );
|
line->AddPoint( { 0, 0 } );
|
||||||
line->AddPoint( { 0, schIUScale.MilsToIU( -72 ) } );
|
line->AddPoint( { 0, schIUScale.MilsToIU( -72 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* bezier = new LIB_SHAPE( aKsymbol, SHAPE_T::BEZIER );
|
LIB_SHAPE* bezier = new LIB_SHAPE( aKsymbol, SHAPE_T::BEZIER );
|
||||||
aKsymbol->AddDrawItem( bezier, false );
|
aKsymbol->AddDrawItem( bezier, false );
|
||||||
bezier->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), PLOT_DASH_TYPE::SOLID ) );
|
bezier->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), LINE_STYLE::SOLID ) );
|
||||||
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -50 ) } );
|
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -87 ) } );
|
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -87 ) } );
|
||||||
bezier->AddPoint( { schIUScale.MilsToIU( -30 ), schIUScale.MilsToIU( -63 ) } );
|
bezier->AddPoint( { schIUScale.MilsToIU( -30 ), schIUScale.MilsToIU( -63 ) } );
|
||||||
|
@ -2770,7 +2770,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1, false );
|
aKsymbol->AddDrawItem( line1, false );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
|
@ -2778,25 +2778,25 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line3, false );
|
aKsymbol->AddDrawItem( line3, false );
|
||||||
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( -70 ), schIUScale.MilsToIU( -130 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( -70 ), schIUScale.MilsToIU( -130 ) } );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( 70 ), schIUScale.MilsToIU( -130 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( 70 ), schIUScale.MilsToIU( -130 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line4, false );
|
aKsymbol->AddDrawItem( line4, false );
|
||||||
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( -40 ), schIUScale.MilsToIU( -160 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( -40 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( 40 ), schIUScale.MilsToIU( -160 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( 40 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line5 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line5 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line5, false );
|
aKsymbol->AddDrawItem( line5, false );
|
||||||
line5->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line5->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line5->AddPoint( { schIUScale.MilsToIU( -10 ), schIUScale.MilsToIU( -190 ) } );
|
line5->AddPoint( { schIUScale.MilsToIU( -10 ), schIUScale.MilsToIU( -190 ) } );
|
||||||
line5->AddPoint( { schIUScale.MilsToIU( 10 ), schIUScale.MilsToIU( -190 ) } );
|
line5->AddPoint( { schIUScale.MilsToIU( 10 ), schIUScale.MilsToIU( -190 ) } );
|
||||||
}
|
}
|
||||||
|
@ -2804,7 +2804,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
|
@ -2814,7 +2814,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -150 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -150 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
@ -2822,7 +2822,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
|
|
||||||
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line3, false );
|
aKsymbol->AddDrawItem( line3, false );
|
||||||
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -200 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
}
|
}
|
||||||
|
@ -2830,7 +2830,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
|
@ -2845,25 +2845,25 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1, false );
|
aKsymbol->AddDrawItem( line1, false );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -160 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -160 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -160 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -160 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line3, false );
|
aKsymbol->AddDrawItem( line3, false );
|
||||||
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( -60 ), schIUScale.MilsToIU( -200 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( -60 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( 60 ), schIUScale.MilsToIU( -200 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( 60 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line4, false );
|
aKsymbol->AddDrawItem( line4, false );
|
||||||
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( -20 ), schIUScale.MilsToIU( -240 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( -20 ), schIUScale.MilsToIU( -240 ) } );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( 20 ), schIUScale.MilsToIU( -240 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( 20 ), schIUScale.MilsToIU( -240 ) } );
|
||||||
|
|
||||||
|
@ -2872,7 +2872,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
|
|
||||||
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
||||||
aKsymbol->AddDrawItem( circle, false );
|
aKsymbol->AddDrawItem( circle, false );
|
||||||
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -160 ) } );
|
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 120 ), 0 ) );
|
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 120 ), 0 ) );
|
||||||
|
|
||||||
|
@ -2882,13 +2882,13 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1, false );
|
aKsymbol->AddDrawItem( line1, false );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -200 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -200 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
|
|
||||||
|
@ -2904,13 +2904,13 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||||
|
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1, false );
|
aKsymbol->AddDrawItem( line1, false );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2, false );
|
aKsymbol->AddDrawItem( line2, false );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 50 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 50 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
|
@ -3036,7 +3036,7 @@ void SCH_ALTIUM_PLUGIN::ParseHarnessPort( const ASCH_PORT& aElem )
|
||||||
textBox->SetFillColor( HARNESS_PORT_COLOR_DEFAULT_BACKGROUND );
|
textBox->SetFillColor( HARNESS_PORT_COLOR_DEFAULT_BACKGROUND );
|
||||||
textBox->SetFillMode( FILL_T::FILLED_WITH_COLOR );
|
textBox->SetFillMode( FILL_T::FILLED_WITH_COLOR );
|
||||||
|
|
||||||
textBox->SetStroke( STROKE_PARAMS( 2, PLOT_DASH_TYPE::DEFAULT,
|
textBox->SetStroke( STROKE_PARAMS( 2, LINE_STYLE::DEFAULT,
|
||||||
HARNESS_PORT_COLOR_DEFAULT_OUTLINE ) );
|
HARNESS_PORT_COLOR_DEFAULT_OUTLINE ) );
|
||||||
|
|
||||||
switch( aElem.Alignment )
|
switch( aElem.Alignment )
|
||||||
|
|
|
@ -1621,7 +1621,7 @@ const LIB_SYMBOL* CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef( const SYMDEF_ID& aSymd
|
||||||
{
|
{
|
||||||
FIGURE fig = figPair.second;
|
FIGURE fig = figPair.second;
|
||||||
int lineThickness = getLineThickness( fig.LineCodeID );
|
int lineThickness = getLineThickness( fig.LineCodeID );
|
||||||
PLOT_DASH_TYPE linestyle = getLineStyle( fig.LineCodeID );
|
LINE_STYLE linestyle = getLineStyle( fig.LineCodeID );
|
||||||
|
|
||||||
if( fig.Shape.Type == SHAPE_TYPE::OPENSHAPE )
|
if( fig.Shape.Type == SHAPE_TYPE::OPENSHAPE )
|
||||||
{
|
{
|
||||||
|
@ -2050,7 +2050,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadLibrarySymbolShapeVertices( const std::vect
|
||||||
}
|
}
|
||||||
|
|
||||||
shape->SetUnit( aGateNumber );
|
shape->SetUnit( aGateNumber );
|
||||||
shape->SetStroke( STROKE_PARAMS( aLineThickness, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( aLineThickness, LINE_STYLE::SOLID ) );
|
||||||
aSymbol->AddDrawItem( shape, false );
|
aSymbol->AddDrawItem( shape, false );
|
||||||
|
|
||||||
prev = cur;
|
prev = cur;
|
||||||
|
@ -2379,7 +2379,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices( const std::vector<VERTEX>& a
|
||||||
const bool& aMirrorInvert )
|
const bool& aMirrorInvert )
|
||||||
{
|
{
|
||||||
int lineWidth = KiROUND( getLineThickness( aCadstarLineCodeID ) * aScalingFactor );
|
int lineWidth = KiROUND( getLineThickness( aCadstarLineCodeID ) * aScalingFactor );
|
||||||
PLOT_DASH_TYPE lineStyle = getLineStyle( aCadstarLineCodeID );
|
LINE_STYLE lineStyle = getLineStyle( aCadstarLineCodeID );
|
||||||
|
|
||||||
const VERTEX* prev = &aCadstarVertices.at( 0 );
|
const VERTEX* prev = &aCadstarVertices.at( 0 );
|
||||||
const VERTEX* cur;
|
const VERTEX* cur;
|
||||||
|
@ -2767,21 +2767,21 @@ int CADSTAR_SCH_ARCHIVE_LOADER::getLineThickness( const LINECODE_ID& aCadstarLin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PLOT_DASH_TYPE CADSTAR_SCH_ARCHIVE_LOADER::getLineStyle( const LINECODE_ID& aCadstarLineCodeID )
|
LINE_STYLE CADSTAR_SCH_ARCHIVE_LOADER::getLineStyle( const LINECODE_ID& aCadstarLineCodeID )
|
||||||
{
|
{
|
||||||
wxCHECK( Assignments.Codedefs.LineCodes.find( aCadstarLineCodeID )
|
wxCHECK( Assignments.Codedefs.LineCodes.find( aCadstarLineCodeID )
|
||||||
!= Assignments.Codedefs.LineCodes.end(),
|
!= Assignments.Codedefs.LineCodes.end(),
|
||||||
PLOT_DASH_TYPE::SOLID );
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
switch( Assignments.Codedefs.LineCodes.at( aCadstarLineCodeID ).Style )
|
switch( Assignments.Codedefs.LineCodes.at( aCadstarLineCodeID ).Style )
|
||||||
{
|
{
|
||||||
case LINESTYLE::DASH: return PLOT_DASH_TYPE::DASH;
|
case LINESTYLE::DASH: return LINE_STYLE::DASH;
|
||||||
case LINESTYLE::DASHDOT: return PLOT_DASH_TYPE::DASHDOT;
|
case LINESTYLE::DASHDOT: return LINE_STYLE::DASHDOT;
|
||||||
case LINESTYLE::DASHDOTDOT: return PLOT_DASH_TYPE::DASHDOT; //TODO: update in future
|
case LINESTYLE::DASHDOTDOT: return LINE_STYLE::DASHDOT; //TODO: update in future
|
||||||
case LINESTYLE::DOT: return PLOT_DASH_TYPE::DOT;
|
case LINESTYLE::DOT: return LINE_STYLE::DOT;
|
||||||
case LINESTYLE::SOLID: return PLOT_DASH_TYPE::SOLID;
|
case LINESTYLE::SOLID: return LINE_STYLE::SOLID;
|
||||||
default: return PLOT_DASH_TYPE::DEFAULT;
|
default: return LINE_STYLE::DEFAULT;
|
||||||
}
|
}
|
||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <sch_plugins/cadstar/cadstar_sch_archive_parser.h>
|
#include <sch_plugins/cadstar/cadstar_sch_archive_parser.h>
|
||||||
|
|
||||||
#include <layer_ids.h> // SCH_LAYER_ID
|
#include <layer_ids.h> // SCH_LAYER_ID
|
||||||
#include <plotters/plotter.h> // PLOT_DASH_TYPE
|
#include <plotters/plotter.h> // LINE_STYLE
|
||||||
#include <pin_type.h> // ELECTRICAL_PINTYPE
|
#include <pin_type.h> // ELECTRICAL_PINTYPE
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -247,7 +247,7 @@ private:
|
||||||
bool isAttributeVisible( const ATTRIBUTE_ID& aCadstarAttributeID );
|
bool isAttributeVisible( const ATTRIBUTE_ID& aCadstarAttributeID );
|
||||||
|
|
||||||
int getLineThickness( const LINECODE_ID& aCadstarLineCodeID );
|
int getLineThickness( const LINECODE_ID& aCadstarLineCodeID );
|
||||||
PLOT_DASH_TYPE getLineStyle( const LINECODE_ID& aCadstarLineCodeID );
|
LINE_STYLE getLineStyle( const LINECODE_ID& aCadstarLineCodeID );
|
||||||
PART getPart( const PART_ID& aCadstarPartID );
|
PART getPart( const PART_ID& aCadstarPartID );
|
||||||
ROUTECODE getRouteCode( const ROUTECODE_ID& aCadstarRouteCodeID );
|
ROUTECODE getRouteCode( const ROUTECODE_ID& aCadstarRouteCodeID );
|
||||||
TEXTCODE getTextCode( const TEXTCODE_ID& aCadstarTextCodeID );
|
TEXTCODE getTextCode( const TEXTCODE_ID& aCadstarTextCodeID );
|
||||||
|
|
|
@ -1523,7 +1523,7 @@ SCH_SHAPE* SCH_EAGLE_PLUGIN::loadPolyLine( wxXmlNode* aPolygonNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
poly->SetLayer( kiCadLayer( epoly.layer ) );
|
poly->SetLayer( kiCadLayer( epoly.layer ) );
|
||||||
poly->SetStroke( STROKE_PARAMS( epoly.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
poly->SetStroke( STROKE_PARAMS( epoly.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
poly->SetFillMode( FILL_T::FILLED_SHAPE );
|
poly->SetFillMode( FILL_T::FILLED_SHAPE );
|
||||||
|
|
||||||
return poly.release();
|
return poly.release();
|
||||||
|
@ -1552,7 +1552,7 @@ SCH_ITEM* SCH_EAGLE_PLUGIN::loadWire( wxXmlNode* aWireNode, SEG& endpoints )
|
||||||
arc->SetStart( start );
|
arc->SetStart( start );
|
||||||
arc->SetArcAngleAndEnd( -EDA_ANGLE( *ewire.curve, DEGREES_T ), true ); // KiCad rotates the other way
|
arc->SetArcAngleAndEnd( -EDA_ANGLE( *ewire.curve, DEGREES_T ), true ); // KiCad rotates the other way
|
||||||
arc->SetLayer( kiCadLayer( ewire.layer ) );
|
arc->SetLayer( kiCadLayer( ewire.layer ) );
|
||||||
arc->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
return arc.release();
|
return arc.release();
|
||||||
}
|
}
|
||||||
|
@ -1563,7 +1563,7 @@ SCH_ITEM* SCH_EAGLE_PLUGIN::loadWire( wxXmlNode* aWireNode, SEG& endpoints )
|
||||||
line->SetStartPoint( start );
|
line->SetStartPoint( start );
|
||||||
line->SetEndPoint( end );
|
line->SetEndPoint( end );
|
||||||
line->SetLayer( kiCadLayer( ewire.layer ) );
|
line->SetLayer( kiCadLayer( ewire.layer ) );
|
||||||
line->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
return line.release();
|
return line.release();
|
||||||
}
|
}
|
||||||
|
@ -1579,7 +1579,7 @@ SCH_SHAPE* SCH_EAGLE_PLUGIN::loadCircle( wxXmlNode* aCircleNode )
|
||||||
circle->SetLayer( kiCadLayer( c.layer ) );
|
circle->SetLayer( kiCadLayer( c.layer ) );
|
||||||
circle->SetPosition( center );
|
circle->SetPosition( center );
|
||||||
circle->SetEnd( VECTOR2I( center.x + c.radius.ToSchUnits(), center.y ) );
|
circle->SetEnd( VECTOR2I( center.x + c.radius.ToSchUnits(), center.y ) );
|
||||||
circle->SetStroke( STROKE_PARAMS( c.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( c.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
return circle.release();
|
return circle.release();
|
||||||
}
|
}
|
||||||
|
@ -2296,7 +2296,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolCircle( std::unique_ptr<LIB_SYMBOL>& aSym
|
||||||
|
|
||||||
circle->SetPosition( center );
|
circle->SetPosition( center );
|
||||||
circle->SetEnd( VECTOR2I( center.x + c.radius.ToSchUnits(), center.y ) );
|
circle->SetEnd( VECTOR2I( center.x + c.radius.ToSchUnits(), center.y ) );
|
||||||
circle->SetStroke( STROKE_PARAMS( c.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( c.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
circle->SetUnit( aGateNumber );
|
circle->SetUnit( aGateNumber );
|
||||||
|
|
||||||
return circle;
|
return circle;
|
||||||
|
@ -2363,12 +2363,12 @@ LIB_ITEM* SCH_EAGLE_PLUGIN::loadSymbolWire( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
||||||
VECTOR2I centerStartVector = ( begin - center ) * ( ewire.width.ToSchUnits() / radius );
|
VECTOR2I centerStartVector = ( begin - center ) * ( ewire.width.ToSchUnits() / radius );
|
||||||
begin = center + centerStartVector;
|
begin = center + centerStartVector;
|
||||||
|
|
||||||
arc->SetStroke( STROKE_PARAMS( 1, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( 1, LINE_STYLE::SOLID ) );
|
||||||
arc->SetFillMode( FILL_T::FILLED_SHAPE );
|
arc->SetFillMode( FILL_T::FILLED_SHAPE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
arc->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
arc->SetCenter( center );
|
arc->SetCenter( center );
|
||||||
|
@ -2385,7 +2385,7 @@ LIB_ITEM* SCH_EAGLE_PLUGIN::loadSymbolWire( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
||||||
poly->AddPoint( begin );
|
poly->AddPoint( begin );
|
||||||
poly->AddPoint( end );
|
poly->AddPoint( end );
|
||||||
poly->SetUnit( aGateNumber );
|
poly->SetUnit( aGateNumber );
|
||||||
poly->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
poly->SetStroke( STROKE_PARAMS( ewire.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
return poly;
|
return poly;
|
||||||
}
|
}
|
||||||
|
@ -2426,7 +2426,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolPolyLine( std::unique_ptr<LIB_SYMBOL>& aS
|
||||||
vertex = vertex->GetNext();
|
vertex = vertex->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
poly->SetStroke( STROKE_PARAMS( epoly.width.ToSchUnits(), PLOT_DASH_TYPE::SOLID ) );
|
poly->SetStroke( STROKE_PARAMS( epoly.width.ToSchUnits(), LINE_STYLE::SOLID ) );
|
||||||
poly->SetFillMode( FILL_T::FILLED_SHAPE );
|
poly->SetFillMode( FILL_T::FILLED_SHAPE );
|
||||||
poly->SetUnit( aGateNumber );
|
poly->SetUnit( aGateNumber );
|
||||||
|
|
||||||
|
|
|
@ -145,16 +145,16 @@ static LIB_ID EasyEdaToKiCadLibID( const wxString& aLibName, const wxString& aLi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PLOT_DASH_TYPE ConvertStrokeStyle( const wxString& aStyle )
|
static LINE_STYLE ConvertStrokeStyle( const wxString& aStyle )
|
||||||
{
|
{
|
||||||
if( aStyle == wxS( "0" ) )
|
if( aStyle == wxS( "0" ) )
|
||||||
return PLOT_DASH_TYPE::SOLID;
|
return LINE_STYLE::SOLID;
|
||||||
else if( aStyle == wxS( "1" ) )
|
else if( aStyle == wxS( "1" ) )
|
||||||
return PLOT_DASH_TYPE::DASH;
|
return LINE_STYLE::DASH;
|
||||||
else if( aStyle == wxS( "2" ) )
|
else if( aStyle == wxS( "2" ) )
|
||||||
return PLOT_DASH_TYPE::DOT;
|
return LINE_STYLE::DOT;
|
||||||
|
|
||||||
return PLOT_DASH_TYPE::DEFAULT;
|
return LINE_STYLE::DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1 );
|
aKsymbol->AddDrawItem( line1 );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -50 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -50 ) } );
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
||||||
aKsymbol->AddDrawItem( circle );
|
aKsymbol->AddDrawItem( circle );
|
||||||
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), LINE_STYLE::SOLID ) );
|
||||||
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -75 ) } );
|
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -75 ) } );
|
||||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 25 ), 0 ) );
|
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 25 ), 0 ) );
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
@ -253,13 +253,13 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line );
|
aKsymbol->AddDrawItem( line );
|
||||||
line->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line->AddPoint( { 0, 0 } );
|
line->AddPoint( { 0, 0 } );
|
||||||
line->AddPoint( { 0, schIUScale.MilsToIU( -72 ) } );
|
line->AddPoint( { 0, schIUScale.MilsToIU( -72 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* bezier = new LIB_SHAPE( aKsymbol, SHAPE_T::BEZIER );
|
LIB_SHAPE* bezier = new LIB_SHAPE( aKsymbol, SHAPE_T::BEZIER );
|
||||||
aKsymbol->AddDrawItem( bezier );
|
aKsymbol->AddDrawItem( bezier );
|
||||||
bezier->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), PLOT_DASH_TYPE::SOLID ) );
|
bezier->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 5 ), LINE_STYLE::SOLID ) );
|
||||||
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -50 ) } );
|
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -87 ) } );
|
bezier->AddPoint( { schIUScale.MilsToIU( 30 ), schIUScale.MilsToIU( -87 ) } );
|
||||||
bezier->AddPoint( { schIUScale.MilsToIU( -30 ), schIUScale.MilsToIU( -63 ) } );
|
bezier->AddPoint( { schIUScale.MilsToIU( -30 ), schIUScale.MilsToIU( -63 ) } );
|
||||||
|
@ -274,7 +274,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1 );
|
aKsymbol->AddDrawItem( line1 );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
|
@ -282,25 +282,25 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line3 );
|
aKsymbol->AddDrawItem( line3 );
|
||||||
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( -70 ), schIUScale.MilsToIU( -120 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( -70 ), schIUScale.MilsToIU( -120 ) } );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( 70 ), schIUScale.MilsToIU( -120 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( 70 ), schIUScale.MilsToIU( -120 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line4 );
|
aKsymbol->AddDrawItem( line4 );
|
||||||
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( -40 ), schIUScale.MilsToIU( -140 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( -40 ), schIUScale.MilsToIU( -140 ) } );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( 40 ), schIUScale.MilsToIU( -140 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( 40 ), schIUScale.MilsToIU( -140 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line5 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line5 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line5 );
|
aKsymbol->AddDrawItem( line5 );
|
||||||
line5->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line5->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line5->AddPoint( { schIUScale.MilsToIU( -10 ), schIUScale.MilsToIU( -160 ) } );
|
line5->AddPoint( { schIUScale.MilsToIU( -10 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
line5->AddPoint( { schIUScale.MilsToIU( 10 ), schIUScale.MilsToIU( -160 ) } );
|
line5->AddPoint( { schIUScale.MilsToIU( 10 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -160 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
|
@ -318,7 +318,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -150 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -150 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
@ -326,7 +326,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
|
|
||||||
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line3 );
|
aKsymbol->AddDrawItem( line3 );
|
||||||
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -200 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 25 ), schIUScale.MilsToIU( -50 ) } );
|
||||||
|
@ -349,25 +349,25 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1 );
|
aKsymbol->AddDrawItem( line1 );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -160 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -160 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -160 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -160 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line3 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line3 );
|
aKsymbol->AddDrawItem( line3 );
|
||||||
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line3->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( -60 ), schIUScale.MilsToIU( -200 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( -60 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
line3->AddPoint( { schIUScale.MilsToIU( 60 ), schIUScale.MilsToIU( -200 ) } );
|
line3->AddPoint( { schIUScale.MilsToIU( 60 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line4 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line4 );
|
aKsymbol->AddDrawItem( line4 );
|
||||||
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line4->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( -20 ), schIUScale.MilsToIU( -240 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( -20 ), schIUScale.MilsToIU( -240 ) } );
|
||||||
line4->AddPoint( { schIUScale.MilsToIU( 20 ), schIUScale.MilsToIU( -240 ) } );
|
line4->AddPoint( { schIUScale.MilsToIU( 20 ), schIUScale.MilsToIU( -240 ) } );
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
|
|
||||||
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
LIB_SHAPE* circle = new LIB_SHAPE( aKsymbol, SHAPE_T::CIRCLE );
|
||||||
aKsymbol->AddDrawItem( circle );
|
aKsymbol->AddDrawItem( circle );
|
||||||
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
circle->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -160 ) } );
|
circle->SetPosition( { schIUScale.MilsToIU( 0 ), schIUScale.MilsToIU( -160 ) } );
|
||||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 120 ), 0 ) );
|
circle->SetEnd( circle->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 120 ), 0 ) );
|
||||||
|
|
||||||
|
@ -386,13 +386,13 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
{
|
{
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1 );
|
aKsymbol->AddDrawItem( line1 );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -200 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -200 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -100 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -200 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 100 ), schIUScale.MilsToIU( -200 ) } );
|
||||||
|
|
||||||
|
@ -408,13 +408,13 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, EASYEDA::POWER_F
|
||||||
|
|
||||||
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line1 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line1 );
|
aKsymbol->AddDrawItem( line1 );
|
||||||
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line1->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line1->AddPoint( { 0, 0 } );
|
line1->AddPoint( { 0, 0 } );
|
||||||
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
line1->AddPoint( { 0, schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
LIB_SHAPE* line2 = new LIB_SHAPE( aKsymbol, SHAPE_T::POLY );
|
||||||
aKsymbol->AddDrawItem( line2 );
|
aKsymbol->AddDrawItem( line2 );
|
||||||
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), PLOT_DASH_TYPE::SOLID ) );
|
line2->SetStroke( STROKE_PARAMS( schIUScale.MilsToIU( 10 ), LINE_STYLE::SOLID ) );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( -50 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
line2->AddPoint( { schIUScale.MilsToIU( 50 ), schIUScale.MilsToIU( -100 ) } );
|
line2->AddPoint( { schIUScale.MilsToIU( 50 ), schIUScale.MilsToIU( -100 ) } );
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ void SCH_EASYEDA_PARSER::ParseSymbolShapes( LIB_SYMBOL* aSymbol
|
||||||
wxArrayString ptArr = wxSplit( arr[1], ' ', '\0' );
|
wxArrayString ptArr = wxSplit( arr[1], ' ', '\0' );
|
||||||
wxString strokeColor = arr[2];
|
wxString strokeColor = arr[2];
|
||||||
double lineWidth = Convert( arr[3] );
|
double lineWidth = Convert( arr[3] );
|
||||||
PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[4] );
|
LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[4] );
|
||||||
wxString fillColor = arr[5].Lower();
|
wxString fillColor = arr[5].Lower();
|
||||||
//bool locked = arr[7] != wxS( "0" );
|
//bool locked = arr[7] != wxS( "0" );
|
||||||
|
|
||||||
|
@ -480,12 +480,12 @@ void SCH_EASYEDA_PARSER::ParseSymbolShapes( LIB_SYMBOL* aSymbol
|
||||||
}
|
}
|
||||||
else if( elType == wxS( "PT" ) )
|
else if( elType == wxS( "PT" ) )
|
||||||
{
|
{
|
||||||
wxString pointsData = arr[1];
|
wxString pointsData = arr[1];
|
||||||
wxString strokeColor = arr[2];
|
wxString strokeColor = arr[2];
|
||||||
double lineWidth = Convert( arr[3] );
|
double lineWidth = Convert( arr[3] );
|
||||||
PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[4] );
|
LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[4] );
|
||||||
wxString fillColor = arr[5].Lower();
|
wxString fillColor = arr[5].Lower();
|
||||||
//bool locked = arr[7] != wxS( "0" );
|
//bool locked = arr[7] != wxS( "0" );
|
||||||
|
|
||||||
std::vector<SHAPE_LINE_CHAIN> lineChains =
|
std::vector<SHAPE_LINE_CHAIN> lineChains =
|
||||||
ParseLineChains( pointsData, schIUScale.MilsToIU( 10 ) );
|
ParseLineChains( pointsData, schIUScale.MilsToIU( 10 ) );
|
||||||
|
@ -596,12 +596,12 @@ void SCH_EASYEDA_PARSER::ParseSymbolShapes( LIB_SYMBOL* aSymbol
|
||||||
}
|
}
|
||||||
else if( elType == wxS( "A" ) )
|
else if( elType == wxS( "A" ) )
|
||||||
{
|
{
|
||||||
wxString data = arr[1];
|
wxString data = arr[1];
|
||||||
wxString strokeColor = arr[3];
|
wxString strokeColor = arr[3];
|
||||||
double lineWidth = Convert( arr[4] );
|
double lineWidth = Convert( arr[4] );
|
||||||
PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[5] );
|
LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[5] );
|
||||||
wxString fillColor = arr[6].Lower();
|
wxString fillColor = arr[6].Lower();
|
||||||
//bool locked = arr[8] != wxS( "0" );
|
//bool locked = arr[8] != wxS( "0" );
|
||||||
|
|
||||||
VECTOR2D start, end;
|
VECTOR2D start, end;
|
||||||
VECTOR2D rad( 10, 10 );
|
VECTOR2D rad( 10, 10 );
|
||||||
|
@ -706,12 +706,12 @@ void SCH_EASYEDA_PARSER::ParseSymbolShapes( LIB_SYMBOL* aSymbol
|
||||||
cr.x = !arr[3].empty() ? Convert( arr[3] ) : 0,
|
cr.x = !arr[3].empty() ? Convert( arr[3] ) : 0,
|
||||||
cr.y = !arr[4].empty() ? Convert( arr[4] ) : 0; // TODO: corner radius
|
cr.y = !arr[4].empty() ? Convert( arr[4] ) : 0; // TODO: corner radius
|
||||||
|
|
||||||
VECTOR2D size( Convert( arr[5] ), Convert( arr[6] ) );
|
VECTOR2D size( Convert( arr[5] ), Convert( arr[6] ) );
|
||||||
wxString strokeColor = arr[7];
|
wxString strokeColor = arr[7];
|
||||||
double lineWidth = Convert( arr[8] );
|
double lineWidth = Convert( arr[8] );
|
||||||
PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[9] );
|
LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[9] );
|
||||||
wxString fillColor = arr[10].Lower();
|
wxString fillColor = arr[10].Lower();
|
||||||
//bool locked = arr[12] != wxS( "0" );
|
//bool locked = arr[12] != wxS( "0" );
|
||||||
|
|
||||||
//if( cr.x == 0 )
|
//if( cr.x == 0 )
|
||||||
{
|
{
|
||||||
|
@ -743,13 +743,13 @@ void SCH_EASYEDA_PARSER::ParseSymbolShapes( LIB_SYMBOL* aSymbol
|
||||||
std::unique_ptr<LIB_SHAPE> circle =
|
std::unique_ptr<LIB_SHAPE> circle =
|
||||||
std::make_unique<LIB_SHAPE>( aSymbol, SHAPE_T::CIRCLE );
|
std::make_unique<LIB_SHAPE>( aSymbol, SHAPE_T::CIRCLE );
|
||||||
|
|
||||||
VECTOR2D center( Convert( arr[1] ), Convert( arr[2] ) );
|
VECTOR2D center( Convert( arr[1] ), Convert( arr[2] ) );
|
||||||
VECTOR2D radius( Convert( arr[3] ), Convert( arr[4] ) ); // TODO: corner radius
|
VECTOR2D radius( Convert( arr[3] ), Convert( arr[4] ) ); // TODO: corner radius
|
||||||
wxString strokeColor = arr[5];
|
wxString strokeColor = arr[5];
|
||||||
double lineWidth = Convert( arr[6] );
|
double lineWidth = Convert( arr[6] );
|
||||||
PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[7] );
|
LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[7] );
|
||||||
wxString fillColor = arr[8].Lower();
|
wxString fillColor = arr[8].Lower();
|
||||||
//bool locked = arr[10] != wxS( "0" );
|
//bool locked = arr[10] != wxS( "0" );
|
||||||
|
|
||||||
circle->SetCenter( RelPosSym( center ) );
|
circle->SetCenter( RelPosSym( center ) );
|
||||||
circle->SetEnd( RelPosSym( center + VECTOR2I( radius.x, 0 ) ) );
|
circle->SetEnd( RelPosSym( center + VECTOR2I( radius.x, 0 ) ) );
|
||||||
|
@ -1309,12 +1309,12 @@ void SCH_EASYEDA_PARSER::ParseSchematic( SCHEMATIC* aSchematic, SCH_SHEET* aRoot
|
||||||
}
|
}
|
||||||
else if( rootType == wxS( "W" ) )
|
else if( rootType == wxS( "W" ) )
|
||||||
{
|
{
|
||||||
wxArrayString ptArr = wxSplit( arr[1], ' ', '\0' );
|
wxArrayString ptArr = wxSplit( arr[1], ' ', '\0' );
|
||||||
wxString strokeColor = arr[2];
|
wxString strokeColor = arr[2];
|
||||||
//double lineWidth = Convert( arr[3] );
|
//double lineWidth = Convert( arr[3] );
|
||||||
//PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[4] );
|
//LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[4] );
|
||||||
wxString fillColor = arr[5].Lower();
|
wxString fillColor = arr[5].Lower();
|
||||||
//bool locked = arr[7] != wxS( "0" );
|
//bool locked = arr[7] != wxS( "0" );
|
||||||
|
|
||||||
SHAPE_LINE_CHAIN chain;
|
SHAPE_LINE_CHAIN chain;
|
||||||
|
|
||||||
|
@ -1433,12 +1433,12 @@ void SCH_EASYEDA_PARSER::ParseSchematic( SCHEMATIC* aSchematic, SCH_SHEET* aRoot
|
||||||
cr.x = !arr[3].empty() ? Convert( arr[3] ) : 0,
|
cr.x = !arr[3].empty() ? Convert( arr[3] ) : 0,
|
||||||
cr.y = !arr[4].empty() ? Convert( arr[4] ) : 0; // TODO: corner radius
|
cr.y = !arr[4].empty() ? Convert( arr[4] ) : 0; // TODO: corner radius
|
||||||
|
|
||||||
VECTOR2D size( Convert( arr[5] ), Convert( arr[6] ) );
|
VECTOR2D size( Convert( arr[5] ), Convert( arr[6] ) );
|
||||||
wxString strokeColor = arr[7];
|
wxString strokeColor = arr[7];
|
||||||
double lineWidth = Convert( arr[8] );
|
double lineWidth = Convert( arr[8] );
|
||||||
PLOT_DASH_TYPE strokeStyle = ConvertStrokeStyle( arr[9] );
|
LINE_STYLE strokeStyle = ConvertStrokeStyle( arr[9] );
|
||||||
wxString fillColor = arr[10].Lower();
|
wxString fillColor = arr[10].Lower();
|
||||||
//bool locked = arr[12] != wxS( "0" );
|
//bool locked = arr[12] != wxS( "0" );
|
||||||
|
|
||||||
//if( cr.x == 0 )
|
//if( cr.x == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,18 +81,18 @@ double SCH_EASYEDAPRO_PARSER::SizeToKi( wxString aValue )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PLOT_DASH_TYPE ConvertStrokeStyle( int aStyle )
|
static LINE_STYLE ConvertStrokeStyle( int aStyle )
|
||||||
{
|
{
|
||||||
if( aStyle == 0 )
|
if( aStyle == 0 )
|
||||||
return PLOT_DASH_TYPE::SOLID;
|
return LINE_STYLE::SOLID;
|
||||||
else if( aStyle == 1 )
|
else if( aStyle == 1 )
|
||||||
return PLOT_DASH_TYPE::DASH;
|
return LINE_STYLE::DASH;
|
||||||
else if( aStyle == 2 )
|
else if( aStyle == 2 )
|
||||||
return PLOT_DASH_TYPE::DOT;
|
return LINE_STYLE::DOT;
|
||||||
else if( aStyle == 3 )
|
else if( aStyle == 3 )
|
||||||
return PLOT_DASH_TYPE::DASHDOT;
|
return LINE_STYLE::DASHDOT;
|
||||||
|
|
||||||
return PLOT_DASH_TYPE::DEFAULT;
|
return LINE_STYLE::DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ void SCH_EASYEDAPRO_PARSER::ApplyLineStyle( const std::map<wxString, nlohmann::j
|
||||||
if( style.at( 3 ).is_number() )
|
if( style.at( 3 ).is_number() )
|
||||||
{
|
{
|
||||||
int dashStyle = style.at( 3 );
|
int dashStyle = style.at( 3 );
|
||||||
stroke.SetPlotStyle( ConvertStrokeStyle( dashStyle ) );
|
stroke.SetLineStyle( ConvertStrokeStyle( dashStyle ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( style.at( 5 ).is_number() )
|
if( style.at( 5 ).is_number() )
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseArc()
|
||||||
VECTOR2I midPoint( 1, 1 );
|
VECTOR2I midPoint( 1, 1 );
|
||||||
VECTOR2I endPoint( 0, 1 );
|
VECTOR2I endPoint( 0, 1 );
|
||||||
bool hasMidPoint = false;
|
bool hasMidPoint = false;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
|
|
||||||
// Parameters for legacy format
|
// Parameters for legacy format
|
||||||
|
@ -1189,7 +1189,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseBezier()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bezier." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bezier." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
|
|
||||||
std::unique_ptr<LIB_SHAPE> bezier = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::BEZIER );
|
std::unique_ptr<LIB_SHAPE> bezier = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::BEZIER );
|
||||||
|
@ -1272,7 +1272,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseCircle()
|
||||||
T token;
|
T token;
|
||||||
VECTOR2I center( 0, 0 );
|
VECTOR2I center( 0, 0 );
|
||||||
int radius = 1; // defaulting to 0 could result in troublesome math....
|
int radius = 1; // defaulting to 0 could result in troublesome math....
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
|
|
||||||
std::unique_ptr<LIB_SHAPE> circle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::CIRCLE );
|
std::unique_ptr<LIB_SHAPE> circle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::CIRCLE );
|
||||||
|
@ -1546,7 +1546,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parsePolyLine()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a poly." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a poly." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_SHAPE> poly = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::POLY );
|
std::unique_ptr<LIB_SHAPE> poly = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::POLY );
|
||||||
|
|
||||||
|
@ -1614,7 +1614,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseRectangle()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a rectangle." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a rectangle." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_SHAPE> rectangle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::RECTANGLE );
|
std::unique_ptr<LIB_SHAPE> rectangle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::RECTANGLE );
|
||||||
|
|
||||||
|
@ -1734,7 +1734,7 @@ LIB_TEXTBOX* SCH_SEXPR_PARSER::parseTextBox()
|
||||||
VECTOR2I size;
|
VECTOR2I size;
|
||||||
bool foundEnd = false;
|
bool foundEnd = false;
|
||||||
bool foundSize = false;
|
bool foundSize = false;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_TEXTBOX> textBox = std::make_unique<LIB_TEXTBOX>( nullptr );
|
std::unique_ptr<LIB_TEXTBOX> textBox = std::make_unique<LIB_TEXTBOX>( nullptr );
|
||||||
|
|
||||||
|
@ -3117,7 +3117,7 @@ SCH_SHEET* SCH_SEXPR_PARSER::parseSheet()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a sheet." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a sheet." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
SCH_FIELD* field;
|
SCH_FIELD* field;
|
||||||
std::vector<SCH_FIELD> fields;
|
std::vector<SCH_FIELD> fields;
|
||||||
|
@ -3401,7 +3401,7 @@ SCH_BUS_WIRE_ENTRY* SCH_SEXPR_PARSER::parseBusEntry()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bus entry." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bus entry." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
std::unique_ptr<SCH_BUS_WIRE_ENTRY> busEntry = std::make_unique<SCH_BUS_WIRE_ENTRY>();
|
std::unique_ptr<SCH_BUS_WIRE_ENTRY> busEntry = std::make_unique<SCH_BUS_WIRE_ENTRY>();
|
||||||
|
|
||||||
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||||
|
@ -3452,7 +3452,7 @@ SCH_BUS_WIRE_ENTRY* SCH_SEXPR_PARSER::parseBusEntry()
|
||||||
SCH_SHAPE* SCH_SEXPR_PARSER::parseSchPolyLine()
|
SCH_SHAPE* SCH_SEXPR_PARSER::parseSchPolyLine()
|
||||||
{
|
{
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
int layer = LAYER_NOTES;
|
int layer = LAYER_NOTES;
|
||||||
|
|
||||||
|
@ -3516,7 +3516,7 @@ SCH_LINE* SCH_SEXPR_PARSER::parseLine()
|
||||||
// parseSchPolyLine() that can handle true polygons, and not only one segment.
|
// parseSchPolyLine() that can handle true polygons, and not only one segment.
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
int layer;
|
int layer;
|
||||||
|
|
||||||
switch( CurTok() )
|
switch( CurTok() )
|
||||||
|
@ -3588,7 +3588,7 @@ SCH_SHAPE* SCH_SEXPR_PARSER::parseSchArc()
|
||||||
VECTOR2I startPoint;
|
VECTOR2I startPoint;
|
||||||
VECTOR2I midPoint;
|
VECTOR2I midPoint;
|
||||||
VECTOR2I endPoint;
|
VECTOR2I endPoint;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<SCH_SHAPE> arc = std::make_unique<SCH_SHAPE>( SHAPE_T::ARC );
|
std::unique_ptr<SCH_SHAPE> arc = std::make_unique<SCH_SHAPE>( SHAPE_T::ARC );
|
||||||
|
|
||||||
|
@ -3652,7 +3652,7 @@ SCH_SHAPE* SCH_SEXPR_PARSER::parseSchCircle()
|
||||||
T token;
|
T token;
|
||||||
VECTOR2I center;
|
VECTOR2I center;
|
||||||
int radius = 0;
|
int radius = 0;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<SCH_SHAPE> circle = std::make_unique<SCH_SHAPE>( SHAPE_T::CIRCLE );
|
std::unique_ptr<SCH_SHAPE> circle = std::make_unique<SCH_SHAPE>( SHAPE_T::CIRCLE );
|
||||||
|
|
||||||
|
@ -3710,7 +3710,7 @@ SCH_SHAPE* SCH_SEXPR_PARSER::parseSchRectangle()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a rectangle." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a rectangle." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<SCH_SHAPE> rectangle = std::make_unique<SCH_SHAPE>( SHAPE_T::RECTANGLE );
|
std::unique_ptr<SCH_SHAPE> rectangle = std::make_unique<SCH_SHAPE>( SHAPE_T::RECTANGLE );
|
||||||
|
|
||||||
|
@ -3765,7 +3765,7 @@ SCH_SHAPE* SCH_SEXPR_PARSER::parseSchBezier()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bezier." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bezier." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<SCH_SHAPE> bezier = std::make_unique<SCH_SHAPE>( SHAPE_T::BEZIER );
|
std::unique_ptr<SCH_SHAPE> bezier = std::make_unique<SCH_SHAPE>( SHAPE_T::BEZIER );
|
||||||
|
|
||||||
|
@ -4002,7 +4002,7 @@ SCH_TEXTBOX* SCH_SEXPR_PARSER::parseSchTextBox()
|
||||||
VECTOR2I size;
|
VECTOR2I size;
|
||||||
bool foundEnd = false;
|
bool foundEnd = false;
|
||||||
bool foundSize = false;
|
bool foundSize = false;
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ), LINE_STYLE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<SCH_TEXTBOX> textBox = std::make_unique<SCH_TEXTBOX>();
|
std::unique_ptr<SCH_TEXTBOX> textBox = std::make_unique<SCH_TEXTBOX>();
|
||||||
|
|
||||||
|
|
|
@ -992,8 +992,7 @@ void SCH_SEXPR_PLUGIN::saveSheet( SCH_SHEET* aSheet, int aNestLevel )
|
||||||
|
|
||||||
m_out->Print( 0, "\n" );
|
m_out->Print( 0, "\n" );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( aSheet->GetBorderWidth(), PLOT_DASH_TYPE::SOLID,
|
STROKE_PARAMS stroke( aSheet->GetBorderWidth(), LINE_STYLE::SOLID, aSheet->GetBorderColor() );
|
||||||
aSheet->GetBorderColor() );
|
|
||||||
|
|
||||||
stroke.SetWidth( aSheet->GetBorderWidth() );
|
stroke.SetWidth( aSheet->GetBorderWidth() );
|
||||||
stroke.Format( m_out, schIUScale, aNestLevel + 1 );
|
stroke.Format( m_out, schIUScale, aNestLevel + 1 );
|
||||||
|
|
|
@ -845,7 +845,8 @@ LIB_SHAPE* SCH_LEGACY_PLUGIN_CACHE::loadArc( std::unique_ptr<LIB_SYMBOL>& aSymbo
|
||||||
arc->SetUnit( parseInt( aReader, line, &line ) );
|
arc->SetUnit( parseInt( aReader, line, &line ) );
|
||||||
arc->SetConvert( parseInt( aReader, line, &line ) );
|
arc->SetConvert( parseInt( aReader, line, &line ) );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ), PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ),
|
||||||
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
arc->SetStroke( stroke );
|
arc->SetStroke( stroke );
|
||||||
|
|
||||||
|
@ -921,7 +922,8 @@ LIB_SHAPE* SCH_LEGACY_PLUGIN_CACHE::loadCircle( std::unique_ptr<LIB_SYMBOL>& aSy
|
||||||
circle->SetUnit( parseInt( aReader, line, &line ) );
|
circle->SetUnit( parseInt( aReader, line, &line ) );
|
||||||
circle->SetConvert( parseInt( aReader, line, &line ) );
|
circle->SetConvert( parseInt( aReader, line, &line ) );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ), PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ),
|
||||||
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
circle->SetStroke( stroke );
|
circle->SetStroke( stroke );
|
||||||
|
|
||||||
|
@ -1055,7 +1057,8 @@ LIB_SHAPE* SCH_LEGACY_PLUGIN_CACHE::loadRect( std::unique_ptr<LIB_SYMBOL>& aSymb
|
||||||
rectangle->SetUnit( parseInt( aReader, line, &line ) );
|
rectangle->SetUnit( parseInt( aReader, line, &line ) );
|
||||||
rectangle->SetConvert( parseInt( aReader, line, &line ) );
|
rectangle->SetConvert( parseInt( aReader, line, &line ) );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ), PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ),
|
||||||
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
rectangle->SetStroke( stroke );
|
rectangle->SetStroke( stroke );
|
||||||
|
|
||||||
|
@ -1302,7 +1305,8 @@ LIB_SHAPE* SCH_LEGACY_PLUGIN_CACHE::loadPolyLine( std::unique_ptr<LIB_SYMBOL>& a
|
||||||
polyLine->SetUnit( parseInt( aReader, line, &line ) );
|
polyLine->SetUnit( parseInt( aReader, line, &line ) );
|
||||||
polyLine->SetConvert( parseInt( aReader, line, &line ) );
|
polyLine->SetConvert( parseInt( aReader, line, &line ) );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ), PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ),
|
||||||
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
polyLine->SetStroke( stroke );
|
polyLine->SetStroke( stroke );
|
||||||
|
|
||||||
|
@ -1338,7 +1342,8 @@ LIB_SHAPE* SCH_LEGACY_PLUGIN_CACHE::loadBezier( std::unique_ptr<LIB_SYMBOL>& aSy
|
||||||
bezier->SetUnit( parseInt( aReader, line, &line ) );
|
bezier->SetUnit( parseInt( aReader, line, &line ) );
|
||||||
bezier->SetConvert( parseInt( aReader, line, &line ) );
|
bezier->SetConvert( parseInt( aReader, line, &line ) );
|
||||||
|
|
||||||
STROKE_PARAMS stroke ( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ), PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke ( schIUScale.MilsToIU( parseInt( aReader, line, &line ) ),
|
||||||
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
bezier->SetStroke( stroke );
|
bezier->SetStroke( stroke );
|
||||||
|
|
||||||
|
|
|
@ -820,13 +820,13 @@ SCH_LINE* SCH_LEGACY_PLUGIN::loadWire( LINE_READER& aReader )
|
||||||
parseUnquotedString( buf, aReader, line, &line );
|
parseUnquotedString( buf, aReader, line, &line );
|
||||||
|
|
||||||
if( buf == wxT( "solid" ) )
|
if( buf == wxT( "solid" ) )
|
||||||
wire->SetLineStyle( PLOT_DASH_TYPE::SOLID );
|
wire->SetLineStyle( LINE_STYLE::SOLID );
|
||||||
else if( buf == wxT( "dashed" ) )
|
else if( buf == wxT( "dashed" ) )
|
||||||
wire->SetLineStyle( PLOT_DASH_TYPE::DASH );
|
wire->SetLineStyle( LINE_STYLE::DASH );
|
||||||
else if( buf == wxT( "dash_dot" ) )
|
else if( buf == wxT( "dash_dot" ) )
|
||||||
wire->SetLineStyle( PLOT_DASH_TYPE::DASHDOT );
|
wire->SetLineStyle( LINE_STYLE::DASHDOT );
|
||||||
else if( buf == wxT( "dotted" ) )
|
else if( buf == wxT( "dotted" ) )
|
||||||
wire->SetLineStyle( PLOT_DASH_TYPE::DOT );
|
wire->SetLineStyle( LINE_STYLE::DOT );
|
||||||
}
|
}
|
||||||
else // should be the color parameter.
|
else // should be the color parameter.
|
||||||
{
|
{
|
||||||
|
|
|
@ -449,7 +449,7 @@ void LTSPICE_SCH_PARSER::CreateWires( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, i
|
||||||
SCH_LINE* segment = new SCH_LINE();
|
SCH_LINE* segment = new SCH_LINE();
|
||||||
|
|
||||||
segment->SetLineWidth( getLineWidth( LTSPICE_SCHEMATIC::LINEWIDTH::Normal ) );
|
segment->SetLineWidth( getLineWidth( LTSPICE_SCHEMATIC::LINEWIDTH::Normal ) );
|
||||||
segment->SetLineStyle( PLOT_DASH_TYPE::SOLID );
|
segment->SetLineStyle( LINE_STYLE::SOLID );
|
||||||
|
|
||||||
segment->SetStartPoint( aLTSymbol.Wires[aIndex].Start );
|
segment->SetStartPoint( aLTSymbol.Wires[aIndex].Start );
|
||||||
segment->SetEndPoint( aLTSymbol.Wires[aIndex].End );
|
segment->SetEndPoint( aLTSymbol.Wires[aIndex].End );
|
||||||
|
@ -669,16 +669,16 @@ int LTSPICE_SCH_PARSER::getLineWidth( const LTSPICE_SCHEMATIC::LINEWIDTH& aLineW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PLOT_DASH_TYPE LTSPICE_SCH_PARSER::getLineStyle( const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle )
|
LINE_STYLE LTSPICE_SCH_PARSER::getLineStyle( const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle )
|
||||||
{
|
{
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
case LTSPICE_SCHEMATIC::LINESTYLE::SOLID: return PLOT_DASH_TYPE::SOLID;
|
case LTSPICE_SCHEMATIC::LINESTYLE::SOLID: return LINE_STYLE::SOLID;
|
||||||
case LTSPICE_SCHEMATIC::LINESTYLE::DOT: return PLOT_DASH_TYPE::DOT;
|
case LTSPICE_SCHEMATIC::LINESTYLE::DOT: return LINE_STYLE::DOT;
|
||||||
case LTSPICE_SCHEMATIC::LINESTYLE::DASHDOTDOT: return PLOT_DASH_TYPE::DASHDOTDOT;
|
case LTSPICE_SCHEMATIC::LINESTYLE::DASHDOTDOT: return LINE_STYLE::DASHDOTDOT;
|
||||||
case LTSPICE_SCHEMATIC::LINESTYLE::DASHDOT: return PLOT_DASH_TYPE::DASHDOT;
|
case LTSPICE_SCHEMATIC::LINESTYLE::DASHDOT: return LINE_STYLE::DASHDOT;
|
||||||
case LTSPICE_SCHEMATIC::LINESTYLE::DASH: return PLOT_DASH_TYPE::DASH;
|
case LTSPICE_SCHEMATIC::LINESTYLE::DASH: return LINE_STYLE::DASH;
|
||||||
default: return PLOT_DASH_TYPE::SOLID;
|
default: return LINE_STYLE::SOLID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,7 +797,7 @@ void LTSPICE_SCH_PARSER::CreateWire( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aI
|
||||||
SCH_LINE* segment = new SCH_LINE();
|
SCH_LINE* segment = new SCH_LINE();
|
||||||
|
|
||||||
segment->SetLineWidth( getLineWidth( LTSPICE_SCHEMATIC::LINEWIDTH::Normal ) );
|
segment->SetLineWidth( getLineWidth( LTSPICE_SCHEMATIC::LINEWIDTH::Normal ) );
|
||||||
segment->SetLineStyle( PLOT_DASH_TYPE::SOLID );
|
segment->SetLineStyle( LINE_STYLE::SOLID );
|
||||||
segment->SetLayer( aLayer );
|
segment->SetLayer( aLayer );
|
||||||
|
|
||||||
segment->SetStartPoint( ToKicadCoords( aAscfile.Wires[aIndex].Start ) + m_originOffset );
|
segment->SetStartPoint( ToKicadCoords( aAscfile.Wires[aIndex].Start ) + m_originOffset );
|
||||||
|
@ -822,7 +822,7 @@ SCH_SYMBOL* LTSPICE_SCH_PARSER::CreatePowerSymbol( const VECTOR2I& aOffset, cons
|
||||||
shape->AddPoint( ToInvertedKicadCoords( { 0, 15 } ) );
|
shape->AddPoint( ToInvertedKicadCoords( { 0, 15 } ) );
|
||||||
|
|
||||||
shape->SetStroke( STROKE_PARAMS( getLineWidth( LTSPICE_SCHEMATIC::LINEWIDTH::Normal ),
|
shape->SetStroke( STROKE_PARAMS( getLineWidth( LTSPICE_SCHEMATIC::LINEWIDTH::Normal ),
|
||||||
PLOT_DASH_TYPE::SOLID ) );
|
LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
lib_symbol->AddDrawItem( shape );
|
lib_symbol->AddDrawItem( shape );
|
||||||
lib_symbol->SetPower();
|
lib_symbol->SetPower();
|
||||||
|
|
|
@ -279,7 +279,7 @@ public:
|
||||||
private:
|
private:
|
||||||
int getLineWidth( const LTSPICE_SCHEMATIC::LINEWIDTH& aLineWidth );
|
int getLineWidth( const LTSPICE_SCHEMATIC::LINEWIDTH& aLineWidth );
|
||||||
|
|
||||||
PLOT_DASH_TYPE getLineStyle( const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle );
|
LINE_STYLE getLineStyle( const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle );
|
||||||
|
|
||||||
STROKE_PARAMS getStroke( const LTSPICE_SCHEMATIC::LINEWIDTH& aLineWidth,
|
STROKE_PARAMS getStroke( const LTSPICE_SCHEMATIC::LINEWIDTH& aLineWidth,
|
||||||
const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle );
|
const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle );
|
||||||
|
|
|
@ -204,7 +204,7 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground,
|
||||||
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
|
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
aPlotter->SetDash( pen_size, PLOT_DASH_TYPE::SOLID );
|
aPlotter->SetDash( pen_size, LINE_STYLE::SOLID );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ void SCH_SHAPE::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset
|
||||||
|
|
||||||
if( penWidth > 0 )
|
if( penWidth > 0 )
|
||||||
{
|
{
|
||||||
if( GetEffectiveLineStyle() == PLOT_DASH_TYPE::SOLID )
|
if( GetEffectiveLineStyle() == LINE_STYLE::SOLID )
|
||||||
{
|
{
|
||||||
switch( GetShape() )
|
switch( GetShape() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,12 +64,12 @@ public:
|
||||||
STROKE_PARAMS GetStroke() const override { return m_stroke; }
|
STROKE_PARAMS GetStroke() const override { return m_stroke; }
|
||||||
void SetStroke( const STROKE_PARAMS& aStroke ) override;
|
void SetStroke( const STROKE_PARAMS& aStroke ) override;
|
||||||
|
|
||||||
PLOT_DASH_TYPE GetEffectiveLineStyle() const
|
LINE_STYLE GetEffectiveLineStyle() const
|
||||||
{
|
{
|
||||||
if( m_stroke.GetPlotStyle() == PLOT_DASH_TYPE::DEFAULT )
|
if( m_stroke.GetLineStyle() == LINE_STYLE::DEFAULT )
|
||||||
return PLOT_DASH_TYPE::SOLID;
|
return LINE_STYLE::SOLID;
|
||||||
else
|
else
|
||||||
return m_stroke.GetPlotStyle();
|
return m_stroke.GetLineStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
const BOX2I GetBoundingBox() const override { return getBoundingBox(); }
|
const BOX2I GetBoundingBox() const override { return getBoundingBox(); }
|
||||||
|
|
|
@ -233,13 +233,13 @@ KIFONT::FONT* SCH_TEXTBOX::getDrawFont() const
|
||||||
|
|
||||||
void SCH_TEXTBOX::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset )
|
void SCH_TEXTBOX::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset )
|
||||||
{
|
{
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
int penWidth = GetPenWidth();
|
int penWidth = GetPenWidth();
|
||||||
bool blackAndWhiteMode = GetGRForceBlackPenState();
|
bool blackAndWhiteMode = GetGRForceBlackPenState();
|
||||||
VECTOR2I pt1 = GetStart();
|
VECTOR2I pt1 = GetStart();
|
||||||
VECTOR2I pt2 = GetEnd();
|
VECTOR2I pt2 = GetEnd();
|
||||||
COLOR4D color = GetStroke().GetColor();
|
COLOR4D color = GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE lineStyle = GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( GetFillMode() == FILL_T::FILLED_WITH_COLOR && !blackAndWhiteMode )
|
if( GetFillMode() == FILL_T::FILLED_WITH_COLOR && !blackAndWhiteMode )
|
||||||
GRFilledRect( DC, pt1, pt2, 0, GetFillColor(), GetFillColor() );
|
GRFilledRect( DC, pt1, pt2, 0, GetFillColor(), GetFillColor() );
|
||||||
|
@ -251,10 +251,10 @@ void SCH_TEXTBOX::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
|
||||||
if( blackAndWhiteMode || color == COLOR4D::UNSPECIFIED )
|
if( blackAndWhiteMode || color == COLOR4D::UNSPECIFIED )
|
||||||
color = aSettings->GetLayerColor( m_layer );
|
color = aSettings->GetLayerColor( m_layer );
|
||||||
|
|
||||||
if( lineStyle == PLOT_DASH_TYPE::DEFAULT )
|
if( lineStyle == LINE_STYLE::DEFAULT )
|
||||||
lineStyle = PLOT_DASH_TYPE::SOLID;
|
lineStyle = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
if( lineStyle == PLOT_DASH_TYPE::SOLID )
|
if( lineStyle == LINE_STYLE::SOLID )
|
||||||
{
|
{
|
||||||
GRRect( DC, pt1, pt2, penWidth, color );
|
GRRect( DC, pt1, pt2, penWidth, color );
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ void SCH_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground,
|
||||||
RENDER_SETTINGS* settings = aPlotter->RenderSettings();
|
RENDER_SETTINGS* settings = aPlotter->RenderSettings();
|
||||||
int penWidth = GetPenWidth();
|
int penWidth = GetPenWidth();
|
||||||
COLOR4D color = GetStroke().GetColor();
|
COLOR4D color = GetStroke().GetColor();
|
||||||
PLOT_DASH_TYPE lineStyle = GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( penWidth > 0 )
|
if( penWidth > 0 )
|
||||||
{
|
{
|
||||||
|
@ -394,13 +394,13 @@ void SCH_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground,
|
||||||
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
||||||
color = settings->GetLayerColor( m_layer );
|
color = settings->GetLayerColor( m_layer );
|
||||||
|
|
||||||
if( lineStyle == PLOT_DASH_TYPE::DEFAULT )
|
if( lineStyle == LINE_STYLE::DEFAULT )
|
||||||
lineStyle = PLOT_DASH_TYPE::SOLID;
|
lineStyle = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
aPlotter->SetColor( color );
|
aPlotter->SetColor( color );
|
||||||
aPlotter->SetDash( penWidth, lineStyle );
|
aPlotter->SetDash( penWidth, lineStyle );
|
||||||
aPlotter->Rect( m_start, m_end, FILL_T::NO_FILL, penWidth );
|
aPlotter->Rect( m_start, m_end, FILL_T::NO_FILL, penWidth );
|
||||||
aPlotter->SetDash( penWidth, PLOT_DASH_TYPE::SOLID );
|
aPlotter->SetDash( penWidth, LINE_STYLE::SOLID );
|
||||||
}
|
}
|
||||||
|
|
||||||
KIFONT::FONT* font = GetFont();
|
KIFONT::FONT* font = GetFont();
|
||||||
|
|
|
@ -79,8 +79,8 @@ SCH_DRAWING_TOOLS::SCH_DRAWING_TOOLS() :
|
||||||
m_lastTextboxFillStyle( FILL_T::NO_FILL ),
|
m_lastTextboxFillStyle( FILL_T::NO_FILL ),
|
||||||
m_lastFillColor( COLOR4D::UNSPECIFIED ),
|
m_lastFillColor( COLOR4D::UNSPECIFIED ),
|
||||||
m_lastTextboxFillColor( COLOR4D::UNSPECIFIED ),
|
m_lastTextboxFillColor( COLOR4D::UNSPECIFIED ),
|
||||||
m_lastStroke( 0, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
m_lastStroke( 0, LINE_STYLE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
||||||
m_lastTextboxStroke( 0, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
m_lastTextboxStroke( 0, LINE_STYLE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
||||||
m_mruPath( wxEmptyString ),
|
m_mruPath( wxEmptyString ),
|
||||||
m_lastAutoLabelRotateOnPlacement( false ),
|
m_lastAutoLabelRotateOnPlacement( false ),
|
||||||
m_inDrawingTool( false )
|
m_inDrawingTool( false )
|
||||||
|
|
|
@ -54,7 +54,7 @@ SYMBOL_EDITOR_DRAWING_TOOLS::SYMBOL_EDITOR_DRAWING_TOOLS() :
|
||||||
m_lastTextJust( GR_TEXT_H_ALIGN_LEFT ),
|
m_lastTextJust( GR_TEXT_H_ALIGN_LEFT ),
|
||||||
m_lastFillStyle( FILL_T::NO_FILL ),
|
m_lastFillStyle( FILL_T::NO_FILL ),
|
||||||
m_lastFillColor( COLOR4D::UNSPECIFIED ),
|
m_lastFillColor( COLOR4D::UNSPECIFIED ),
|
||||||
m_lastStroke( 0, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
m_lastStroke( 0, LINE_STYLE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
||||||
m_drawSpecificConvert( true ),
|
m_drawSpecificConvert( true ),
|
||||||
m_drawSpecificUnit( false ),
|
m_drawSpecificUnit( false ),
|
||||||
m_inDrawShape( false ),
|
m_inDrawShape( false ),
|
||||||
|
|
|
@ -110,8 +110,8 @@ public:
|
||||||
virtual int GetWidth() const { return m_stroke.GetWidth(); }
|
virtual int GetWidth() const { return m_stroke.GetWidth(); }
|
||||||
virtual int GetEffectiveWidth() const { return GetWidth(); }
|
virtual int GetEffectiveWidth() const { return GetWidth(); }
|
||||||
|
|
||||||
void SetLineStyle( const PLOT_DASH_TYPE aStyle );
|
void SetLineStyle( const LINE_STYLE aStyle );
|
||||||
PLOT_DASH_TYPE GetLineStyle() const;
|
LINE_STYLE GetLineStyle() const;
|
||||||
|
|
||||||
void SetLineColor( const COLOR4D& aColor ) { m_stroke.SetColor( aColor ); }
|
void SetLineColor( const COLOR4D& aColor ) { m_stroke.SetColor( aColor ); }
|
||||||
COLOR4D GetLineColor() const { return m_stroke.GetColor(); }
|
COLOR4D GetLineColor() const { return m_stroke.GetColor(); }
|
||||||
|
@ -415,7 +415,7 @@ protected:
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
DECLARE_ENUM_TO_WXANY( SHAPE_T );
|
DECLARE_ENUM_TO_WXANY( SHAPE_T );
|
||||||
DECLARE_ENUM_TO_WXANY( PLOT_DASH_TYPE );
|
DECLARE_ENUM_TO_WXANY( LINE_STYLE );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // EDA_SHAPE_H
|
#endif // EDA_SHAPE_H
|
||||||
|
|
|
@ -148,7 +148,7 @@ public:
|
||||||
|
|
||||||
virtual void SetColor( const COLOR4D& color ) = 0;
|
virtual void SetColor( const COLOR4D& color ) = 0;
|
||||||
|
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) = 0;
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) = 0;
|
||||||
|
|
||||||
virtual void SetCreator( const wxString& aCreator ) { m_creator = aCreator; }
|
virtual void SetCreator( const wxString& aCreator ) { m_creator = aCreator; }
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
{
|
{
|
||||||
m_textAsLines = true;
|
m_textAsLines = true;
|
||||||
m_currentColor = COLOR4D::BLACK;
|
m_currentColor = COLOR4D::BLACK;
|
||||||
m_currentLineType = PLOT_DASH_TYPE::SOLID;
|
m_currentLineType = LINE_STYLE::SOLID;
|
||||||
SetUnits( DXF_UNITS::INCHES );
|
SetUnits( DXF_UNITS::INCHES );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public:
|
||||||
m_currentPenWidth = 0;
|
m_currentPenWidth = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) override;
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The DXF exporter handles 'colors' as layers...
|
* The DXF exporter handles 'colors' as layers...
|
||||||
|
@ -214,11 +214,11 @@ protected:
|
||||||
void plotOneLineOfText( const VECTOR2I& aPos, const COLOR4D& aColor, const wxString& aText,
|
void plotOneLineOfText( const VECTOR2I& aPos, const COLOR4D& aColor, const wxString& aText,
|
||||||
const TEXT_ATTRIBUTES& aAttrs );
|
const TEXT_ATTRIBUTES& aAttrs );
|
||||||
|
|
||||||
bool m_textAsLines;
|
bool m_textAsLines;
|
||||||
COLOR4D m_currentColor;
|
COLOR4D m_currentColor;
|
||||||
PLOT_DASH_TYPE m_currentLineType;
|
LINE_STYLE m_currentLineType;
|
||||||
|
|
||||||
DXF_UNITS m_plotUnits;
|
DXF_UNITS m_plotUnits;
|
||||||
double m_unitScalingFactor;
|
double m_unitScalingFactor;
|
||||||
unsigned int m_measurementDirective;
|
unsigned int m_measurementDirective;
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual void SetCurrentLineWidth( int aLineWidth, void* aData = nullptr ) override;
|
virtual void SetCurrentLineWidth( int aLineWidth, void* aData = nullptr ) override;
|
||||||
|
|
||||||
// RS274X has no dashing, nor colors
|
// RS274X has no dashing, nor colors
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) override
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* HPGL supports dashed lines.
|
* HPGL supports dashed lines.
|
||||||
*/
|
*/
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) override;
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) override;
|
||||||
|
|
||||||
virtual void SetColor( const COLOR4D& color ) override {}
|
virtual void SetColor( const COLOR4D& color ) override {}
|
||||||
|
|
||||||
|
@ -174,33 +174,33 @@ protected:
|
||||||
lift_after( false ),
|
lift_after( false ),
|
||||||
pen_returns( false ),
|
pen_returns( false ),
|
||||||
pen( 0 ),
|
pen( 0 ),
|
||||||
dashType( PLOT_DASH_TYPE::SOLID ) {}
|
dashType( LINE_STYLE::SOLID ) {}
|
||||||
|
|
||||||
/// Location the pen should start at
|
/// Location the pen should start at
|
||||||
VECTOR2D loc_start;
|
VECTOR2D loc_start;
|
||||||
|
|
||||||
/// Location the pen will be at when it finishes. If this is not known,
|
/// Location the pen will be at when it finishes. If this is not known,
|
||||||
/// leave it equal to loc_start and set lift_after.
|
/// leave it equal to loc_start and set lift_after.
|
||||||
VECTOR2D loc_end;
|
VECTOR2D loc_end;
|
||||||
|
|
||||||
/// Bounding box of this item
|
/// Bounding box of this item
|
||||||
BOX2D bbox;
|
BOX2D bbox;
|
||||||
|
|
||||||
/// Whether the command should be executed with the pen lifted
|
/// Whether the command should be executed with the pen lifted
|
||||||
bool lift_before;
|
bool lift_before;
|
||||||
|
|
||||||
/// Whether the pen must be lifted after the command. If the location of the pen
|
/// Whether the pen must be lifted after the command. If the location of the pen
|
||||||
/// is not known, this must be set (so that another command starting at loc_end
|
/// is not known, this must be set (so that another command starting at loc_end
|
||||||
/// is not immediately executed with no lift).
|
/// is not immediately executed with no lift).
|
||||||
bool lift_after;
|
bool lift_after;
|
||||||
|
|
||||||
/// Whether the pen returns to its original state after the command. Otherwise,
|
/// Whether the pen returns to its original state after the command. Otherwise,
|
||||||
/// the pen is assumed to be down following the command.
|
/// the pen is assumed to be down following the command.
|
||||||
bool pen_returns;
|
bool pen_returns;
|
||||||
|
|
||||||
int pen; /// Pen number for this command
|
int pen; /// Pen number for this command
|
||||||
PLOT_DASH_TYPE dashType; /// Line style for this command
|
LINE_STYLE dashType; /// Line style for this command
|
||||||
wxString content; /// Text of the command
|
wxString content; /// Text of the command
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Sort a list of HPGL items to improve plotting speed on mechanical plotters.
|
/// Sort a list of HPGL items to improve plotting speed on mechanical plotters.
|
||||||
|
@ -209,7 +209,7 @@ protected:
|
||||||
static void sortItems( std::list<HPGL_ITEM>& items );
|
static void sortItems( std::list<HPGL_ITEM>& items );
|
||||||
|
|
||||||
/// Return the plot command corresponding to a line type
|
/// Return the plot command corresponding to a line type
|
||||||
static const char* lineStyleCommand( PLOT_DASH_TYPE aLineStyle );
|
static const char* lineStyleCommand( LINE_STYLE aLineStyle );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_penSpeed;
|
int m_penSpeed;
|
||||||
|
@ -217,7 +217,7 @@ protected:
|
||||||
double m_penDiameter;
|
double m_penDiameter;
|
||||||
double m_arcTargetChordLength;
|
double m_arcTargetChordLength;
|
||||||
EDA_ANGLE m_arcMinChordDegrees;
|
EDA_ANGLE m_arcMinChordDegrees;
|
||||||
PLOT_DASH_TYPE m_lineStyle;
|
LINE_STYLE m_lineStyle;
|
||||||
bool m_useUserCoords;
|
bool m_useUserCoords;
|
||||||
bool m_fitUserCoords;
|
bool m_fitUserCoords;
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* PostScript supports dashed lines.
|
* PostScript supports dashed lines.
|
||||||
*/
|
*/
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) override;
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) override;
|
||||||
|
|
||||||
virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
|
virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
|
||||||
double aScale, bool aMirror ) override;
|
double aScale, bool aMirror ) override;
|
||||||
|
@ -303,7 +303,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* PDF supports dashed lines
|
* PDF supports dashed lines
|
||||||
*/
|
*/
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) override;
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PDF can have multiple pages, so SetPageSettings can be called
|
* PDF can have multiple pages, so SetPageSettings can be called
|
||||||
|
@ -542,7 +542,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* SVG supports dashed lines.
|
* SVG supports dashed lines.
|
||||||
*/
|
*/
|
||||||
virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) override;
|
virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) override;
|
||||||
|
|
||||||
virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
|
virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
|
||||||
double aScale, bool aMirror ) override;
|
double aScale, bool aMirror ) override;
|
||||||
|
@ -641,21 +641,18 @@ protected:
|
||||||
*/
|
*/
|
||||||
void setFillMode( FILL_T fill );
|
void setFillMode( FILL_T fill );
|
||||||
|
|
||||||
FILL_T m_fillMode; // true if the current contour
|
FILL_T m_fillMode; // true if the current contour rect, arc, circle, polygon must
|
||||||
// rect, arc, circle, polygon must be filled
|
// be filled
|
||||||
long m_pen_rgb_color; // current rgb color value: each color has
|
long m_pen_rgb_color; // current rgb color value: each color has a value 0 ... 255,
|
||||||
// a value 0 ... 255, and the 3 colors are
|
// and the 3 colors are grouped in a 3x8 bits value (written
|
||||||
// grouped in a 3x8 bits value
|
// in hex to svg files)
|
||||||
// (written in hex to svg files)
|
long m_brush_rgb_color; // same as m_pen_rgb_color, used to fill some contours.
|
||||||
long m_brush_rgb_color; // same as m_pen_rgb_color, used to fill
|
double m_brush_alpha;
|
||||||
// some contours.
|
bool m_graphics_changed; // true if a pen/brush parameter is modified color, pen size,
|
||||||
double m_brush_alpha;
|
// fill mode ... the new SVG stype must be output on file
|
||||||
bool m_graphics_changed; // true if a pen/brush parameter is modified
|
LINE_STYLE m_dashed; // plot line style
|
||||||
// color, pen size, fill mode ...
|
unsigned m_precision; // How fine the step size is
|
||||||
// the new SVG stype must be output on file
|
// Use 3-6 (3 means um precision, 6 nm precision) in PcbNew
|
||||||
PLOT_DASH_TYPE m_dashed; // plot line style
|
// 3-4 in other modules (avoid values >4 to avoid overflow)
|
||||||
unsigned m_precision; // How fine the step size is
|
// see also comment for m_useInch.
|
||||||
// Use 3-6 (3 means um precision, 6 nm precision) in PcbNew
|
|
||||||
// 3-4 in other modules (avoid values >4 to avoid overflow)
|
|
||||||
// see also comment for m_useInch.
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,7 +44,7 @@ class RENDER_SETTINGS;
|
||||||
/**
|
/**
|
||||||
* Dashed line types.
|
* Dashed line types.
|
||||||
*/
|
*/
|
||||||
enum class PLOT_DASH_TYPE
|
enum class LINE_STYLE
|
||||||
{
|
{
|
||||||
DEFAULT = -1,
|
DEFAULT = -1,
|
||||||
SOLID = 0,
|
SOLID = 0,
|
||||||
|
@ -57,7 +57,7 @@ enum class PLOT_DASH_TYPE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct lineTypeStruct
|
struct LINE_STYLE_DESC
|
||||||
{
|
{
|
||||||
wxString name;
|
wxString name;
|
||||||
const BITMAPS bitmap;
|
const BITMAPS bitmap;
|
||||||
|
@ -65,9 +65,9 @@ struct lineTypeStruct
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Conversion map between PLOT_DASH_TYPE values and style names displayed
|
* Conversion map between LINE_STYLE values and style names displayed
|
||||||
*/
|
*/
|
||||||
extern const std::map<PLOT_DASH_TYPE, struct lineTypeStruct> lineTypeNames;
|
extern const std::map<LINE_STYLE, struct LINE_STYLE_DESC> lineTypeNames;
|
||||||
|
|
||||||
|
|
||||||
#define DEFAULT_STYLE _( "Default" )
|
#define DEFAULT_STYLE _( "Default" )
|
||||||
|
@ -80,10 +80,10 @@ extern const std::map<PLOT_DASH_TYPE, struct lineTypeStruct> lineTypeNames;
|
||||||
class STROKE_PARAMS
|
class STROKE_PARAMS
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
STROKE_PARAMS( int aWidth = 0, PLOT_DASH_TYPE aPlotStyle = PLOT_DASH_TYPE::DEFAULT,
|
STROKE_PARAMS( int aWidth = 0, LINE_STYLE aLineStyle = LINE_STYLE::DEFAULT,
|
||||||
const KIGFX::COLOR4D& aColor = KIGFX::COLOR4D::UNSPECIFIED ) :
|
const KIGFX::COLOR4D& aColor = KIGFX::COLOR4D::UNSPECIFIED ) :
|
||||||
m_width( aWidth ),
|
m_width( aWidth ),
|
||||||
m_plotstyle( aPlotStyle ),
|
m_lineStyle( aLineStyle ),
|
||||||
m_color( aColor )
|
m_color( aColor )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -91,8 +91,8 @@ public:
|
||||||
int GetWidth() const { return m_width; }
|
int GetWidth() const { return m_width; }
|
||||||
void SetWidth( int aWidth ) { m_width = aWidth; }
|
void SetWidth( int aWidth ) { m_width = aWidth; }
|
||||||
|
|
||||||
PLOT_DASH_TYPE GetPlotStyle() const { return m_plotstyle; }
|
LINE_STYLE GetLineStyle() const { return m_lineStyle; }
|
||||||
void SetPlotStyle( PLOT_DASH_TYPE aPlotStyle ) { m_plotstyle = aPlotStyle; }
|
void SetLineStyle( LINE_STYLE aLineStyle ) { m_lineStyle = aLineStyle; }
|
||||||
|
|
||||||
KIGFX::COLOR4D GetColor() const { return m_color; }
|
KIGFX::COLOR4D GetColor() const { return m_color; }
|
||||||
void SetColor( const KIGFX::COLOR4D& aColor ) { m_color = aColor; }
|
void SetColor( const KIGFX::COLOR4D& aColor ) { m_color = aColor; }
|
||||||
|
@ -100,7 +100,7 @@ public:
|
||||||
bool operator!=( const STROKE_PARAMS& aOther )
|
bool operator!=( const STROKE_PARAMS& aOther )
|
||||||
{
|
{
|
||||||
return m_width != aOther.m_width
|
return m_width != aOther.m_width
|
||||||
|| m_plotstyle != aOther.m_plotstyle
|
|| m_lineStyle != aOther.m_lineStyle
|
||||||
|| m_color != aOther.m_color;
|
|| m_color != aOther.m_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,15 +111,15 @@ public:
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
|
|
||||||
static wxString GetLineStyleToken( PLOT_DASH_TYPE aStyle );
|
static wxString GetLineStyleToken( LINE_STYLE aStyle );
|
||||||
|
|
||||||
static void Stroke( const SHAPE* aShape, PLOT_DASH_TYPE aLineStyle, int aWidth,
|
static void Stroke( const SHAPE* aShape, LINE_STYLE aLineStyle, int aWidth,
|
||||||
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
||||||
std::function<void( const VECTOR2I& a, const VECTOR2I& b )> aStroker );
|
std::function<void( const VECTOR2I& a, const VECTOR2I& b )> aStroker );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_width;
|
int m_width;
|
||||||
PLOT_DASH_TYPE m_plotstyle;
|
LINE_STYLE m_lineStyle;
|
||||||
KIGFX::COLOR4D m_color;
|
KIGFX::COLOR4D m_color;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,8 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
|
||||||
m_LayerSelectionCtrl->SetNotAllowedLayerSet( forbiddenLayers );
|
m_LayerSelectionCtrl->SetNotAllowedLayerSet( forbiddenLayers );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_lineStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_lineStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_lineStyleCombo->Append( DEFAULT_STYLE );
|
m_lineStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -248,10 +248,10 @@ void DIALOG_SHAPE_PROPERTIES::onFilledCheckbox( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PLOT_DASH_TYPE style = m_item->GetStroke().GetPlotStyle();
|
LINE_STYLE style = m_item->GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( style == PLOT_DASH_TYPE::DEFAULT )
|
if( style == LINE_STYLE::DEFAULT )
|
||||||
style = PLOT_DASH_TYPE::SOLID;
|
style = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
if( (int) style < (int) lineTypeNames.size() )
|
if( (int) style < (int) lineTypeNames.size() )
|
||||||
m_lineStyleCombo->SetSelection( (int) style );
|
m_lineStyleCombo->SetSelection( (int) style );
|
||||||
|
@ -325,7 +325,7 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
m_thickness.SetValue( m_item->GetStroke().GetWidth() );
|
m_thickness.SetValue( m_item->GetStroke().GetWidth() );
|
||||||
|
|
||||||
int style = static_cast<int>( m_item->GetStroke().GetPlotStyle() );
|
int style = static_cast<int>( m_item->GetStroke().GetLineStyle() );
|
||||||
|
|
||||||
if( style == -1 )
|
if( style == -1 )
|
||||||
m_lineStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
m_lineStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||||
|
@ -499,9 +499,9 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_lineStyleCombo->GetSelection() );
|
std::advance( it, m_lineStyleCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( it->first );
|
stroke.SetLineStyle( it->first );
|
||||||
|
|
||||||
m_item->SetStroke( stroke );
|
m_item->SetStroke( stroke );
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,8 @@ DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES( PCB_BASE_EDIT_FRAME* aPare
|
||||||
for( size_t ii = 0; ii < m_OrientCtrl->GetCount() && ii < 4; ++ii )
|
for( size_t ii = 0; ii < m_OrientCtrl->GetCount() && ii < 4; ++ii )
|
||||||
m_OrientCtrl->SetString( ii, wxString::Format( "%.1f", rot_list[ii] ) );
|
m_OrientCtrl->SetString( ii, wxString::Format( "%.1f", rot_list[ii] ) );
|
||||||
|
|
||||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
@ -201,10 +201,10 @@ bool DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow()
|
||||||
if( m_textBox->IsBorderEnabled() )
|
if( m_textBox->IsBorderEnabled() )
|
||||||
m_borderWidth.SetValue( stroke.GetWidth() );
|
m_borderWidth.SetValue( stroke.GetWidth() );
|
||||||
|
|
||||||
PLOT_DASH_TYPE style = stroke.GetPlotStyle();
|
LINE_STYLE style = stroke.GetLineStyle();
|
||||||
|
|
||||||
if( style == PLOT_DASH_TYPE::DEFAULT )
|
if( style == LINE_STYLE::DEFAULT )
|
||||||
style = PLOT_DASH_TYPE::SOLID;
|
style = LINE_STYLE::SOLID;
|
||||||
|
|
||||||
if( (int) style < (int) lineTypeNames.size() )
|
if( (int) style < (int) lineTypeNames.size() )
|
||||||
m_borderStyleCombo->SetSelection( (int) style );
|
m_borderStyleCombo->SetSelection( (int) style );
|
||||||
|
@ -367,9 +367,9 @@ bool DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
||||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||||
|
|
||||||
if( it == lineTypeNames.end() )
|
if( it == lineTypeNames.end() )
|
||||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
else
|
else
|
||||||
stroke.SetPlotStyle( it->first );
|
stroke.SetLineStyle( it->first );
|
||||||
|
|
||||||
m_textBox->SetStroke( stroke );
|
m_textBox->SetStroke( stroke );
|
||||||
|
|
||||||
|
|
|
@ -420,7 +420,7 @@ FOOTPRINT* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN&
|
||||||
PCB_SHAPE* seg = new PCB_SHAPE( footprint, SHAPE_T::SEGMENT );
|
PCB_SHAPE* seg = new PCB_SHAPE( footprint, SHAPE_T::SEGMENT );
|
||||||
seg->SetStart( buffer[jj - 1] );
|
seg->SetStart( buffer[jj - 1] );
|
||||||
seg->SetEnd( buffer[jj] );
|
seg->SetEnd( buffer[jj] );
|
||||||
seg->SetStroke( STROKE_PARAMS( aInductorPattern.m_Width, PLOT_DASH_TYPE::SOLID ) );
|
seg->SetStroke( STROKE_PARAMS( aInductorPattern.m_Width, LINE_STYLE::SOLID ) );
|
||||||
seg->SetLayer( footprint->GetLayer() );
|
seg->SetLayer( footprint->GetLayer() );
|
||||||
footprint->Add( seg );
|
footprint->Add( seg );
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,7 +386,7 @@ FOOTPRINT* MICROWAVE_TOOL::createPolygonShape()
|
||||||
|
|
||||||
// Set the polygon outline thickness to 0, only the polygonal shape is filled
|
// Set the polygon outline thickness to 0, only the polygonal shape is filled
|
||||||
// without extra thickness.
|
// without extra thickness.
|
||||||
shape->SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( 0, LINE_STYLE::SOLID ) );
|
||||||
g_PolyEdges.clear();
|
g_PolyEdges.clear();
|
||||||
|
|
||||||
editFrame.OnModify();
|
editFrame.OnModify();
|
||||||
|
|
|
@ -55,7 +55,7 @@ void PAD::AddPrimitivePoly( const SHAPE_POLY_SET& aPoly, int aThickness, bool aF
|
||||||
item->SetShape( SHAPE_T::POLY );
|
item->SetShape( SHAPE_T::POLY );
|
||||||
item->SetFilled( aFilled );
|
item->SetFilled( aFilled );
|
||||||
item->SetPolyShape( poly_outline );
|
item->SetPolyShape( poly_outline );
|
||||||
item->SetStroke( STROKE_PARAMS( aThickness, PLOT_DASH_TYPE::SOLID ) );
|
item->SetStroke( STROKE_PARAMS( aThickness, LINE_STYLE::SOLID ) );
|
||||||
item->SetParent( this );
|
item->SetParent( this );
|
||||||
m_editPrimitives.emplace_back( item );
|
m_editPrimitives.emplace_back( item );
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ void PAD::AddPrimitivePoly( const std::vector<VECTOR2I>& aPoly, int aThickness,
|
||||||
PCB_SHAPE* item = new PCB_SHAPE( nullptr, SHAPE_T::POLY );
|
PCB_SHAPE* item = new PCB_SHAPE( nullptr, SHAPE_T::POLY );
|
||||||
item->SetFilled( aFilled );
|
item->SetFilled( aFilled );
|
||||||
item->SetPolyPoints( aPoly );
|
item->SetPolyPoints( aPoly );
|
||||||
item->SetStroke( STROKE_PARAMS( aThickness, PLOT_DASH_TYPE::SOLID ) );
|
item->SetStroke( STROKE_PARAMS( aThickness, LINE_STYLE::SOLID ) );
|
||||||
item->SetParent( this );
|
item->SetParent( this );
|
||||||
m_editPrimitives.emplace_back( item );
|
m_editPrimitives.emplace_back( item );
|
||||||
SetDirty();
|
SetDirty();
|
||||||
|
|
|
@ -1689,10 +1689,10 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
|
||||||
|
|
||||||
void PCB_PAINTER::draw( const PCB_SHAPE* aShape, int aLayer )
|
void PCB_PAINTER::draw( const PCB_SHAPE* aShape, int aLayer )
|
||||||
{
|
{
|
||||||
COLOR4D color = m_pcbSettings.GetColor( aShape, aLayer );
|
COLOR4D color = m_pcbSettings.GetColor( aShape, aLayer );
|
||||||
bool outline_mode = !viewer_settings()->m_ViewersDisplay.m_DisplayGraphicsFill;
|
bool outline_mode = !viewer_settings()->m_ViewersDisplay.m_DisplayGraphicsFill;
|
||||||
int thickness = getLineThickness( aShape->GetWidth() );
|
int thickness = getLineThickness( aShape->GetWidth() );
|
||||||
PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
|
||||||
|
|
||||||
if( IsNetnameLayer( aLayer ) )
|
if( IsNetnameLayer( aLayer ) )
|
||||||
{
|
{
|
||||||
|
@ -1735,7 +1735,7 @@ void PCB_PAINTER::draw( const PCB_SHAPE* aShape, int aLayer )
|
||||||
m_gal->SetFillColor( color );
|
m_gal->SetFillColor( color );
|
||||||
m_gal->SetStrokeColor( color );
|
m_gal->SetStrokeColor( color );
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
switch( aShape->GetShape() )
|
switch( aShape->GetShape() )
|
||||||
{
|
{
|
||||||
|
@ -2134,7 +2134,7 @@ void PCB_PAINTER::draw( const PCB_TEXTBOX* aTextBox, int aLayer )
|
||||||
{
|
{
|
||||||
const COLOR4D& color = m_pcbSettings.GetColor( aTextBox, aLayer );
|
const COLOR4D& color = m_pcbSettings.GetColor( aTextBox, aLayer );
|
||||||
int thickness = getLineThickness( aTextBox->GetWidth() );
|
int thickness = getLineThickness( aTextBox->GetWidth() );
|
||||||
PLOT_DASH_TYPE lineStyle = aTextBox->GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = aTextBox->GetStroke().GetLineStyle();
|
||||||
wxString resolvedText( aTextBox->GetShownText( true ) );
|
wxString resolvedText( aTextBox->GetShownText( true ) );
|
||||||
|
|
||||||
KIFONT::FONT* font = aTextBox->GetFont();
|
KIFONT::FONT* font = aTextBox->GetFont();
|
||||||
|
@ -2178,7 +2178,7 @@ void PCB_PAINTER::draw( const PCB_TEXTBOX* aTextBox, int aLayer )
|
||||||
|
|
||||||
if( aTextBox->IsBorderEnabled() )
|
if( aTextBox->IsBorderEnabled() )
|
||||||
{
|
{
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
if( thickness > 0 )
|
if( thickness > 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -647,16 +647,16 @@ static struct PCB_TEXTBOX_DESC
|
||||||
{
|
{
|
||||||
PCB_TEXTBOX_DESC()
|
PCB_TEXTBOX_DESC()
|
||||||
{
|
{
|
||||||
ENUM_MAP<PLOT_DASH_TYPE>& plotDashTypeEnum = ENUM_MAP<PLOT_DASH_TYPE>::Instance();
|
ENUM_MAP<LINE_STYLE>& plotDashTypeEnum = ENUM_MAP<LINE_STYLE>::Instance();
|
||||||
|
|
||||||
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
if( plotDashTypeEnum.Choices().GetCount() == 0 )
|
||||||
{
|
{
|
||||||
plotDashTypeEnum.Map( PLOT_DASH_TYPE::DEFAULT, _HKI( "Default" ) )
|
plotDashTypeEnum.Map( LINE_STYLE::DEFAULT, _HKI( "Default" ) )
|
||||||
.Map( PLOT_DASH_TYPE::SOLID, _HKI( "Solid" ) )
|
.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASH, _HKI( "Dashed" ) )
|
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DOT, _HKI( "Dotted" ) )
|
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOT, _HKI( "Dash-Dot" ) )
|
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
|
||||||
.Map( PLOT_DASH_TYPE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
|
@ -677,15 +677,15 @@ static struct PCB_TEXTBOX_DESC
|
||||||
|
|
||||||
const wxString borderProps = _( "Border Properties" );
|
const wxString borderProps = _( "Border Properties" );
|
||||||
|
|
||||||
void ( PCB_TEXTBOX::*lineStyleSetter )( PLOT_DASH_TYPE ) = &PCB_TEXTBOX::SetLineStyle;
|
void ( PCB_TEXTBOX::*lineStyleSetter )( LINE_STYLE ) = &PCB_TEXTBOX::SetLineStyle;
|
||||||
PLOT_DASH_TYPE ( PCB_TEXTBOX::*lineStyleGetter )() const = &PCB_TEXTBOX::GetLineStyle;
|
LINE_STYLE ( PCB_TEXTBOX::*lineStyleGetter )() const = &PCB_TEXTBOX::GetLineStyle;
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<PCB_TEXTBOX, bool>( _HKI( "Border" ),
|
propMgr.AddProperty( new PROPERTY<PCB_TEXTBOX, bool>( _HKI( "Border" ),
|
||||||
&PCB_TEXTBOX::SetBorderEnabled,
|
&PCB_TEXTBOX::SetBorderEnabled,
|
||||||
&PCB_TEXTBOX::IsBorderEnabled ),
|
&PCB_TEXTBOX::IsBorderEnabled ),
|
||||||
borderProps );
|
borderProps );
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY_ENUM<PCB_TEXTBOX, PLOT_DASH_TYPE>( _HKI( "Border Style" ),
|
propMgr.AddProperty( new PROPERTY_ENUM<PCB_TEXTBOX, LINE_STYLE>( _HKI( "Border Style" ),
|
||||||
lineStyleSetter,
|
lineStyleSetter,
|
||||||
lineStyleGetter ),
|
lineStyleGetter ),
|
||||||
borderProps );
|
borderProps );
|
||||||
|
|
|
@ -406,7 +406,7 @@ void BRDITEMS_PLOTTER::PlotDimension( const PCB_DIMENSION_BASE* aDim )
|
||||||
|
|
||||||
PCB_SHAPE temp_item;
|
PCB_SHAPE temp_item;
|
||||||
|
|
||||||
temp_item.SetStroke( STROKE_PARAMS( aDim->GetLineThickness(), PLOT_DASH_TYPE::SOLID ) );
|
temp_item.SetStroke( STROKE_PARAMS( aDim->GetLineThickness(), LINE_STYLE::SOLID ) );
|
||||||
temp_item.SetLayer( aDim->GetLayer() );
|
temp_item.SetLayer( aDim->GetLayer() );
|
||||||
|
|
||||||
for( const std::shared_ptr<SHAPE>& shape : aDim->GetShapes() )
|
for( const std::shared_ptr<SHAPE>& shape : aDim->GetShapes() )
|
||||||
|
@ -459,7 +459,7 @@ void BRDITEMS_PLOTTER::PlotPcbTarget( const PCB_TARGET* aMire )
|
||||||
|
|
||||||
temp_item.SetShape( SHAPE_T::CIRCLE );
|
temp_item.SetShape( SHAPE_T::CIRCLE );
|
||||||
temp_item.SetFilled( false );
|
temp_item.SetFilled( false );
|
||||||
temp_item.SetStroke( STROKE_PARAMS( aMire->GetWidth(), PLOT_DASH_TYPE::SOLID ) );
|
temp_item.SetStroke( STROKE_PARAMS( aMire->GetWidth(), LINE_STYLE::SOLID ) );
|
||||||
temp_item.SetLayer( aMire->GetLayer() );
|
temp_item.SetLayer( aMire->GetLayer() );
|
||||||
temp_item.SetStart( aMire->GetPosition() );
|
temp_item.SetStart( aMire->GetPosition() );
|
||||||
radius = aMire->GetSize() / 3;
|
radius = aMire->GetSize() / 3;
|
||||||
|
@ -693,9 +693,9 @@ void BRDITEMS_PLOTTER::PlotShape( const PCB_SHAPE* aShape )
|
||||||
if( !m_layerMask[aShape->GetLayer()] )
|
if( !m_layerMask[aShape->GetLayer()] )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool sketch = GetPlotMode() == SKETCH;
|
bool sketch = GetPlotMode() == SKETCH;
|
||||||
int thickness = aShape->GetWidth();
|
int thickness = aShape->GetWidth();
|
||||||
PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
|
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
|
||||||
|
|
||||||
m_plotter->SetColor( getColor( aShape->GetLayer() ) );
|
m_plotter->SetColor( getColor( aShape->GetLayer() ) );
|
||||||
|
|
||||||
|
@ -735,7 +735,7 @@ void BRDITEMS_PLOTTER::PlotShape( const PCB_SHAPE* aShape )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
switch( aShape->GetShape() )
|
switch( aShape->GetShape() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ void ALTIUM_PCB::HelperCreateBoardOutline( const std::vector<ALTIUM_VERTICE>& aV
|
||||||
HelperShapeLineChainFromAltiumVertices( lineChain, aVertices );
|
HelperShapeLineChainFromAltiumVertices( lineChain, aVertices );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( m_board->GetDesignSettings().GetLineThickness( Edge_Cuts ),
|
STROKE_PARAMS stroke( m_board->GetDesignSettings().GetLineThickness( Edge_Cuts ),
|
||||||
PLOT_DASH_TYPE::SOLID );
|
LINE_STYLE::SOLID );
|
||||||
|
|
||||||
for( int i = 0; i <= lineChain.PointCount() && i != -1; i = lineChain.NextShape( i ) )
|
for( int i = 0; i <= lineChain.PointCount() && i != -1; i = lineChain.NextShape( i ) )
|
||||||
{
|
{
|
||||||
|
@ -1427,7 +1427,7 @@ void ALTIUM_PCB::HelperParseDimensions6Leader( const ADIMENSION6& aElem )
|
||||||
PCB_SHAPE* shape = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
PCB_SHAPE* shape = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
||||||
m_board->Add( shape, ADD_MODE::APPEND );
|
m_board->Add( shape, ADD_MODE::APPEND );
|
||||||
shape->SetLayer( klayer );
|
shape->SetLayer( klayer );
|
||||||
shape->SetStroke( STROKE_PARAMS( aElem.linewidth, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( aElem.linewidth, LINE_STYLE::SOLID ) );
|
||||||
shape->SetStart( last );
|
shape->SetStart( last );
|
||||||
shape->SetEnd( aElem.referencePoint.at( i ) );
|
shape->SetEnd( aElem.referencePoint.at( i ) );
|
||||||
last = aElem.referencePoint.at( i );
|
last = aElem.referencePoint.at( i );
|
||||||
|
@ -1448,7 +1448,7 @@ void ALTIUM_PCB::HelperParseDimensions6Leader( const ADIMENSION6& aElem )
|
||||||
PCB_SHAPE* shape1 = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
PCB_SHAPE* shape1 = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
||||||
m_board->Add( shape1, ADD_MODE::APPEND );
|
m_board->Add( shape1, ADD_MODE::APPEND );
|
||||||
shape1->SetLayer( klayer );
|
shape1->SetLayer( klayer );
|
||||||
shape1->SetStroke( STROKE_PARAMS( aElem.linewidth, PLOT_DASH_TYPE::SOLID ) );
|
shape1->SetStroke( STROKE_PARAMS( aElem.linewidth, LINE_STYLE::SOLID ) );
|
||||||
shape1->SetStart( referencePoint0 );
|
shape1->SetStart( referencePoint0 );
|
||||||
shape1->SetEnd( referencePoint0 + arrVec );
|
shape1->SetEnd( referencePoint0 + arrVec );
|
||||||
|
|
||||||
|
@ -1457,7 +1457,7 @@ void ALTIUM_PCB::HelperParseDimensions6Leader( const ADIMENSION6& aElem )
|
||||||
PCB_SHAPE* shape2 = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
PCB_SHAPE* shape2 = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
||||||
m_board->Add( shape2, ADD_MODE::APPEND );
|
m_board->Add( shape2, ADD_MODE::APPEND );
|
||||||
shape2->SetLayer( klayer );
|
shape2->SetLayer( klayer );
|
||||||
shape2->SetStroke( STROKE_PARAMS( aElem.linewidth, PLOT_DASH_TYPE::SOLID ) );
|
shape2->SetStroke( STROKE_PARAMS( aElem.linewidth, LINE_STYLE::SOLID ) );
|
||||||
shape2->SetStart( referencePoint0 );
|
shape2->SetStart( referencePoint0 );
|
||||||
shape2->SetEnd( referencePoint0 + arrVec );
|
shape2->SetEnd( referencePoint0 + arrVec );
|
||||||
}
|
}
|
||||||
|
@ -1499,7 +1499,7 @@ void ALTIUM_PCB::HelperParseDimensions6Datum( const ADIMENSION6& aElem )
|
||||||
PCB_SHAPE* shape = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
PCB_SHAPE* shape = new PCB_SHAPE( m_board, SHAPE_T::SEGMENT );
|
||||||
m_board->Add( shape, ADD_MODE::APPEND );
|
m_board->Add( shape, ADD_MODE::APPEND );
|
||||||
shape->SetLayer( klayer );
|
shape->SetLayer( klayer );
|
||||||
shape->SetStroke( STROKE_PARAMS( aElem.linewidth, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( aElem.linewidth, LINE_STYLE::SOLID ) );
|
||||||
shape->SetStart( aElem.referencePoint.at( i ) );
|
shape->SetStart( aElem.referencePoint.at( i ) );
|
||||||
// shape->SetEnd( /* TODO: seems to be based on TEXTY */ );
|
// shape->SetEnd( /* TODO: seems to be based on TEXTY */ );
|
||||||
}
|
}
|
||||||
|
@ -2032,7 +2032,7 @@ void ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItem( const AREGION6& aElem )
|
||||||
shape->SetPolyShape( linechain );
|
shape->SetPolyShape( linechain );
|
||||||
shape->SetFilled( false );
|
shape->SetFilled( false );
|
||||||
shape->SetLayer( klayer );
|
shape->SetLayer( klayer );
|
||||||
shape->SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( 0.1 ), PLOT_DASH_TYPE::DASH ) );
|
shape->SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( 0.1 ), LINE_STYLE::DASH ) );
|
||||||
|
|
||||||
m_board->Add( shape, ADD_MODE::APPEND );
|
m_board->Add( shape, ADD_MODE::APPEND );
|
||||||
}
|
}
|
||||||
|
@ -2145,9 +2145,9 @@ void ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItem( FOOTPRINT* aFoot
|
||||||
shape->SetLayer( klayer );
|
shape->SetLayer( klayer );
|
||||||
|
|
||||||
if( aElem.kind == ALTIUM_REGION_KIND::DASHED_OUTLINE )
|
if( aElem.kind == ALTIUM_REGION_KIND::DASHED_OUTLINE )
|
||||||
shape->SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( 0.1 ), PLOT_DASH_TYPE::DASH ) );
|
shape->SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( 0.1 ), LINE_STYLE::DASH ) );
|
||||||
else
|
else
|
||||||
shape->SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( 0.1 ), PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( 0.1 ), LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
aFootprint->Add( shape, ADD_MODE::APPEND );
|
aFootprint->Add( shape, ADD_MODE::APPEND );
|
||||||
}
|
}
|
||||||
|
@ -2450,7 +2450,7 @@ void ALTIUM_PCB::ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimiti
|
||||||
PCB_SHAPE shape( nullptr );
|
PCB_SHAPE shape( nullptr );
|
||||||
|
|
||||||
ConvertArcs6ToPcbShape( aElem, &shape );
|
ConvertArcs6ToPcbShape( aElem, &shape );
|
||||||
shape.SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
shape.SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
HelperPcpShapeAsBoardKeepoutRegion( shape, aElem.layer, aElem.keepoutrestrictions );
|
HelperPcpShapeAsBoardKeepoutRegion( shape, aElem.layer, aElem.keepoutrestrictions );
|
||||||
}
|
}
|
||||||
|
@ -2470,7 +2470,7 @@ void ALTIUM_PCB::ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimiti
|
||||||
PCB_SHAPE* arc = new PCB_SHAPE( m_board );
|
PCB_SHAPE* arc = new PCB_SHAPE( m_board );
|
||||||
|
|
||||||
ConvertArcs6ToPcbShape( aElem, arc );
|
ConvertArcs6ToPcbShape( aElem, arc );
|
||||||
arc->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
arc->SetLayer( layerExpansionMask.first );
|
arc->SetLayer( layerExpansionMask.first );
|
||||||
|
|
||||||
m_board->Add( arc, ADD_MODE::APPEND );
|
m_board->Add( arc, ADD_MODE::APPEND );
|
||||||
|
@ -2492,7 +2492,7 @@ void ALTIUM_PCB::ConvertArcs6ToFootprintItem( FOOTPRINT* aFootprint, const AARC6
|
||||||
PCB_SHAPE shape( nullptr );
|
PCB_SHAPE shape( nullptr );
|
||||||
|
|
||||||
ConvertArcs6ToPcbShape( aElem, &shape );
|
ConvertArcs6ToPcbShape( aElem, &shape );
|
||||||
shape.SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
shape.SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
HelperPcpShapeAsFootprintKeepoutRegion( aFootprint, shape, aElem.layer,
|
HelperPcpShapeAsFootprintKeepoutRegion( aFootprint, shape, aElem.layer,
|
||||||
aElem.keepoutrestrictions );
|
aElem.keepoutrestrictions );
|
||||||
|
@ -2523,7 +2523,7 @@ void ALTIUM_PCB::ConvertArcs6ToFootprintItem( FOOTPRINT* aFootprint, const AARC6
|
||||||
PCB_SHAPE* arc = new PCB_SHAPE( aFootprint );
|
PCB_SHAPE* arc = new PCB_SHAPE( aFootprint );
|
||||||
|
|
||||||
ConvertArcs6ToPcbShape( aElem, arc );
|
ConvertArcs6ToPcbShape( aElem, arc );
|
||||||
arc->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
arc->SetLayer( layerExpansionMask.first );
|
arc->SetLayer( layerExpansionMask.first );
|
||||||
|
|
||||||
aFootprint->Add( arc, ADD_MODE::APPEND );
|
aFootprint->Add( arc, ADD_MODE::APPEND );
|
||||||
|
@ -2564,7 +2564,7 @@ void ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer( const AARC6& aElem, PCB_LAYER_I
|
||||||
PCB_SHAPE* arc = new PCB_SHAPE( m_board );
|
PCB_SHAPE* arc = new PCB_SHAPE( m_board );
|
||||||
|
|
||||||
ConvertArcs6ToPcbShape( aElem, arc );
|
ConvertArcs6ToPcbShape( aElem, arc );
|
||||||
arc->SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
arc->SetLayer( aLayer );
|
arc->SetLayer( aLayer );
|
||||||
|
|
||||||
m_board->Add( arc, ADD_MODE::APPEND );
|
m_board->Add( arc, ADD_MODE::APPEND );
|
||||||
|
@ -2578,7 +2578,7 @@ void ALTIUM_PCB::ConvertArcs6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, cons
|
||||||
PCB_SHAPE* arc = new PCB_SHAPE( aFootprint );
|
PCB_SHAPE* arc = new PCB_SHAPE( aFootprint );
|
||||||
|
|
||||||
ConvertArcs6ToPcbShape( aElem, arc );
|
ConvertArcs6ToPcbShape( aElem, arc );
|
||||||
arc->SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
arc->SetLayer( aLayer );
|
arc->SetLayer( aLayer );
|
||||||
|
|
||||||
aFootprint->Add( arc, ADD_MODE::APPEND );
|
aFootprint->Add( arc, ADD_MODE::APPEND );
|
||||||
|
@ -2929,7 +2929,7 @@ void ALTIUM_PCB::HelperParsePad6NonCopper( const APAD6& aElem, PCB_LAYER_ID aLay
|
||||||
int offset = ( std::min( aElem.topsize.x, aElem.topsize.y ) * cornerradius ) / 200;
|
int offset = ( std::min( aElem.topsize.x, aElem.topsize.y ) * cornerradius ) / 200;
|
||||||
|
|
||||||
aShape->SetLayer( aLayer );
|
aShape->SetLayer( aLayer );
|
||||||
aShape->SetStroke( STROKE_PARAMS( offset * 2, PLOT_DASH_TYPE::SOLID ) );
|
aShape->SetStroke( STROKE_PARAMS( offset * 2, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( cornerradius < 100 )
|
if( cornerradius < 100 )
|
||||||
{
|
{
|
||||||
|
@ -2952,7 +2952,7 @@ void ALTIUM_PCB::HelperParsePad6NonCopper( const APAD6& aElem, PCB_LAYER_ID aLay
|
||||||
aShape->SetFilled( true );
|
aShape->SetFilled( true );
|
||||||
aShape->SetStart( aElem.position );
|
aShape->SetStart( aElem.position );
|
||||||
aShape->SetEnd( aElem.position - VECTOR2I( 0, aElem.topsize.x / 4 ) );
|
aShape->SetEnd( aElem.position - VECTOR2I( 0, aElem.topsize.x / 4 ) );
|
||||||
aShape->SetStroke( STROKE_PARAMS( aElem.topsize.x / 2, PLOT_DASH_TYPE::SOLID ) );
|
aShape->SetStroke( STROKE_PARAMS( aElem.topsize.x / 2, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
else if( aElem.topsize.x < aElem.topsize.y )
|
else if( aElem.topsize.x < aElem.topsize.y )
|
||||||
{
|
{
|
||||||
|
@ -2982,7 +2982,7 @@ void ALTIUM_PCB::HelperParsePad6NonCopper( const APAD6& aElem, PCB_LAYER_ID aLay
|
||||||
aShape->SetLayer( aLayer );
|
aShape->SetLayer( aLayer );
|
||||||
aShape->SetStart( aElem.position );
|
aShape->SetStart( aElem.position );
|
||||||
aShape->SetEnd( aElem.position - VECTOR2I( 0, aElem.topsize.x / 4 ) );
|
aShape->SetEnd( aElem.position - VECTOR2I( 0, aElem.topsize.x / 4 ) );
|
||||||
aShape->SetStroke( STROKE_PARAMS( aElem.topsize.x / 2, PLOT_DASH_TYPE::SOLID ) );
|
aShape->SetStroke( STROKE_PARAMS( aElem.topsize.x / 2, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2990,7 +2990,7 @@ void ALTIUM_PCB::HelperParsePad6NonCopper( const APAD6& aElem, PCB_LAYER_ID aLay
|
||||||
aShape->SetShape( SHAPE_T::SEGMENT );
|
aShape->SetShape( SHAPE_T::SEGMENT );
|
||||||
aShape->SetLayer( aLayer );
|
aShape->SetLayer( aLayer );
|
||||||
aShape->SetStroke( STROKE_PARAMS( std::min( aElem.topsize.x, aElem.topsize.y ),
|
aShape->SetStroke( STROKE_PARAMS( std::min( aElem.topsize.x, aElem.topsize.y ),
|
||||||
PLOT_DASH_TYPE::SOLID ) );
|
LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( aElem.topsize.x < aElem.topsize.y )
|
if( aElem.topsize.x < aElem.topsize.y )
|
||||||
{
|
{
|
||||||
|
@ -3144,7 +3144,7 @@ void ALTIUM_PCB::ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPri
|
||||||
PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
|
PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
|
||||||
shape.SetStart( aElem.start );
|
shape.SetStart( aElem.start );
|
||||||
shape.SetEnd( aElem.end );
|
shape.SetEnd( aElem.end );
|
||||||
shape.SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
shape.SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
HelperPcpShapeAsBoardKeepoutRegion( shape, aElem.layer, aElem.keepoutrestrictions );
|
HelperPcpShapeAsBoardKeepoutRegion( shape, aElem.layer, aElem.keepoutrestrictions );
|
||||||
}
|
}
|
||||||
|
@ -3164,7 +3164,7 @@ void ALTIUM_PCB::ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPri
|
||||||
|
|
||||||
seg->SetStart( aElem.start );
|
seg->SetStart( aElem.start );
|
||||||
seg->SetEnd( aElem.end );
|
seg->SetEnd( aElem.end );
|
||||||
seg->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
seg->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
seg->SetLayer( layerExpansionMask.first );
|
seg->SetLayer( layerExpansionMask.first );
|
||||||
|
|
||||||
m_board->Add( seg, ADD_MODE::APPEND );
|
m_board->Add( seg, ADD_MODE::APPEND );
|
||||||
|
@ -3187,7 +3187,7 @@ void ALTIUM_PCB::ConvertTracks6ToFootprintItem( FOOTPRINT* aFootprint, const ATR
|
||||||
PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
|
PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
|
||||||
shape.SetStart( aElem.start );
|
shape.SetStart( aElem.start );
|
||||||
shape.SetEnd( aElem.end );
|
shape.SetEnd( aElem.end );
|
||||||
shape.SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
shape.SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
HelperPcpShapeAsFootprintKeepoutRegion( aFootprint, shape, aElem.layer,
|
HelperPcpShapeAsFootprintKeepoutRegion( aFootprint, shape, aElem.layer,
|
||||||
aElem.keepoutrestrictions );
|
aElem.keepoutrestrictions );
|
||||||
|
@ -3218,7 +3218,7 @@ void ALTIUM_PCB::ConvertTracks6ToFootprintItem( FOOTPRINT* aFootprint, const ATR
|
||||||
|
|
||||||
seg->SetStart( aElem.start );
|
seg->SetStart( aElem.start );
|
||||||
seg->SetEnd( aElem.end );
|
seg->SetEnd( aElem.end );
|
||||||
seg->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
seg->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
seg->SetLayer( layerExpansionMask.first );
|
seg->SetLayer( layerExpansionMask.first );
|
||||||
|
|
||||||
aFootprint->Add( seg, ADD_MODE::APPEND );
|
aFootprint->Add( seg, ADD_MODE::APPEND );
|
||||||
|
@ -3247,7 +3247,7 @@ void ALTIUM_PCB::ConvertTracks6ToBoardItemOnLayer( const ATRACK6& aElem, PCB_LAY
|
||||||
|
|
||||||
seg->SetStart( aElem.start );
|
seg->SetStart( aElem.start );
|
||||||
seg->SetEnd( aElem.end );
|
seg->SetEnd( aElem.end );
|
||||||
seg->SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
seg->SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
seg->SetLayer( aLayer );
|
seg->SetLayer( aLayer );
|
||||||
|
|
||||||
m_board->Add( seg, ADD_MODE::APPEND );
|
m_board->Add( seg, ADD_MODE::APPEND );
|
||||||
|
@ -3262,7 +3262,7 @@ void ALTIUM_PCB::ConvertTracks6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, co
|
||||||
|
|
||||||
seg->SetStart( aElem.start );
|
seg->SetStart( aElem.start );
|
||||||
seg->SetEnd( aElem.end );
|
seg->SetEnd( aElem.end );
|
||||||
seg->SetStroke( STROKE_PARAMS( aElem.width, PLOT_DASH_TYPE::SOLID ) );
|
seg->SetStroke( STROKE_PARAMS( aElem.width, LINE_STYLE::SOLID ) );
|
||||||
seg->SetLayer( aLayer );
|
seg->SetLayer( aLayer );
|
||||||
|
|
||||||
aFootprint->Add( seg, ADD_MODE::APPEND );
|
aFootprint->Add( seg, ADD_MODE::APPEND );
|
||||||
|
@ -3470,7 +3470,7 @@ void ALTIUM_PCB::ConvertFills6ToBoardItem( const AFILL6& aElem )
|
||||||
shape.SetStart( aElem.pos1 );
|
shape.SetStart( aElem.pos1 );
|
||||||
shape.SetEnd( aElem.pos2 );
|
shape.SetEnd( aElem.pos2 );
|
||||||
shape.SetFilled( true );
|
shape.SetFilled( true );
|
||||||
shape.SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::SOLID ) );
|
shape.SetStroke( STROKE_PARAMS( 0, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( aElem.rotation != 0. )
|
if( aElem.rotation != 0. )
|
||||||
{
|
{
|
||||||
|
@ -3501,7 +3501,7 @@ void ALTIUM_PCB::ConvertFills6ToFootprintItem( FOOTPRINT* aFootprint, const AFIL
|
||||||
shape.SetStart( aElem.pos1 );
|
shape.SetStart( aElem.pos1 );
|
||||||
shape.SetEnd( aElem.pos2 );
|
shape.SetEnd( aElem.pos2 );
|
||||||
shape.SetFilled( true );
|
shape.SetFilled( true );
|
||||||
shape.SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::SOLID ) );
|
shape.SetStroke( STROKE_PARAMS( 0, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( aElem.rotation != 0. )
|
if( aElem.rotation != 0. )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2520,7 +2520,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadNetTracks( const NET_ID& aCadstarNe
|
||||||
{
|
{
|
||||||
PCB_SHAPE* shape = getShapeFromVertex( prevEnd, v.Vertex );
|
PCB_SHAPE* shape = getShapeFromVertex( prevEnd, v.Vertex );
|
||||||
shape->SetLayer( getKiCadLayer( aCadstarRoute.LayerID ) );
|
shape->SetLayer( getKiCadLayer( aCadstarRoute.LayerID ) );
|
||||||
shape->SetStroke( STROKE_PARAMS( getKiCadLength( v.RouteWidth ), PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( getKiCadLength( v.RouteWidth ), LINE_STYLE::SOLID ) );
|
||||||
shape->SetLocked( v.Fixed );
|
shape->SetLocked( v.Fixed );
|
||||||
shapes.push_back( shape );
|
shapes.push_back( shape );
|
||||||
prevEnd = v.Vertex.End;
|
prevEnd = v.Vertex.End;
|
||||||
|
@ -2794,7 +2794,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarShape( const SHAPE& aCadstarShape,
|
||||||
shapePolys.Fracture( SHAPE_POLY_SET::POLYGON_MODE::PM_STRICTLY_SIMPLE );
|
shapePolys.Fracture( SHAPE_POLY_SET::POLYGON_MODE::PM_STRICTLY_SIMPLE );
|
||||||
|
|
||||||
shape->SetPolyShape( shapePolys );
|
shape->SetPolyShape( shapePolys );
|
||||||
shape->SetStroke( STROKE_PARAMS( aLineThickness, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( aLineThickness, LINE_STYLE::SOLID ) );
|
||||||
shape->SetLayer( aKiCadLayer );
|
shape->SetLayer( aKiCadLayer );
|
||||||
aContainer->Add( shape, ADD_MODE::APPEND );
|
aContainer->Add( shape, ADD_MODE::APPEND );
|
||||||
|
|
||||||
|
@ -2844,7 +2844,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarVerticesAsShapes( const std::vector<
|
||||||
|
|
||||||
for( PCB_SHAPE* shape : shapes )
|
for( PCB_SHAPE* shape : shapes )
|
||||||
{
|
{
|
||||||
shape->SetStroke( STROKE_PARAMS( aLineThickness, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( aLineThickness, LINE_STYLE::SOLID ) );
|
||||||
shape->SetLayer( aKiCadLayer );
|
shape->SetLayer( aKiCadLayer );
|
||||||
shape->SetParent( aContainer );
|
shape->SetParent( aContainer );
|
||||||
aContainer->Add( shape, ADD_MODE::APPEND );
|
aContainer->Add( shape, ADD_MODE::APPEND );
|
||||||
|
|
|
@ -704,7 +704,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
||||||
}
|
}
|
||||||
|
|
||||||
shape->SetLayer( layer );
|
shape->SetLayer( layer );
|
||||||
shape->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_xpath->pop();
|
m_xpath->pop();
|
||||||
|
@ -890,7 +890,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
||||||
shape->SetLayer( layer );
|
shape->SetLayer( layer );
|
||||||
shape->SetStart( VECTOR2I( kicad_x( c.x ), kicad_y( c.y ) ) );
|
shape->SetStart( VECTOR2I( kicad_x( c.x ), kicad_y( c.y ) ) );
|
||||||
shape->SetEnd( VECTOR2I( kicad_x( c.x ) + radius, kicad_y( c.y ) ) );
|
shape->SetEnd( VECTOR2I( kicad_x( c.x ) + radius, kicad_y( c.y ) ) );
|
||||||
shape->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1871,7 +1871,7 @@ void EAGLE_PLUGIN::packageWire( FOOTPRINT* aFootprint, wxXmlNode* aTree ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
dwg->SetLayer( layer );
|
dwg->SetLayer( layer );
|
||||||
dwg->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
dwg->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
dwg->Rotate( { 0, 0 }, aFootprint->GetOrientation() );
|
dwg->Rotate( { 0, 0 }, aFootprint->GetOrientation() );
|
||||||
dwg->Move( aFootprint->GetPosition() );
|
dwg->Move( aFootprint->GetPosition() );
|
||||||
|
|
||||||
|
@ -2353,7 +2353,7 @@ void EAGLE_PLUGIN::packageCircle( FOOTPRINT* aFootprint, wxXmlNode* aTree ) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
aFootprint->Add( gr );
|
aFootprint->Add( gr );
|
||||||
gr->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
gr->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
switch( (int) layer )
|
switch( (int) layer )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2105,7 +2105,7 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
|
||||||
line->SetEnd( VECTOR2I( lsrc->end_x, lsrc->end_y ) );
|
line->SetEnd( VECTOR2I( lsrc->end_x, lsrc->end_y ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
line->SetStroke( STROKE_PARAMS( lsrc->width, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( lsrc->width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
line->Rotate( { 0, 0 }, fp->GetOrientation() );
|
line->Rotate( { 0, 0 }, fp->GetOrientation() );
|
||||||
line->Move( fp->GetPosition() );
|
line->Move( fp->GetPosition() );
|
||||||
|
@ -2149,7 +2149,7 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
|
||||||
arc->SetArcGeometry( lsrc->result.GetP0(),
|
arc->SetArcGeometry( lsrc->result.GetP0(),
|
||||||
lsrc->result.GetArcMid(),
|
lsrc->result.GetArcMid(),
|
||||||
lsrc->result.GetP1() );
|
lsrc->result.GetP1() );
|
||||||
arc->SetStroke( STROKE_PARAMS( lsrc->width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( lsrc->width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
arc->Rotate( { 0, 0 }, fp->GetOrientation() );
|
arc->Rotate( { 0, 0 }, fp->GetOrientation() );
|
||||||
arc->Move( fp->GetPosition() );
|
arc->Move( fp->GetPosition() );
|
||||||
|
@ -2654,7 +2654,7 @@ bool FABMASTER::loadPolygon( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRA
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_poly->SetStroke( STROKE_PARAMS( ( *( aLine->segment.begin() ) )->width,
|
new_poly->SetStroke( STROKE_PARAMS( ( *( aLine->segment.begin() ) )->width,
|
||||||
PLOT_DASH_TYPE::SOLID ) );
|
LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( new_poly->GetWidth() == 0 )
|
if( new_poly->GetWidth() == 0 )
|
||||||
new_poly->SetStroke( defaultStroke );
|
new_poly->SetStroke( defaultStroke );
|
||||||
|
@ -2795,7 +2795,7 @@ bool FABMASTER::loadOutline( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRA
|
||||||
line->SetLayer( layer );
|
line->SetLayer( layer );
|
||||||
line->SetStart( VECTOR2I( src->start_x, src->start_y ) );
|
line->SetStart( VECTOR2I( src->start_x, src->start_y ) );
|
||||||
line->SetEnd( VECTOR2I( src->end_x, src->end_y ) );
|
line->SetEnd( VECTOR2I( src->end_x, src->end_y ) );
|
||||||
line->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( src->width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( line->GetWidth() == 0 )
|
if( line->GetWidth() == 0 )
|
||||||
line->SetStroke( defaultStroke );
|
line->SetStroke( defaultStroke );
|
||||||
|
@ -2829,7 +2829,7 @@ bool FABMASTER::loadOutline( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRA
|
||||||
arc->SetArcGeometry( src->result.GetP0(),
|
arc->SetArcGeometry( src->result.GetP0(),
|
||||||
src->result.GetArcMid(),
|
src->result.GetArcMid(),
|
||||||
src->result.GetP1() );
|
src->result.GetP1() );
|
||||||
arc->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( src->width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( arc->GetWidth() == 0 )
|
if( arc->GetWidth() == 0 )
|
||||||
arc->SetStroke( defaultStroke );
|
arc->SetStroke( defaultStroke );
|
||||||
|
@ -2930,7 +2930,7 @@ bool FABMASTER::loadGraphics( BOARD* aBoard )
|
||||||
line->SetLayer( layer );
|
line->SetLayer( layer );
|
||||||
line->SetStart( VECTOR2I( src->start_x, src->start_y ) );
|
line->SetStart( VECTOR2I( src->start_x, src->start_y ) );
|
||||||
line->SetEnd( VECTOR2I( src->end_x, src->end_y ) );
|
line->SetEnd( VECTOR2I( src->end_x, src->end_y ) );
|
||||||
line->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) );
|
line->SetStroke( STROKE_PARAMS( src->width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
aBoard->Add( line, ADD_MODE::APPEND );
|
aBoard->Add( line, ADD_MODE::APPEND );
|
||||||
break;
|
break;
|
||||||
|
@ -2958,7 +2958,7 @@ bool FABMASTER::loadGraphics( BOARD* aBoard )
|
||||||
arc->SetArcGeometry( src->result.GetP0(),
|
arc->SetArcGeometry( src->result.GetP0(),
|
||||||
src->result.GetArcMid(),
|
src->result.GetArcMid(),
|
||||||
src->result.GetP1() );
|
src->result.GetP1() );
|
||||||
arc->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( src->width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
aBoard->Add( arc, ADD_MODE::APPEND );
|
aBoard->Add( arc, ADD_MODE::APPEND );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -425,7 +425,7 @@ FOOTPRINT* GPCB_FPL_CACHE::parseFOOTPRINT( LINE_READER* aLineReader )
|
||||||
shape->SetEnd( VECTOR2I( parseInt( parameters[4], conv_unit ),
|
shape->SetEnd( VECTOR2I( parseInt( parameters[4], conv_unit ),
|
||||||
parseInt( parameters[5], conv_unit ) ) );
|
parseInt( parameters[5], conv_unit ) ) );
|
||||||
shape->SetStroke( STROKE_PARAMS( parseInt( parameters[6], conv_unit ),
|
shape->SetStroke( STROKE_PARAMS( parseInt( parameters[6], conv_unit ),
|
||||||
PLOT_DASH_TYPE::SOLID ) );
|
LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
shape->Rotate( { 0, 0 }, footprint->GetOrientation() );
|
shape->Rotate( { 0, 0 }, footprint->GetOrientation() );
|
||||||
shape->Move( footprint->GetPosition() );
|
shape->Move( footprint->GetPosition() );
|
||||||
|
@ -483,7 +483,7 @@ FOOTPRINT* GPCB_FPL_CACHE::parseFOOTPRINT( LINE_READER* aLineReader )
|
||||||
}
|
}
|
||||||
|
|
||||||
shape->SetStroke( STROKE_PARAMS( parseInt( parameters[8], conv_unit ),
|
shape->SetStroke( STROKE_PARAMS( parseInt( parameters[8], conv_unit ),
|
||||||
PLOT_DASH_TYPE::SOLID ) );
|
LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
shape->Rotate( { 0, 0 }, footprint->GetOrientation() );
|
shape->Rotate( { 0, 0 }, footprint->GetOrientation() );
|
||||||
shape->Move( footprint->GetPosition() );
|
shape->Move( footprint->GetPosition() );
|
||||||
|
|
|
@ -2560,7 +2560,7 @@ PCB_SHAPE* PCB_PARSER::parsePCB_SHAPE( BOARD_ITEM* aParent )
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
VECTOR2I pt;
|
VECTOR2I pt;
|
||||||
STROKE_PARAMS stroke( 0, PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke( 0, LINE_STYLE::SOLID );
|
||||||
std::unique_ptr<PCB_SHAPE> shape = std::make_unique<PCB_SHAPE>( aParent );
|
std::unique_ptr<PCB_SHAPE> shape = std::make_unique<PCB_SHAPE>( aParent );
|
||||||
|
|
||||||
switch( CurTok() )
|
switch( CurTok() )
|
||||||
|
@ -3201,7 +3201,7 @@ PCB_TEXTBOX* PCB_PARSER::parsePCB_TEXTBOX( BOARD_ITEM* aParent )
|
||||||
|
|
||||||
std::unique_ptr<PCB_TEXTBOX> textbox = std::make_unique<PCB_TEXTBOX>( aParent );
|
std::unique_ptr<PCB_TEXTBOX> textbox = std::make_unique<PCB_TEXTBOX>( aParent );
|
||||||
|
|
||||||
STROKE_PARAMS stroke( -1, PLOT_DASH_TYPE::SOLID );
|
STROKE_PARAMS stroke( -1, LINE_STYLE::SOLID );
|
||||||
T token = NextTok();
|
T token = NextTok();
|
||||||
|
|
||||||
if( token == T_locked )
|
if( token == T_locked )
|
||||||
|
|
|
@ -1703,7 +1703,7 @@ void LEGACY_PLUGIN::loadFP_SHAPE( FOOTPRINT* aFootprint )
|
||||||
if( layer < FIRST_LAYER || layer > LAST_NON_COPPER_LAYER )
|
if( layer < FIRST_LAYER || layer > LAST_NON_COPPER_LAYER )
|
||||||
layer = SILKSCREEN_N_FRONT;
|
layer = SILKSCREEN_N_FRONT;
|
||||||
|
|
||||||
dwg->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
dwg->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
dwg->SetLayer( leg_layer2new( m_cu_count, layer ) );
|
dwg->SetLayer( leg_layer2new( m_cu_count, layer ) );
|
||||||
|
|
||||||
dwg->Rotate( { 0, 0 }, aFootprint->GetOrientation() );
|
dwg->Rotate( { 0, 0 }, aFootprint->GetOrientation() );
|
||||||
|
@ -1867,7 +1867,7 @@ void LEGACY_PLUGIN::loadPCB_LINE()
|
||||||
|
|
||||||
dseg->SetShape( static_cast<SHAPE_T>( shape ) );
|
dseg->SetShape( static_cast<SHAPE_T>( shape ) );
|
||||||
dseg->SetFilled( false );
|
dseg->SetFilled( false );
|
||||||
dseg->SetStroke( STROKE_PARAMS( width, PLOT_DASH_TYPE::SOLID ) );
|
dseg->SetStroke( STROKE_PARAMS( width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( dseg->GetShape() == SHAPE_T::ARC )
|
if( dseg->GetShape() == SHAPE_T::ARC )
|
||||||
{
|
{
|
||||||
|
|
|
@ -180,7 +180,7 @@ void PCAD_ARC::AddToBoard( FOOTPRINT* aFootprint )
|
||||||
arc->SetStart( VECTOR2I( m_StartX, m_StartY ) );
|
arc->SetStart( VECTOR2I( m_StartX, m_StartY ) );
|
||||||
arc->SetArcAngleAndEnd( -m_Angle, true );
|
arc->SetArcAngleAndEnd( -m_Angle, true );
|
||||||
|
|
||||||
arc->SetStroke( STROKE_PARAMS( m_Width, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( m_Width, LINE_STYLE::SOLID ) );
|
||||||
arc->SetLayer( m_KiCadLayer );
|
arc->SetLayer( m_KiCadLayer );
|
||||||
|
|
||||||
if( aFootprint )
|
if( aFootprint )
|
||||||
|
|
|
@ -137,7 +137,7 @@ void PCAD_LINE::AddToBoard( FOOTPRINT* aFootprint )
|
||||||
segment->SetLayer( m_KiCadLayer );
|
segment->SetLayer( m_KiCadLayer );
|
||||||
segment->SetStart( VECTOR2I( m_PositionX, m_PositionY ) );
|
segment->SetStart( VECTOR2I( m_PositionX, m_PositionY ) );
|
||||||
segment->SetEnd( VECTOR2I( m_ToX, m_ToY ) );
|
segment->SetEnd( VECTOR2I( m_ToX, m_ToY ) );
|
||||||
segment->SetStroke( STROKE_PARAMS( m_Width, PLOT_DASH_TYPE::SOLID ) );
|
segment->SetStroke( STROKE_PARAMS( m_Width, LINE_STYLE::SOLID ) );
|
||||||
|
|
||||||
if( aFootprint )
|
if( aFootprint )
|
||||||
{
|
{
|
||||||
|
|
|
@ -454,7 +454,7 @@ int CONVERT_TOOL::CreatePolys( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
graphic->SetShape( SHAPE_T::POLY );
|
graphic->SetShape( SHAPE_T::POLY );
|
||||||
graphic->SetStroke( STROKE_PARAMS( resolvedSettings.m_LineWidth, PLOT_DASH_TYPE::SOLID,
|
graphic->SetStroke( STROKE_PARAMS( resolvedSettings.m_LineWidth, LINE_STYLE::SOLID,
|
||||||
COLOR4D::UNSPECIFIED ) );
|
COLOR4D::UNSPECIFIED ) );
|
||||||
graphic->SetFilled( resolvedSettings.m_Strategy == CENTERLINE );
|
graphic->SetFilled( resolvedSettings.m_Strategy == CENTERLINE );
|
||||||
graphic->SetLayer( destLayer );
|
graphic->SetLayer( destLayer );
|
||||||
|
|
|
@ -173,7 +173,7 @@ DRAWING_TOOL::DRAWING_TOOL() :
|
||||||
m_mode( MODE::NONE ),
|
m_mode( MODE::NONE ),
|
||||||
m_inDrawingTool( false ),
|
m_inDrawingTool( false ),
|
||||||
m_layer( UNDEFINED_LAYER ),
|
m_layer( UNDEFINED_LAYER ),
|
||||||
m_stroke( 1, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
m_stroke( 1, LINE_STYLE::DEFAULT, COLOR4D::UNSPECIFIED ),
|
||||||
m_pickerItem( nullptr ),
|
m_pickerItem( nullptr ),
|
||||||
m_tuningPattern( nullptr )
|
m_tuningPattern( nullptr )
|
||||||
{
|
{
|
||||||
|
@ -289,7 +289,7 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason )
|
||||||
|
|
||||||
m_layer = m_frame->GetActiveLayer();
|
m_layer = m_frame->GetActiveLayer();
|
||||||
m_stroke.SetWidth( bds.GetLineThickness( m_layer ) );
|
m_stroke.SetWidth( bds.GetLineThickness( m_layer ) );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
m_textAttrs.m_Size = bds.GetTextSize( m_layer );
|
m_textAttrs.m_Size = bds.GetTextSize( m_layer );
|
||||||
|
@ -1818,7 +1818,7 @@ bool DRAWING_TOOL::drawShape( const TOOL_EVENT& aTool, PCB_SHAPE** aGraphic,
|
||||||
{
|
{
|
||||||
m_layer = m_frame->GetActiveLayer();
|
m_layer = m_frame->GetActiveLayer();
|
||||||
m_stroke.SetWidth( bds.GetLineThickness( m_layer ) );
|
m_stroke.SetWidth( bds.GetLineThickness( m_layer ) );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
m_textAttrs.m_Size = bds.GetTextSize( m_layer );
|
m_textAttrs.m_Size = bds.GetTextSize( m_layer );
|
||||||
|
@ -1933,7 +1933,7 @@ bool DRAWING_TOOL::drawShape( const TOOL_EVENT& aTool, PCB_SHAPE** aGraphic,
|
||||||
{
|
{
|
||||||
m_layer = m_frame->GetActiveLayer();
|
m_layer = m_frame->GetActiveLayer();
|
||||||
m_stroke.SetWidth( bds.GetLineThickness( m_layer ) );
|
m_stroke.SetWidth( bds.GetLineThickness( m_layer ) );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
m_textAttrs.m_Size = bds.GetTextSize( m_layer );
|
m_textAttrs.m_Size = bds.GetTextSize( m_layer );
|
||||||
|
@ -2217,7 +2217,7 @@ bool DRAWING_TOOL::drawArc( const TOOL_EVENT& aTool, PCB_SHAPE** aGraphic,
|
||||||
{
|
{
|
||||||
m_layer = m_frame->GetActiveLayer();
|
m_layer = m_frame->GetActiveLayer();
|
||||||
m_stroke.SetWidth( m_frame->GetDesignSettings().GetLineThickness( m_layer ) );
|
m_stroke.SetWidth( m_frame->GetDesignSettings().GetLineThickness( m_layer ) );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2357,7 +2357,7 @@ bool DRAWING_TOOL::drawArc( const TOOL_EVENT& aTool, PCB_SHAPE** aGraphic,
|
||||||
{
|
{
|
||||||
m_layer = m_frame->GetActiveLayer();
|
m_layer = m_frame->GetActiveLayer();
|
||||||
m_stroke.SetWidth( m_frame->GetDesignSettings().GetLineThickness( m_layer ) );
|
m_stroke.SetWidth( m_frame->GetDesignSettings().GetLineThickness( m_layer ) );
|
||||||
m_stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
m_stroke.SetLineStyle( LINE_STYLE::DEFAULT );
|
||||||
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
m_stroke.SetColor( COLOR4D::UNSPECIFIED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -897,7 +897,7 @@ std::vector<PCB_SHAPE*> PAD_TOOL::RecombinePad( PAD* aPad, bool aIsDryRun )
|
||||||
|
|
||||||
PCB_SHAPE* shape = new PCB_SHAPE( nullptr, SHAPE_T::POLY );
|
PCB_SHAPE* shape = new PCB_SHAPE( nullptr, SHAPE_T::POLY );
|
||||||
shape->SetFilled( true );
|
shape->SetFilled( true );
|
||||||
shape->SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( 0, LINE_STYLE::SOLID ) );
|
||||||
shape->SetPolyShape( existingOutline );
|
shape->SetPolyShape( existingOutline );
|
||||||
shape->Rotate( VECTOR2I( 0, 0 ), - aPad->GetOrientation() );
|
shape->Rotate( VECTOR2I( 0, 0 ), - aPad->GetOrientation() );
|
||||||
shape->Move( - aPad->ShapePos() );
|
shape->Move( - aPad->ShapePos() );
|
||||||
|
|
|
@ -243,7 +243,7 @@ void ZONE_CREATE_HELPER::commitZone( std::unique_ptr<ZONE> aZone )
|
||||||
poly->SetFilled( layer != Edge_Cuts && layer != F_CrtYd && layer != B_CrtYd );
|
poly->SetFilled( layer != Edge_Cuts && layer != F_CrtYd && layer != B_CrtYd );
|
||||||
|
|
||||||
poly->SetStroke( STROKE_PARAMS( board->GetDesignSettings().GetLineThickness( layer ),
|
poly->SetStroke( STROKE_PARAMS( board->GetDesignSettings().GetLineThickness( layer ),
|
||||||
PLOT_DASH_TYPE::SOLID ) );
|
LINE_STYLE::SOLID ) );
|
||||||
poly->SetLayer( layer );
|
poly->SetLayer( layer );
|
||||||
poly->SetPolyShape( *aZone->Outline() );
|
poly->SetPolyShape( *aZone->Outline() );
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ void DrawSegment( FOOTPRINT& aFootprint, const SEG& aSeg, int aWidth, PCB_LAYER_
|
||||||
seg->SetStart( aSeg.A );
|
seg->SetStart( aSeg.A );
|
||||||
seg->SetEnd( aSeg.B );
|
seg->SetEnd( aSeg.B );
|
||||||
|
|
||||||
seg->SetStroke( STROKE_PARAMS( aWidth, PLOT_DASH_TYPE::SOLID ) );
|
seg->SetStroke( STROKE_PARAMS( aWidth, LINE_STYLE::SOLID ) );
|
||||||
seg->SetLayer( aLayer );
|
seg->SetLayer( aLayer );
|
||||||
|
|
||||||
seg->Rotate( { 0, 0 }, aFootprint.GetOrientation() );
|
seg->Rotate( { 0, 0 }, aFootprint.GetOrientation() );
|
||||||
|
@ -68,7 +68,7 @@ void DrawArc( FOOTPRINT& aFootprint, const VECTOR2I& aCentre, const VECTOR2I& aS
|
||||||
arc->SetStart( aStart );
|
arc->SetStart( aStart );
|
||||||
arc->SetArcAngleAndEnd( aAngle );
|
arc->SetArcAngleAndEnd( aAngle );
|
||||||
|
|
||||||
arc->SetStroke( STROKE_PARAMS( aWidth, PLOT_DASH_TYPE::SOLID ) );
|
arc->SetStroke( STROKE_PARAMS( aWidth, LINE_STYLE::SOLID ) );
|
||||||
arc->SetLayer( aLayer );
|
arc->SetLayer( aLayer );
|
||||||
|
|
||||||
arc->Rotate( { 0, 0 }, aFootprint.GetOrientation() );
|
arc->Rotate( { 0, 0 }, aFootprint.GetOrientation() );
|
||||||
|
|
|
@ -386,8 +386,8 @@ void CheckFpShape( const PCB_SHAPE* expected, const PCB_SHAPE* shape )
|
||||||
BOOST_CHECK_EQUAL( expected->GetLayerSet(), shape->GetLayerSet() );
|
BOOST_CHECK_EQUAL( expected->GetLayerSet(), shape->GetLayerSet() );
|
||||||
|
|
||||||
BOOST_CHECK_EQUAL( expected->GetStroke().GetWidth(), shape->GetStroke().GetWidth() );
|
BOOST_CHECK_EQUAL( expected->GetStroke().GetWidth(), shape->GetStroke().GetWidth() );
|
||||||
CHECK_ENUM_CLASS_EQUAL( expected->GetStroke().GetPlotStyle(),
|
CHECK_ENUM_CLASS_EQUAL( expected->GetStroke().GetLineStyle(),
|
||||||
shape->GetStroke().GetPlotStyle() );
|
shape->GetStroke().GetLineStyle() );
|
||||||
CHECK_ENUM_CLASS_EQUAL( expected->GetFillMode(), shape->GetFillMode() );
|
CHECK_ENUM_CLASS_EQUAL( expected->GetFillMode(), shape->GetFillMode() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue