Add missing line style prop to eda_shape
This commit is contained in:
parent
6e45be8708
commit
cbc60d90ec
|
@ -1614,6 +1614,21 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
|
|||
}
|
||||
|
||||
|
||||
void EDA_SHAPE::SetLineStyle( const PLOT_DASH_TYPE aStyle )
|
||||
{
|
||||
m_stroke.SetPlotStyle( aStyle );
|
||||
}
|
||||
|
||||
|
||||
PLOT_DASH_TYPE EDA_SHAPE::GetLineStyle() const
|
||||
{
|
||||
if( m_stroke.GetPlotStyle() != PLOT_DASH_TYPE::DEFAULT )
|
||||
return m_stroke.GetPlotStyle();
|
||||
|
||||
return PLOT_DASH_TYPE::SOLID;
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_ENUM_TO_WXANY( SHAPE_T )
|
||||
IMPLEMENT_ENUM_TO_WXANY( PLOT_DASH_TYPE )
|
||||
|
||||
|
@ -1678,6 +1693,10 @@ static struct EDA_SHAPE_DESC
|
|||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
|
||||
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ) );
|
||||
|
||||
void ( EDA_SHAPE::*lineStyleSetter )( PLOT_DASH_TYPE ) = &EDA_SHAPE::SetLineStyle;
|
||||
propMgr.AddProperty( new PROPERTY_ENUM<EDA_SHAPE, PLOT_DASH_TYPE>(
|
||||
_HKI( "Line Style" ), lineStyleSetter, &EDA_SHAPE::GetLineStyle ) );
|
||||
|
||||
auto angle = new PROPERTY<EDA_SHAPE, EDA_ANGLE>( _HKI( "Angle" ),
|
||||
NO_SETTER( EDA_SHAPE, EDA_ANGLE ), &EDA_SHAPE::GetArcAngle,
|
||||
PROPERTY_DISPLAY::PT_DECIDEGREE );
|
||||
|
|
|
@ -110,6 +110,9 @@ public:
|
|||
int GetWidth() const { return m_stroke.GetWidth(); }
|
||||
virtual int GetEffectiveWidth() const { return GetWidth(); }
|
||||
|
||||
void SetLineStyle( const PLOT_DASH_TYPE aStyle );
|
||||
PLOT_DASH_TYPE GetLineStyle() const;
|
||||
|
||||
void SetShape( SHAPE_T aShape ) { m_shape = aShape; }
|
||||
SHAPE_T GetShape() const { return m_shape; }
|
||||
|
||||
|
|
|
@ -581,5 +581,6 @@ static struct PCB_TEXTBOX_DESC
|
|||
propMgr.Mask( TYPE_HASH( PCB_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "End X" ) );
|
||||
propMgr.Mask( TYPE_HASH( PCB_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "End Y" ) );
|
||||
propMgr.Mask( TYPE_HASH( PCB_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "Line Width" ) );
|
||||
propMgr.Mask( TYPE_HASH( PCB_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "Line Style" ) );
|
||||
}
|
||||
} _PCB_TEXTBOX_DESC;
|
||||
|
|
Loading…
Reference in New Issue