7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 20:59:17 +00:00

ADDED: hatched fills for shapes.

This commit is contained in:
Jeff Young 2025-02-23 12:08:20 +00:00
parent 59d6152cf0
commit 3f15b0d75b
50 changed files with 1285 additions and 725 deletions

View File

@ -645,7 +645,7 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
float innerR3DU = TO_3DU( aShape->GetRadius() ) - linewidth3DU / 2.0;
float outerR3DU = TO_3DU( aShape->GetRadius() ) + linewidth3DU / 2.0;
if( aShape->IsFilled() || innerR3DU <= 0.0 )
if( aShape->IsSolidFill() || innerR3DU <= 0.0 )
addFILLED_CIRCLE_2D( aContainer, center3DU, outerR3DU, *aOwner );
else
addRING_2D( aContainer, center3DU, innerR3DU, outerR3DU, *aOwner );
@ -654,7 +654,7 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
}
case SHAPE_T::RECTANGLE:
if( aShape->IsFilled() )
if( aShape->IsSolidFill() )
{
SHAPE_POLY_SET polyList;
@ -759,6 +759,9 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
for( SHAPE* shape : shapes )
delete shape;
}
if( aShape->IsHatchedFill() )
ConvertPolygonToTriangles( aShape->GetHatching(), *aContainer, m_biuTo3Dunits, *aOwner );
}

View File

@ -533,6 +533,118 @@ bool EDA_SHAPE::IsClosed() const
}
void EDA_SHAPE::SetFillMode( FILL_T aFill )
{
m_fill = aFill;
m_hatchingDirty = true;
}
void EDA_SHAPE::SetFillModeProp( UI_FILL_MODE aFill )
{
switch( aFill )
{
case UI_FILL_MODE::NONE: SetFillMode( FILL_T::NO_FILL ); break;
case UI_FILL_MODE::HATCH: SetFillMode( FILL_T::HATCH ); break;
case UI_FILL_MODE::REVERSE_HATCH: SetFillMode( FILL_T::REVERSE_HATCH ); break;
case UI_FILL_MODE::CROSS_HATCH: SetFillMode( FILL_T::CROSS_HATCH ); break;
default: SetFillMode( FILL_T::FILLED_SHAPE ); break;
}
}
UI_FILL_MODE EDA_SHAPE::GetFillModeProp() const
{
switch( m_fill )
{
case FILL_T::NO_FILL: return UI_FILL_MODE::NONE;
case FILL_T::HATCH: return UI_FILL_MODE::HATCH;
case FILL_T::REVERSE_HATCH: return UI_FILL_MODE::REVERSE_HATCH;
case FILL_T::CROSS_HATCH: return UI_FILL_MODE::CROSS_HATCH;
default: return UI_FILL_MODE::SOLID;
}
}
const SHAPE_POLY_SET& EDA_SHAPE::GetHatching() const
{
if( m_hatchingDirty )
{
updateHatching();
m_hatchingDirty = false;
}
return m_hatching;
}
void EDA_SHAPE::updateHatching() const
{
m_hatching.RemoveAllContours();
std::vector<double> slopes;
int lineWidth = GetHatchLineWidth();
int spacing = GetHatchLineSpacing();
SHAPE_POLY_SET shapeBuffer;
if( GetFillMode() == FILL_T::CROSS_HATCH )
slopes = { 1.0, -1.0 };
else if( GetFillMode() == FILL_T::HATCH )
slopes = { -1.0 };
else if( GetFillMode() == FILL_T::REVERSE_HATCH )
slopes = { 1.0 };
else
return;
if( spacing == 0 )
return;
auto addHatchLines =
[&]( const std::vector<SEG>& hatchLines )
{
for( const SEG& seg : hatchLines )
{
TransformOvalToPolygon( m_hatching, seg.A, seg.B, lineWidth, ARC_LOW_DEF,
ERROR_INSIDE );
}
};
switch( m_shape )
{
case SHAPE_T::ARC:
case SHAPE_T::SEGMENT:
case SHAPE_T::BEZIER:
break;
case SHAPE_T::RECTANGLE:
shapeBuffer.NewOutline();
for( const VECTOR2I& pt : GetRectCorners() )
shapeBuffer.Append( pt );
addHatchLines( shapeBuffer.GenerateHatchLines( slopes, spacing, -1 ) );
break;
case SHAPE_T::CIRCLE:
TransformShapeToPolygon( shapeBuffer, 0, ARC_HIGH_DEF, ERROR_INSIDE, true );
addHatchLines( shapeBuffer.GenerateHatchLines( slopes, spacing, -1 ) );
break;
case SHAPE_T::POLY:
if( IsClosed() )
addHatchLines( m_poly.GenerateHatchLines( slopes, spacing, -1 ) );
break;
default:
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
break;
}
m_hatching.Simplify();
}
void EDA_SHAPE::move( const VECTOR2I& aMoveVector )
{
switch ( m_shape )
@ -571,6 +683,8 @@ void EDA_SHAPE::move( const VECTOR2I& aMoveVector )
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
break;
}
m_hatchingDirty = true;
}
@ -629,6 +743,8 @@ void EDA_SHAPE::scale( double aScale )
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
break;
}
m_hatchingDirty = true;
}
@ -690,6 +806,8 @@ void EDA_SHAPE::rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
break;
}
m_hatchingDirty = true;
}
@ -733,6 +851,8 @@ void EDA_SHAPE::flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection )
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
break;
}
m_hatchingDirty = true;
}
@ -799,6 +919,7 @@ void EDA_SHAPE::SetCenter( const VECTOR2I& aCenter )
case SHAPE_T::CIRCLE:
m_start = aCenter;
m_hatchingDirty = true;
break;
default:
@ -1108,8 +1229,13 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
if( IsFilledForHitTesting() )
return dist <= radius + maxdist; // Filled circle hit-test
else
return abs( radius - dist ) <= maxdist; // Ring hit-test
else if( abs( radius - dist ) <= maxdist ) // Ring hit-test
return true;
if( IsHatchedFill() && GetHatching().Collide( aPosition, maxdist ) )
return true;
return false;
}
case SHAPE_T::ARC:
@ -1188,14 +1314,22 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
return poly.Collide( aPosition, maxdist );
}
else // Open rect hit-test
else
{
std::vector<VECTOR2I> pts = GetRectCorners();
return TestSegmentHit( aPosition, pts[0], pts[1], maxdist )
if( TestSegmentHit( aPosition, pts[0], pts[1], maxdist )
|| TestSegmentHit( aPosition, pts[1], pts[2], maxdist )
|| TestSegmentHit( aPosition, pts[2], pts[3], maxdist )
|| TestSegmentHit( aPosition, pts[3], pts[0], maxdist );
|| TestSegmentHit( aPosition, pts[3], pts[0], maxdist ) )
{
return true;
}
if( IsHatchedFill() && GetHatching().Collide( aPosition, maxdist ) )
return true;
return false;
}
case SHAPE_T::POLY:
@ -1215,7 +1349,13 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
}
else
{
return m_poly.CollideEdge( aPosition, nullptr, maxdist );
if( m_poly.CollideEdge( aPosition, nullptr, maxdist ) )
return true;
if( IsHatchedFill() && GetHatching().Collide( aPosition, maxdist ) )
return true;
return false;
}
default:
@ -1262,7 +1402,7 @@ bool EDA_SHAPE::hitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) co
if( !arect.Intersects( bbox ) )
return false;
if( IsFilled() )
if( IsAnyFill() )
{
return ( arect.Intersects( getCenter(), GetStart() )
|| arect.Intersects( getCenter(), GetEnd() )
@ -1424,7 +1564,7 @@ void EDA_SHAPE::computeArcBBox( BOX2I& aBBox ) const
aBBox.SetOrigin( m_start );
aBBox.Merge( m_end );
if( IsFilled() )
if( IsAnyFill() )
aBBox.Merge( m_arcCenter );
int radius = GetRadius();
@ -1495,27 +1635,29 @@ std::vector<SHAPE*> EDA_SHAPE::makeEffectiveShapes( bool aEdgeOnly, bool aLineCh
{
std::vector<VECTOR2I> pts = GetRectCorners();
if( ( IsFilled() || IsProxyItem() ) && !aEdgeOnly )
if( ( IsSolidFill() || IsProxyItem() ) && !aEdgeOnly )
effectiveShapes.emplace_back( new SHAPE_SIMPLE( pts ) );
if( width > 0 || !IsFilled() || aEdgeOnly )
if( width > 0 || !IsSolidFill() || aEdgeOnly )
{
effectiveShapes.emplace_back( new SHAPE_SEGMENT( pts[0], pts[1], width ) );
effectiveShapes.emplace_back( new SHAPE_SEGMENT( pts[1], pts[2], width ) );
effectiveShapes.emplace_back( new SHAPE_SEGMENT( pts[2], pts[3], width ) );
effectiveShapes.emplace_back( new SHAPE_SEGMENT( pts[3], pts[0], width ) );
}
}
break;
}
case SHAPE_T::CIRCLE:
{
if( IsFilled() && !aEdgeOnly )
if( IsSolidFill() && !aEdgeOnly )
effectiveShapes.emplace_back( new SHAPE_CIRCLE( getCenter(), GetRadius() ) );
if( width > 0 || !IsFilled() || aEdgeOnly )
if( width > 0 || !IsSolidFill() || aEdgeOnly )
{
effectiveShapes.emplace_back( new SHAPE_ARC( getCenter(), GetEnd(), ANGLE_360,
width ) );
}
break;
}
@ -1544,10 +1686,10 @@ std::vector<SHAPE*> EDA_SHAPE::makeEffectiveShapes( bool aEdgeOnly, bool aLineCh
{
const SHAPE_LINE_CHAIN& l = GetPolyShape().COutline( ii );
if( IsFilled() && !aEdgeOnly )
if( IsSolidFill() && !aEdgeOnly )
effectiveShapes.emplace_back( new SHAPE_SIMPLE( l ) );
if( width > 0 || !IsFilled() || aEdgeOnly )
if( width > 0 || !IsSolidFill() || aEdgeOnly )
{
int segCount = l.SegmentCount();
@ -1566,6 +1708,12 @@ std::vector<SHAPE*> EDA_SHAPE::makeEffectiveShapes( bool aEdgeOnly, bool aLineCh
break;
}
if( IsHatchedFill() )
{
for( int ii = 0; ii < GetHatching().OutlineCount(); ++ii )
effectiveShapes.emplace_back( new SHAPE_SIMPLE( GetHatching().COutline( ii ) ) );
}
return effectiveShapes;
}
@ -1945,7 +2093,7 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
{
int r = GetRadius();
if( IsFilled() )
if( IsSolidFill() )
TransformCircleToPolygon( aBuffer, getCenter(), r + width / 2, aError, aErrorLoc );
else
TransformRingToPolygon( aBuffer, getCenter(), r, width, aError, aErrorLoc );
@ -1957,7 +2105,7 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
{
std::vector<VECTOR2I> pts = GetRectCorners();
if( IsFilled() || IsProxyItem() )
if( IsSolidFill() || IsProxyItem() )
{
aBuffer.NewOutline();
@ -1965,7 +2113,7 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
aBuffer.Append( pt );
}
if( width > 0 || !IsFilled() )
if( width > 0 || !IsSolidFill() )
{
// Add in segments
TransformOvalToPolygon( aBuffer, pts[0], pts[1], width, aError, aErrorLoc );
@ -1991,7 +2139,7 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
if( !IsPolyShapeValid() )
break;
if( IsFilled() )
if( IsSolidFill() )
{
for( int ii = 0; ii < m_poly.OutlineCount(); ++ii )
{
@ -2049,6 +2197,19 @@ void EDA_SHAPE::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
break;
}
if( IsHatchedFill() )
{
for( int ii = 0; ii < GetHatching().OutlineCount(); ++ii )
aBuffer.AddOutline( GetHatching().COutline( ii ) );
}
}
void EDA_SHAPE::SetWidth( int aWidth )
{
m_stroke.SetWidth( aWidth );
m_hatchingDirty = true;
}
@ -2192,6 +2353,7 @@ double EDA_SHAPE::Similarity( const EDA_SHAPE& aOther ) const
IMPLEMENT_ENUM_TO_WXANY( SHAPE_T )
IMPLEMENT_ENUM_TO_WXANY( LINE_STYLE )
IMPLEMENT_ENUM_TO_WXANY( UI_FILL_MODE )
static struct EDA_SHAPE_DESC
@ -2217,6 +2379,17 @@ static struct EDA_SHAPE_DESC
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
}
ENUM_MAP<UI_FILL_MODE>& hatchModeEnum = ENUM_MAP<UI_FILL_MODE>::Instance();
if( hatchModeEnum.Choices().GetCount() == 0 )
{
hatchModeEnum.Map( UI_FILL_MODE::NONE, _HKI( "None" ) );
hatchModeEnum.Map( UI_FILL_MODE::SOLID, _HKI( "Solid" ) );
hatchModeEnum.Map( UI_FILL_MODE::HATCH, _HKI( "Hatch" ) );
hatchModeEnum.Map( UI_FILL_MODE::REVERSE_HATCH, _HKI( "Reverse Hatch" ) );
hatchModeEnum.Map( UI_FILL_MODE::CROSS_HATCH, _HKI( "Cross-hatch" ) );
}
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
REGISTER_TYPE( EDA_SHAPE );
@ -2361,8 +2534,8 @@ static struct EDA_SHAPE_DESC
return false;
};
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, bool>( _HKI( "Filled" ),
&EDA_SHAPE::SetFilled, &EDA_SHAPE::IsFilled ),
propMgr.AddProperty( new PROPERTY_ENUM<EDA_SHAPE, UI_FILL_MODE>( _HKI( "Fill" ),
&EDA_SHAPE::SetFillModeProp, &EDA_SHAPE::GetFillModeProp ),
shapeProps )
.SetAvailableFunc( fillAvailable );

View File

@ -214,7 +214,7 @@ size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags )
ret = hash_board_item( shape, aFlags );
hash_combine( ret, shape->GetShape() );
hash_combine( ret, shape->GetWidth() );
hash_combine( ret, shape->IsFilled() );
hash_combine( ret, shape->GetFillMode() );
hash_combine( ret, shape->GetLineStyle() );
if( shape->GetShape() == SHAPE_T::ARC || shape->GetShape() == SHAPE_T::CIRCLE )

View File

@ -82,6 +82,7 @@ connect_pads
copperpour
copper_finish
crossbar
cross_hatch
curve_points
curved_edges
custom
@ -288,6 +289,7 @@ rect_delta
reference
remove_unused_layers
render_cache
reverse_hatch
right
rotate
roundrect

View File

@ -605,6 +605,9 @@ void SVG_PLOTTER::PlotPoly( const std::vector<VECTOR2I>& aCornerList, FILL_T aFi
switch( aFill )
{
case FILL_T::NO_FILL:
case FILL_T::HATCH:
case FILL_T::REVERSE_HATCH:
case FILL_T::CROSS_HATCH:
setSVGPlotStyle( aWidth, false, "fill:none" );
break;

View File

@ -201,7 +201,7 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow()
}
else
{
m_filledCtrl->SetValue( m_shape->IsFilled() );
m_fillCtrl->SetSelection( m_shape->GetFillModeProp() );
m_fillColorSwatch->SetSwatchColor( m_shape->GetFillColor(), false );
}
@ -233,12 +233,10 @@ void DIALOG_SHAPE_PROPERTIES::onBorderChecked( wxCommandEvent& event )
}
void DIALOG_SHAPE_PROPERTIES::onFillChecked( wxCommandEvent& aEvent )
void DIALOG_SHAPE_PROPERTIES::onFillChoice( wxCommandEvent& event )
{
bool fill = m_filledCtrl->GetValue();
m_fillColorLabel->Enable( fill );
m_fillColorSwatch->Enable( fill );
m_fillColorLabel->Enable( m_fillCtrl->GetSelection() == UI_FILL_MODE::SOLID );
m_fillColorSwatch->Enable( m_fillCtrl->GetSelection() == UI_FILL_MODE::SOLID );
}
@ -362,11 +360,7 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow()
}
else
{
if( m_filledCtrl->GetValue() )
m_shape->SetFillMode( FILL_T::FILLED_WITH_COLOR );
else
m_shape->SetFillMode( FILL_T::NO_FILL );
m_shape->SetFillModeProp( (UI_FILL_MODE) m_fillCtrl->GetSelection() );
m_shape->SetFillColor( m_fillColorSwatch->GetSwatchColor() );
}

View File

@ -48,7 +48,7 @@ public:
private:
void onBorderChecked( wxCommandEvent& aEvent) override;
void onBorderSwatch( wxCommandEvent& aEvent );
void onFillChecked( wxCommandEvent& aEvent ) override;
void onFillChoice( wxCommandEvent& event ) override;
void onFillRadioButton(wxCommandEvent &aEvent) override;
void onCustomColorSwatch( wxCommandEvent& aEvent );

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -14,7 +14,7 @@
BEGIN_EVENT_TABLE( DIALOG_SHAPE_PROPERTIES_BASE, DIALOG_SHIM )
EVT_CHECKBOX( wxID_ANY, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onBorderChecked )
EVT_CHECKBOX( wxID_ANY, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onFillChecked )
EVT_CHOICE( wxID_ANY, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onFillChoice )
EVT_RADIOBUTTON( NO_FILL, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onFillRadioButton )
EVT_RADIOBUTTON( FILLED_SHAPE, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onFillRadioButton )
EVT_RADIOBUTTON( FILLED_WITH_BG_BODYCOLOR, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onFillRadioButton )
@ -112,15 +112,19 @@ DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wx
m_fillSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_fillSizer->SetEmptyCellSize( wxSize( 36,12 ) );
m_filledCtrl = new wxCheckBox( m_schematicPage, wxID_ANY, _("Filled shape"), wxDefaultPosition, wxDefaultSize, 0 );
m_fillSizer->Add( m_filledCtrl, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 2 );
m_fillLabel = new wxStaticText( m_schematicPage, wxID_ANY, _("Fill:"), wxDefaultPosition, wxDefaultSize, 0 );
m_fillLabel->Wrap( -1 );
m_fillSizer->Add( m_fillLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer81;
bSizer81 = new wxBoxSizer( wxHORIZONTAL );
wxString m_fillCtrlChoices[] = { _("None"), _("Solid"), _("Hatch"), _("Reverse Hatch"), _("Cross-hatch") };
int m_fillCtrlNChoices = sizeof( m_fillCtrlChoices ) / sizeof( wxString );
m_fillCtrl = new wxChoice( m_schematicPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fillCtrlNChoices, m_fillCtrlChoices, 0 );
m_fillCtrl->SetSelection( 0 );
m_fillSizer->Add( m_fillCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_fillColorLabel = new wxStaticText( m_schematicPage, wxID_ANY, _("Fill color:"), wxDefaultPosition, wxDefaultSize, 0 );
m_fillColorLabel->Wrap( -1 );
bSizer81->Add( m_fillColorLabel, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_fillSizer->Add( m_fillColorLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_panelFillColor = new wxPanel( m_schematicPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
wxBoxSizer* bSizer21;
@ -133,10 +137,7 @@ DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wx
m_panelFillColor->SetSizer( bSizer21 );
m_panelFillColor->Layout();
bSizer21->Fit( m_panelFillColor );
bSizer81->Add( m_panelFillColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_fillSizer->Add( bSizer81, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
m_fillSizer->Add( m_panelFillColor, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_helpLabel2 = new wxStaticText( m_schematicPage, wxID_ANY, _("Clear colors to use Schematic Editor colors."), wxDefaultPosition, wxDefaultSize, 0 );
m_helpLabel2->Wrap( -1 );

View File

@ -1,34 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="17"/>
<FileVersion major="1" minor="18"/>
<object class="Project" expanded="true">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="cpp_class_decoration"></property>
<property name="cpp_disconnect_events">1</property>
<property name="cpp_event_generation">table</property>
<property name="cpp_help_provider">none</property>
<property name="cpp_namespace"></property>
<property name="cpp_precompiled_header"></property>
<property name="cpp_use_array_enum">0</property>
<property name="cpp_use_enum">1</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">table</property>
<property name="file">dialog_shape_properties_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="lua_skip_events">1</property>
<property name="lua_ui_table">UI</property>
<property name="name">dialog_shape_properties</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="php_disconnect_events">0</property>
<property name="php_disconnect_mode">source_name</property>
<property name="php_skip_events">1</property>
<property name="python_disconnect_events">0</property>
<property name="python_disconnect_mode">source_name</property>
<property name="python_image_path_wrapper_function_name"></property>
<property name="python_indent_with_spaces"></property>
<property name="python_skip_events">1</property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<property name="use_native_eol">0</property>
<object class="Dialog" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
@ -71,10 +73,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -159,10 +161,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -228,10 +230,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -302,10 +304,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -367,10 +369,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -429,10 +431,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -501,10 +503,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -562,10 +564,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -633,10 +635,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -698,10 +700,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -767,10 +769,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -841,10 +843,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -896,10 +898,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -964,27 +966,26 @@
<property name="permission">protected</property>
<property name="vgap">3</property>
<object class="gbsizeritem" expanded="true">
<property name="border">2</property>
<property name="colspan">2</property>
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxBOTTOM</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">0</property>
<property name="rowspan">1</property>
<object class="wxCheckBox" expanded="true">
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -1000,7 +1001,8 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Filled shape</property>
<property name="label">Fill:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1008,7 +1010,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_filledCtrl</property>
<property name="name">m_fillLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -1022,6 +1024,71 @@
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="gbsizeritem" expanded="true">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="row">0</property>
<property name="rowspan">1</property>
<object class="wxChoice" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;None&quot; &quot;Solid&quot; &quot;Hatch&quot; &quot;Reverse Hatch&quot; &quot;Cross-hatch&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_fillCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
@ -1029,207 +1096,199 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnCheckBox">onFillChecked</event>
<event name="OnChoice">onFillChoice</event>
</object>
</object>
<object class="gbsizeritem" expanded="true">
<property name="border">5</property>
<property name="colspan">2</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxEXPAND</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">1</property>
<property name="rowspan">1</property>
<object class="wxBoxSizer" expanded="true">
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Fill color:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="name">bSizer81</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Fill color:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_fillColorLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxPanel" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_panelFillColor</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxBORDER_SIMPLE|wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="true">
<property name="moveable">1</property>
<property name="name">m_fillColorLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="gbsizeritem" expanded="true">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">1</property>
<property name="rowspan">1</property>
<object class="wxPanel" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_panelFillColor</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxBORDER_SIMPLE|wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizer21</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="CustomControl" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="class">COLOR_SWATCH</property>
<property name="close_button">1</property>
<property name="construction"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="declaration"></property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="include"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="name">bSizer21</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="CustomControl" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="class">COLOR_SWATCH</property>
<property name="close_button">1</property>
<property name="construction"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="declaration"></property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="include"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_fillColorSwatch</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="settings"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">COLOR_SWATCH; widgets/color_swatch.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<property name="moveable">1</property>
<property name="name">m_fillColorSwatch</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="settings"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">COLOR_SWATCH; widgets/color_swatch.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
@ -1247,10 +1306,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1313,10 +1372,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1404,10 +1463,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1473,10 +1532,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1542,10 +1601,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1611,10 +1670,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1680,10 +1739,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1791,10 +1850,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1877,10 +1936,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1942,10 +2001,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -27,6 +27,7 @@ class WX_INFOBAR;
#include <wx/panel.h>
#include <wx/bmpcbox.h>
#include <wx/gbsizer.h>
#include <wx/choice.h>
#include <wx/radiobut.h>
#include <wx/statbox.h>
#include <wx/simplebook.h>
@ -45,7 +46,7 @@ class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
// Private event handlers
void _wxFB_onBorderChecked( wxCommandEvent& event ){ onBorderChecked( event ); }
void _wxFB_onFillChecked( wxCommandEvent& event ){ onFillChecked( event ); }
void _wxFB_onFillChoice( wxCommandEvent& event ){ onFillChoice( event ); }
void _wxFB_onFillRadioButton( wxCommandEvent& event ){ onFillRadioButton( event ); }
@ -55,7 +56,7 @@ class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
NO_FILL = 1000,
FILLED_SHAPE,
FILLED_WITH_BG_BODYCOLOR,
FILLED_WITH_COLOR
FILLED_WITH_COLOR,
};
WX_INFOBAR* m_infoBar;
@ -73,7 +74,8 @@ class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
wxSimplebook* m_fillBook;
wxPanel* m_schematicPage;
wxGridBagSizer* m_fillSizer;
wxCheckBox* m_filledCtrl;
wxStaticText* m_fillLabel;
wxChoice* m_fillCtrl;
wxStaticText* m_fillColorLabel;
wxPanel* m_panelFillColor;
COLOR_SWATCH* m_fillColorSwatch;
@ -94,7 +96,7 @@ class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
// Virtual event handlers, override them in your derived class
virtual void onBorderChecked( wxCommandEvent& event ) { event.Skip(); }
virtual void onFillChecked( wxCommandEvent& event ) { event.Skip(); }
virtual void onFillChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void onFillRadioButton( wxCommandEvent& event ) { event.Skip(); }

View File

@ -196,7 +196,7 @@ bool DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow()
m_fillColorBook->SetSelection( 1 );
if( cell->IsFilled() )
if( cell->IsSolidFill() )
m_fillColorSwatch->SetSwatchColor( cell->GetFillColor(), false );
else
m_fillColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
@ -241,7 +241,7 @@ bool DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow()
m_textColorPopup->SetSelection( 0 );
}
COLOR4D fillColor = cell->IsFilled() ? cell->GetFillColor() : COLOR4D::UNSPECIFIED;
COLOR4D fillColor = cell->IsSolidFill() ? cell->GetFillColor() : COLOR4D::UNSPECIFIED;
if( fillColor != m_fillColorSwatch->GetSwatchColor() )
{

View File

@ -332,11 +332,11 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataToWindow()
m_borderStyleLabel->Enable( textBox->GetWidth() >= 0 );
m_borderStyleCombo->Enable( textBox->GetWidth() >= 0 );
m_filledCtrl->SetValue( textBox->IsFilled() );
m_filledCtrl->SetValue( textBox->IsSolidFill() );
m_fillColorSwatch->SetSwatchColor( textBox->GetFillColor(), false );
m_fillColorLabel->Enable( textBox->IsFilled() );
m_fillColorSwatch->Enable( textBox->IsFilled() );
m_fillColorLabel->Enable( textBox->IsSolidFill() );
m_fillColorSwatch->Enable( textBox->IsSolidFill() );
}
if( m_isSymbolEditor )

View File

@ -114,4 +114,5 @@
//#define SEXPR_SCHEMATIC_FILE_VERSION 20240819 // Embedded Files - Update hash algorithm to Murmur3
//#define SEXPR_SCHEMATIC_FILE_VERSION 20241004 // Use booleans for 'hide' in symbols
//#define SEXPR_SCHEMATIC_FILE_VERSION 20241209 // Private flags for SCH_FIELDs
#define SEXPR_SCHEMATIC_FILE_VERSION 20250114 // Full paths for text variable cross references
//#define SEXPR_SCHEMATIC_FILE_VERSION 20250114 // Full paths for text variable cross references
#define SEXPR_SCHEMATIC_FILE_VERSION 20250222 // Hatched fills for shapes

View File

@ -37,10 +37,13 @@ void formatFill( OUTPUTFORMATTER* aFormatter, FILL_T aFillMode, const COLOR4D& a
switch( aFillMode )
{
default:
case FILL_T::NO_FILL: fillType = "none"; break;
case FILL_T::FILLED_SHAPE: fillType = "outline"; break;
case FILL_T::FILLED_WITH_BG_BODYCOLOR: fillType = "background"; break;
case FILL_T::FILLED_WITH_COLOR: fillType = "color"; break;
case FILL_T::NO_FILL: fillType = "none"; break;
case FILL_T::FILLED_SHAPE: fillType = "outline"; break;
case FILL_T::FILLED_WITH_BG_BODYCOLOR: fillType = "background"; break;
case FILL_T::FILLED_WITH_COLOR: fillType = "color"; break;
case FILL_T::HATCH: fillType = "hatch"; break;
case FILL_T::REVERSE_HATCH: fillType = "reverse_hatch"; break;
case FILL_T::CROSS_HATCH: fillType = "cross_hatch"; break;
}
if( aFillMode == FILL_T::FILLED_WITH_COLOR )

View File

@ -660,11 +660,15 @@ void SCH_IO_KICAD_SEXPR_PARSER::parseFill( FILL_PARAMS& aFill )
switch( token )
{
case T_none: aFill.m_FillType = FILL_T::NO_FILL; break;
case T_outline: aFill.m_FillType = FILL_T::FILLED_SHAPE; break;
case T_background: aFill.m_FillType = FILL_T::FILLED_WITH_BG_BODYCOLOR; break;
case T_color: aFill.m_FillType = FILL_T::FILLED_WITH_COLOR; break;
default: Expecting( "none, outline, color or background" );
case T_none: aFill.m_FillType = FILL_T::NO_FILL; break;
case T_outline: aFill.m_FillType = FILL_T::FILLED_SHAPE; break;
case T_background: aFill.m_FillType = FILL_T::FILLED_WITH_BG_BODYCOLOR; break;
case T_color: aFill.m_FillType = FILL_T::FILLED_WITH_COLOR; break;
case T_hatch: aFill.m_FillType = FILL_T::HATCH; break;
case T_reverse_hatch: aFill.m_FillType = FILL_T::REVERSE_HATCH; break;
case T_cross_hatch: aFill.m_FillType = FILL_T::CROSS_HATCH; break;
default: Expecting( "none, outline, hatch, reverse_hatch, "
"cross_hatch, color or background" );
}
NeedRIGHT();

View File

@ -1503,7 +1503,7 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer, bool aDimmed )
// Consider a NAND gate. We have no idea which side of the arc is "inside"
// so we can't reliably fill.
if( aShape->GetShape() == SHAPE_T::ARC )
m_gal->SetIsFill( aShape->IsFilled() );
m_gal->SetIsFill( aShape->IsSolidFill() );
else
m_gal->SetIsFill( true );
@ -1534,6 +1534,20 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer, bool aDimmed )
// Fill in the foreground layer
break;
case FILL_T::HATCH:
case FILL_T::REVERSE_HATCH:
case FILL_T::CROSS_HATCH:
if( aShape->IsSelected() )
color.a = color.a * 0.8; // selected items already have reduced-alpha backgrounds
else
color.a = color.a * 0.4;
m_gal->SetIsFill( true );
m_gal->SetIsStroke( false );
m_gal->SetFillColor( color );
m_gal->DrawPolygon( aShape->GetHatching() );
break;
case FILL_T::FILLED_WITH_COLOR:
case FILL_T::FILLED_WITH_BG_BODYCOLOR:
// Do not fill the shape in B&W print mode, to avoid to visible items inside the shape
@ -1546,6 +1560,9 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer, bool aDimmed )
drawShape( aShape );
}
break;
default:
wxFAIL_MSG( wxT( "Unsupported fill type" ) );
}
}
else if( aLayer == LAYER_DEVICE || aLayer == LAYER_NOTES || aLayer == LAYER_PRIVATE_NOTES
@ -1919,7 +1936,7 @@ void SCH_PAINTER::draw( const SCH_TEXTBOX* aTextBox, int aLayer, bool aDimmed )
{
// Do not fill the shape in B&W print mode, to avoid to visible items
// inside the shape
if( aTextBox->IsFilled() && !m_schSettings.PrintBlackAndWhiteReq() )
if( aTextBox->IsSolidFill() && !m_schSettings.PrintBlackAndWhiteReq() )
{
m_gal->SetIsFill( true );
m_gal->SetIsStroke( false );

View File

@ -79,10 +79,10 @@ std::vector<SHAPE*> SCH_RULE_AREA::MakeEffectiveShapes( bool aEdgeOnly ) const
{
const SHAPE_LINE_CHAIN& l = GetPolyShape().COutline( ii );
if( IsFilled() && !aEdgeOnly )
if( IsSolidFill() && !aEdgeOnly )
effectiveShapes.emplace_back( new SHAPE_SIMPLE( l ) );
if( width > 0 || !IsFilled() || aEdgeOnly )
if( width > 0 || !IsSolidFill() || aEdgeOnly )
{
int segCount = l.SegmentCount();
@ -95,7 +95,6 @@ std::vector<SHAPE*> SCH_RULE_AREA::MakeEffectiveShapes( bool aEdgeOnly ) const
default:
return SCH_SHAPE::MakeEffectiveShapes( aEdgeOnly );
break;
}
return effectiveShapes;

View File

@ -170,19 +170,34 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS&
if( aBackground )
{
if( !aPlotter->GetColorMode() )
return;
switch( m_fill )
{
case FILL_T::FILLED_SHAPE:
// Fill in the foreground layer
return;
case FILL_T::HATCH:
case FILL_T::REVERSE_HATCH:
case FILL_T::CROSS_HATCH:
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
color = renderSettings->GetLayerColor( m_layer );
color.a = color.a * 0.4;
break;
case FILL_T::FILLED_WITH_COLOR:
// drop fill in B&W mode
if( !aPlotter->GetColorMode() )
return;
color = GetFillColor();
break;
case FILL_T::FILLED_WITH_BG_BODYCOLOR:
// drop fill in B&W mode
if( !aPlotter->GetColorMode() )
return;
color = renderSettings->GetLayerColor( LAYER_DEVICE_BACKGROUND );
break;
@ -219,6 +234,15 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS&
}
aPlotter->SetColor( color );
if( aBackground && IsHatchedFill() )
{
for( int ii = 0; ii < GetHatching().OutlineCount(); ++ii )
aPlotter->PlotPoly( GetHatching().COutline( ii ), FILL_T::FILLED_SHAPE, 0 );
return;
}
aPlotter->SetCurrentLineWidth( pen_size );
aPlotter->SetDash( pen_size, lineStyle );
@ -505,7 +529,7 @@ static struct SCH_SHAPE_DESC
if( shape->GetParentSymbol() )
return shape->GetFillMode() == FILL_T::FILLED_WITH_COLOR;
else
return shape->IsFilled();
return shape->IsSolidFill();
}
return true;
@ -525,7 +549,7 @@ static struct SCH_SHAPE_DESC
void ( SCH_SHAPE::*fillModeSetter )( FILL_T ) = &SCH_SHAPE::SetFillMode;
FILL_T ( SCH_SHAPE::*fillModeGetter )() const = &SCH_SHAPE::GetFillMode;
propMgr.AddProperty( new PROPERTY_ENUM<SCH_SHAPE, FILL_T>( _HKI( "Fill" ),
propMgr.AddProperty( new PROPERTY_ENUM<SCH_SHAPE, FILL_T>( _HKI( "Fill Mode" ),
fillModeSetter, fillModeGetter ),
_HKI( "Shape Properties" ) )
.SetAvailableFunc( isSymbolItem );

View File

@ -66,6 +66,16 @@ public:
return m_stroke.GetLineStyle();
}
int GetHatchLineWidth() const override
{
return GetEffectiveWidth() / 2;
}
int GetHatchLineSpacing() const override
{
return GetHatchLineWidth() * 40;
}
void SetFilled( bool aFilled ) override;
const BOX2I GetBoundingBox() const override;

View File

@ -27,6 +27,7 @@ column_widths
comment
company
convert
cross_hatch
data
date
default
@ -55,6 +56,7 @@ free
generator
generator_version
global_label
hatch
header
hide
hierarchical_label
@ -128,6 +130,7 @@ rectangle
reference
required
rev
reverse_hatch
right
round
rows

View File

@ -1368,6 +1368,8 @@ int EE_POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
poly.Remove( idx );
}
shape->SetHatchingDirty();
setEditedPoint( nullptr );
updateItem( shape, true );

View File

@ -1631,7 +1631,7 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const
}
// Filled shapes win hit tests anywhere inside them
dominating = shape->IsFilled();
dominating = shape->IsFilledForHitTesting();
}
else if( symbol )
{

View File

@ -57,7 +57,20 @@ enum class FILL_T : int
NO_FILL = 1,
FILLED_SHAPE, ///< Fill with object color.
FILLED_WITH_BG_BODYCOLOR, //< Fill with background body color.
FILLED_WITH_COLOR //< Fill with a separate color.
FILLED_WITH_COLOR, //< Fill with a separate color.
HATCH,
REVERSE_HATCH,
CROSS_HATCH
};
enum UI_FILL_MODE
{
NONE = 0,
SOLID,
HATCH,
REVERSE_HATCH,
CROSS_HATCH
};
@ -70,6 +83,7 @@ struct ARC_MID
VECTOR2I center;
};
class EDA_SHAPE : public SERIALIZABLE
{
public:
@ -95,14 +109,28 @@ public:
virtual bool IsProxyItem() const { return m_proxyItem; }
virtual void SetIsProxyItem( bool aIsProxy = true ) { m_proxyItem = aIsProxy; }
bool IsFilled() const
bool IsAnyFill() const
{
return GetFillMode() != FILL_T::NO_FILL;
}
bool IsSolidFill() const
{
return GetFillMode() == FILL_T::FILLED_SHAPE
|| GetFillMode() == FILL_T::FILLED_WITH_COLOR
|| GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR;
}
bool IsHatchedFill() const
{
return GetFillMode() == FILL_T::HATCH
|| GetFillMode() == FILL_T::REVERSE_HATCH
|| GetFillMode() == FILL_T::CROSS_HATCH;
}
virtual bool IsFilledForHitTesting() const
{
return IsFilled();
return IsSolidFill();
}
virtual void SetFilled( bool aFlag )
@ -110,17 +138,25 @@ public:
setFilled( aFlag );
}
void SetFillMode( FILL_T aFill ) { m_fill = aFill; }
void SetFillMode( FILL_T aFill );
FILL_T GetFillMode() const { return m_fill; }
void SetFillModeProp( UI_FILL_MODE );
UI_FILL_MODE GetFillModeProp() const;
void SetHatchingDirty() { m_hatchingDirty = true; }
const SHAPE_POLY_SET& GetHatching() const;
bool IsClosed() const;
COLOR4D GetFillColor() const { return m_fillColor; }
void SetFillColor( const COLOR4D& aColor ) { m_fillColor = aColor; }
void SetWidth( int aWidth ) { m_stroke.SetWidth( aWidth ); }
void SetWidth( int aWidth );
virtual int GetWidth() const { return m_stroke.GetWidth(); }
virtual int GetEffectiveWidth() const { return GetWidth(); }
virtual int GetHatchLineWidth() const { return GetEffectiveWidth(); }
virtual int GetHatchLineSpacing() const { return GetHatchLineWidth() * 10; }
void SetLineStyle( const LINE_STYLE aStyle );
LINE_STYLE GetLineStyle() const;
@ -142,30 +178,35 @@ public:
{
m_start = aStart;
m_endsSwapped = false;
m_hatchingDirty = true;
}
void SetStartY( int y )
{
m_start.y = y;
m_endsSwapped = false;
m_hatchingDirty = true;
}
void SetStartX( int x )
{
m_start.x = x;
m_endsSwapped = false;
m_hatchingDirty = true;
}
void SetCenterY( int y )
{
m_end.y += y - m_start.y;
m_start.y = y;
m_hatchingDirty = true;
}
void SetCenterX( int x )
{
m_end.x += x - m_start.x;
m_start.x = x;
m_hatchingDirty = true;
}
/**
@ -179,23 +220,27 @@ public:
{
m_end = aEnd;
m_endsSwapped = false;
m_hatchingDirty = true;
}
void SetEndY( int aY )
{
m_end.y = aY;
m_endsSwapped = false;
m_hatchingDirty = true;
}
void SetEndX( int aX )
{
m_end.x = aX;
m_endsSwapped = false;
m_hatchingDirty = true;
}
void SetRadius( int aX )
{
m_end = m_start + VECTOR2I( aX, 0 );
m_hatchingDirty = true;
}
virtual VECTOR2I GetTopLeft() const { return GetStart(); }
@ -415,6 +460,8 @@ protected:
void endEdit( bool aClosed = true );
void setEditState( int aState ) { m_editState = aState; }
virtual void updateHatching() const;
/**
* Make a set of #SHAPE objects representing the #EDA_SHAPE.
*
@ -429,36 +476,40 @@ protected:
std::vector<SHAPE*> makeEffectiveShapes( bool aEdgeOnly, bool aLineChainOnly = false ) const;
protected:
bool m_endsSwapped; // true if start/end were swapped e.g. SetArcAngleAndEnd
SHAPE_T m_shape; // Shape: line, Circle, Arc
STROKE_PARAMS m_stroke; // Line style, width, etc.
FILL_T m_fill;
COLOR4D m_fillColor;
bool m_endsSwapped; // true if start/end were swapped e.g. SetArcAngleAndEnd
SHAPE_T m_shape; // Shape: line, Circle, Arc
STROKE_PARAMS m_stroke; // Line style, width, etc.
FILL_T m_fill;
COLOR4D m_fillColor;
long long int m_rectangleHeight;
long long int m_rectangleWidth;
mutable SHAPE_POLY_SET m_hatching;
mutable bool m_hatchingDirty;
double m_segmentLength;
EDA_ANGLE m_segmentAngle;
long long int m_rectangleHeight;
long long int m_rectangleWidth;
VECTOR2I m_start; // Line start point or Circle center
VECTOR2I m_end; // Line end point or Circle 3 o'clock point
double m_segmentLength;
EDA_ANGLE m_segmentAngle;
VECTOR2I m_arcCenter; // Used only for Arcs: arc end point
ARC_MID m_arcMidData; // Used to store originating data
VECTOR2I m_start; // Line start point or Circle center
VECTOR2I m_end; // Line end point or Circle 3 o'clock point
VECTOR2I m_bezierC1; // Bezier Control Point 1
VECTOR2I m_bezierC2; // Bezier Control Point 2
VECTOR2I m_arcCenter; // Used only for Arcs: arc end point
ARC_MID m_arcMidData; // Used to store originating data
std::vector<VECTOR2I> m_bezierPoints;
SHAPE_POLY_SET m_poly; // Stores the S_POLYGON shape
VECTOR2I m_bezierC1; // Bezier Control Point 1
VECTOR2I m_bezierC2; // Bezier Control Point 2
int m_editState;
bool m_proxyItem; // A shape storing proxy information (ie: a pad
// number box, thermal spoke template, etc.)
std::vector<VECTOR2I> m_bezierPoints;
SHAPE_POLY_SET m_poly; // Stores the S_POLYGON shape
int m_editState;
bool m_proxyItem; // A shape storing proxy information (ie: a pad
// number box, thermal spoke template, etc.)
};
#ifndef SWIG
DECLARE_ENUM_TO_WXANY( SHAPE_T );
DECLARE_ENUM_TO_WXANY( LINE_STYLE );
DECLARE_ENUM_TO_WXANY( UI_FILL_MODE );
#endif

View File

@ -180,10 +180,21 @@ class EDA_POLYGON_POINT_EDIT_BEHAVIOR : public POLYGON_POINT_EDIT_BEHAVIOR
public:
// Editing the underlying polygon shape in-place is enough
EDA_POLYGON_POINT_EDIT_BEHAVIOR( EDA_SHAPE& aPolygon ) :
POLYGON_POINT_EDIT_BEHAVIOR( aPolygon.GetPolyShape() )
POLYGON_POINT_EDIT_BEHAVIOR( aPolygon.GetPolyShape() ),
m_shape( aPolygon )
{
wxASSERT( aPolygon.GetShape() == SHAPE_T::POLY );
}
void UpdateItem( const EDIT_POINT& aEditedPoint, EDIT_POINTS& aPoints, COMMIT& aCommit,
std::vector<EDA_ITEM*>& aUpdatedItems ) override
{
POLYGON_POINT_EDIT_BEHAVIOR::UpdateItem( aEditedPoint, aPoints, aCommit, aUpdatedItems );
m_shape.SetHatchingDirty();
}
private:
EDA_SHAPE& m_shape;
};

View File

@ -1433,10 +1433,12 @@ public:
/**
* Build a SHAPE_POLY_SET from a bunch of outlines in provided in random order.
*
* @param aPath set of closed outlines forming the polygon. Positive orientation = outline, negative = hole
* @param aPath set of closed outlines forming the polygon.
* Positive orientation = outline, negative = hole
* @param aEvenOdd forces the even-off fill rule (default is non zero)
*/
void BuildPolysetFromOrientedPaths( const std::vector<SHAPE_LINE_CHAIN>& aPaths, bool aEvenOdd = false );
void BuildPolysetFromOrientedPaths( const std::vector<SHAPE_LINE_CHAIN>& aPaths,
bool aEvenOdd = false );
void TransformToPolygon( SHAPE_POLY_SET& aBuffer, int aError,
ERROR_LOC aErrorLoc ) const override
@ -1444,6 +1446,9 @@ public:
aBuffer.Append( *this );
}
const std::vector<SEG> GenerateHatchLines( const std::vector<double>& aSlopes, int aSpacing,
int aLineLength ) const;
protected:
void cacheTriangulation( bool aPartition, bool aSimplify,
std::vector<std::unique_ptr<TRIANGULATED_POLYGON>>* aHintData );

Some files were not shown because too many files have changed in this diff Show More