Scoop up some more wxPoints

This commit is contained in:
Marek Roszko 2022-01-01 21:06:40 -05:00
parent 589a03afcd
commit 7d671cff1e
29 changed files with 93 additions and 93 deletions

View File

@ -57,7 +57,7 @@ public:
template<class T>
EDA_RECT( const BOX2<T> aBox )
{
m_pos = (wxPoint) aBox.GetPosition();
m_pos = aBox.GetPosition();
m_size.x = aBox.GetWidth();
m_size.y = aBox.GetHeight();
m_init = true;

View File

@ -383,7 +383,7 @@ const VECTOR2I CalcArcCenter( const VECTOR2I& aStart, const VECTOR2I& aEnd, doub
vec = vec.Resize( r );
vec = vec.Rotate( ( 180.0 - aAngle ) * M_PI / 360.0 );
return (wxPoint) ( start + vec );
return (VECTOR2I) ( start + vec );
}

View File

@ -376,10 +376,10 @@ bool CN_ANCHOR::IsDangling() const
{
ZONE* zone = static_cast<ZONE*>( item->Parent() );
if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), (wxPoint) Pos(), accuracy ) )
if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), Pos(), accuracy ) )
connected_count++;
}
else if( item->Parent()->HitTest( (wxPoint) Pos(), accuracy ) )
else if( item->Parent()->HitTest( Pos(), accuracy ) )
{
connected_count++;
}
@ -402,10 +402,10 @@ int CN_ANCHOR::ConnectedItemsCount() const
{
ZONE* zone = static_cast<ZONE*>( item->Parent() );
if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), (wxPoint) Pos() ) )
if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), Pos() ) )
connected_count++;
}
else if( item->Parent()->HitTest( (wxPoint) Pos() ) )
else if( item->Parent()->HitTest( Pos() ) )
{
connected_count++;
}

View File

@ -347,7 +347,7 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
else
segOwners[ std::make_pair( prevPt, pt ) ] = graphic;
prevPt = (wxPoint) pt;
prevPt = pt;
}
polygonComplete = true;
@ -583,7 +583,7 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
else
segOwners[ std::make_pair( prevPt, pt ) ] = graphic;
prevPt = (wxPoint) pt;
prevPt = pt;
}
}
else if( graphic->GetShape() == SHAPE_T::CIRCLE )
@ -809,7 +809,7 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
BOARD_ITEM* b = fetchOwner( *seg2 );
if( a && b )
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) ( *seg1 ).A );
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, ( *seg1 ).A );
}
selfIntersecting = true;
@ -823,7 +823,7 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
BOARD_ITEM* b = fetchOwner( *seg2 );
if( a && b )
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) pt.get() );
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, pt.get() );
}
selfIntersecting = true;

View File

@ -1266,7 +1266,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
const SEG drillSeg = drillShape->GetSeg();
SHAPE_POLY_SET drillOutline;
TransformOvalToPolygon( drillOutline, (wxPoint) drillSeg.A, (wxPoint) drillSeg.B,
TransformOvalToPolygon( drillOutline, drillSeg.A, drillSeg.B,
drillShape->GetWidth(), maxError, ERROR_LOC::ERROR_INSIDE );
drillOutline.BooleanSubtract( padOutline, SHAPE_POLY_SET::POLYGON_MODE::PM_FAST );

View File

@ -162,7 +162,7 @@ bool DRC_TEST_PROVIDER_CONNECTIVITY::Run()
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_UNCONNECTED_ITEMS );
drcItem->SetItems( edge.GetSourceNode()->Parent(), edge.GetTargetNode()->Parent() );
reportViolation( drcItem, (wxPoint) edge.GetSourceNode()->Pos(), UNDEFINED_LAYER );
reportViolation( drcItem, edge.GetSourceNode()->Pos(), UNDEFINED_LAYER );
}
reportRuleStatistics();

View File

@ -291,7 +291,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( PCB_TRACK* track,
drcItem->SetItems( track, other );
drcItem->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drcItem, (wxPoint) intersection.get(), layer );
reportViolation( drcItem, intersection.get(), layer );
return m_drcEngine->GetReportAllTrackErrors();
}
@ -312,7 +312,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( PCB_TRACK* track,
drce->SetItems( track, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, layer );
reportViolation( drce, pos, layer );
if( !m_drcEngine->GetReportAllTrackErrors() )
return false;
@ -360,7 +360,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( PCB_TRACK* track,
drce->SetItems( track, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, layer );
reportViolation( drce, pos, layer );
if( !m_drcEngine->GetReportAllTrackErrors() )
return false;
@ -446,7 +446,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone( BOARD_ITEM* aItem,
drce->SetItems( aItem, aZone );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
}
}
@ -492,7 +492,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone( BOARD_ITEM* aItem,
drce->SetItems( aItem, aZone );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
}
}
}
@ -681,7 +681,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
drce->SetItems( pad, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
testHoles = false; // No need for multiple violations
}
}
@ -713,7 +713,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
drce->SetItems( pad, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
testHoles = false; // No need for multiple violations
}
}
@ -735,7 +735,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
drce->SetItems( pad, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
testHoles = false; // No need for multiple violations
}
}
@ -760,7 +760,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
drce->SetItems( pad, otherVia );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
}
}
@ -931,7 +931,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones()
}
// Iterate through all the segments of refSmoothedPoly
std::map<wxPoint, int> conflictPoints;
std::map<VECTOR2I, int> conflictPoints;
for( auto refIt = smoothed_polys[ia].IterateSegmentsWithHoles(); refIt; refIt++ )
{
@ -943,7 +943,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones()
{
// Build test segment
SEG testSegment = *testIt;
wxPoint pt;
VECTOR2I pt;
int ax1, ay1, ax2, ay2;
ax1 = refSegment.A.x;
@ -971,7 +971,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones()
}
}
for( const std::pair<const wxPoint, int>& conflict : conflictPoints )
for( const std::pair<const VECTOR2I, int>& conflict : conflictPoints )
{
int actual = conflict.second;
std::shared_ptr<DRC_ITEM> drce;

View File

@ -217,7 +217,7 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances()
}
drce->SetItems( fpA, fpB );
reportViolation( drce, (wxPoint) pos, F_CrtYd );
reportViolation( drce, pos, F_CrtYd );
}
}
}
@ -246,7 +246,7 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances()
}
drce->SetItems( fpA, fpB );
reportViolation( drce, (wxPoint) pos, B_CrtYd );
reportViolation( drce, pos, B_CrtYd );
}
}
}

View File

@ -106,7 +106,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge( BOARD_ITEM* item, SHAPE*
drce->SetItems( edge->m_Uuid, item->m_Uuid );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, Edge_Cuts );
reportViolation( drce, pos, Edge_Cuts );
return false; // don't report violations with multiple edges; one is enough
}
}
@ -185,8 +185,8 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run()
SEG seg = poly.CSegment( ii );
edges.emplace_back( static_cast<PCB_SHAPE*>( shape->Clone() ) );
edges.back()->SetShape( SHAPE_T::SEGMENT );
edges.back()->SetStart((wxPoint) seg.A );
edges.back()->SetEnd((wxPoint) seg.B );
edges.back()->SetStart( seg.A );
edges.back()->SetEnd( seg.B );
edges.back()->SetStroke( stroke );
}
}

View File

@ -288,7 +288,7 @@ bool DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole( BOARD_ITEM* aItem, SHA
{
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_DRILLED_HOLES_COLOCATED );
drce->SetItems( aItem, aOther );
reportViolation( drce, (wxPoint) aHole->GetCenter(), UNDEFINED_LAYER );
reportViolation( drce, aHole->GetCenter(), UNDEFINED_LAYER );
}
}
else if( reportHole2Hole )
@ -315,7 +315,7 @@ bool DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole( BOARD_ITEM* aItem, SHA
drce->SetItems( aItem, aOther );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) aHole->GetCenter(), UNDEFINED_LAYER );
reportViolation( drce, aHole->GetCenter(), UNDEFINED_LAYER );
}
}

View File

@ -495,7 +495,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testShapeLineChain( const SHAPE_LIN
drce->SetItems( aParentItem );
drce->SetViolatingRule( aConstraint.GetParentRule() );
reportViolation( drce, (wxPoint) collision.first, aLayer );
reportViolation( drce, collision.first, aLayer );
}
}
@ -542,7 +542,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testZoneLayer( ZONE* aZone, PCB_LAY
drce->SetItems( aZone );
drce->SetViolatingRule( aConstraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
}
}
}
@ -592,7 +592,7 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* it
drce->SetItems( item, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, layer );
reportViolation( drce, pos, layer );
}
}
@ -656,7 +656,7 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* it
drce->SetItems( item, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, layer );
reportViolation( drce, pos, layer );
}
if( otherHoleShape && otherHoleShape->Collide( itemShape, clearance, &actual, &pos ) )
@ -672,7 +672,7 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* it
drce->SetItems( item, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, layer );
reportViolation( drce, pos, layer );
}
}
}
@ -761,7 +761,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstZones( BOARD_ITEM* a
drce->SetItems( aItem, zone );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
}
}
@ -807,7 +807,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstZones( BOARD_ITEM* a
drce->SetItems( aItem, zone );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, aLayer );
reportViolation( drce, pos, aLayer );
}
}
}

View File

@ -114,7 +114,7 @@ void DRC_TEST_PROVIDER_MISC::testOutline()
drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS( " " ) + m_msg );
drcItem->SetItems( m_board );
reportViolation( drcItem, (wxPoint)m_board->GetBoundingBox().Centre(), Edge_Cuts );
reportViolation( drcItem, m_board->GetBoundingBox().Centre(), Edge_Cuts );
}
}
}

View File

@ -233,7 +233,7 @@ bool DRC_TEST_PROVIDER_SILK_CLEARANCE::Run()
drcItem->SetItems( aRefItem->parent, aTestItem->parent );
drcItem->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drcItem, (wxPoint) pos, aLayers.second );
reportViolation( drcItem, pos, aLayers.second );
*aCollisionDetected = true;
}

View File

@ -151,7 +151,7 @@ bool DRC_TEST_PROVIDER_SLIVER_CHECKER::Run()
{
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_COPPER_SLIVER );
drce->SetErrorMessage( drce->GetErrorText() + wxS( " " ) + layerDesc( layer ) );
reportViolation( drce, (wxPoint) pt, layer );
reportViolation( drce, pt, layer );
}
}
}

View File

@ -281,7 +281,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testSilkToMaskClearance()
drce->SetItems( item );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, (wxPoint) pos, layer );
reportViolation( drce, pos, layer );
}
}
@ -391,7 +391,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems( BOARD_ITEM* aItem,
drce->SetItems( aItem, other );
drce->SetViolatingRule( &m_bridgeRule );
reportViolation( drce, (wxPoint) pos, aTargetLayer );
reportViolation( drce, pos, aTargetLayer );
}
return true;
@ -456,7 +456,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones( BOARD_ITEM* aItem,
drce->SetItems( aItem, zone );
drce->SetViolatingRule( &m_bridgeRule );
reportViolation( drce, (wxPoint) pos, aTargetLayer );
reportViolation( drce, pos, aTargetLayer );
}
}
}

View File

@ -226,7 +226,7 @@ void FP_TEXT::SetLocalCoord()
}
else
{
m_Pos0 = (wxPoint)GetTextPos();
m_Pos0 = GetTextPos();
}
}

View File

@ -87,7 +87,7 @@ public:
virtual VECTOR2I GetPosition() const override
{
return (wxPoint)EDA_TEXT::GetTextPos();
return EDA_TEXT::GetTextPos();
}
virtual void SetPosition( const VECTOR2I& aPos ) override

View File

@ -154,7 +154,7 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri
}
// locate the reference point at (0, 0) in the copied items
clone->Move( (wxPoint) -refPoint );
clone->Move( -refPoint );
// Now delete items, duplicated but not added:
for( BOARD_ITEM* skp_item : skipped_items )
@ -251,7 +251,7 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri
prepItem( copy );
// locate the reference point at (0, 0) in the copied items
copy->Move( (wxPoint) -refPoint );
copy->Move( -refPoint );
Format( copy, 1 );

View File

@ -516,7 +516,7 @@ void PCB_BASE_FRAME::PlaceFootprint( FOOTPRINT* aFootprint, bool aRecreateRatsne
s_PickedList.ClearItemsList();
}
aFootprint->SetPosition((wxPoint) GetCanvas()->GetViewControls()->GetCursorPosition() );
aFootprint->SetPosition( GetCanvas()->GetViewControls()->GetCursorPosition() );
aFootprint->ClearFlags();
delete s_FootprintInitialCopy;

View File

@ -2144,9 +2144,9 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
FP_SHAPE* arc = new FP_SHAPE( fp, SHAPE_T::ARC );
arc->SetLayer( layer );
arc->SetArcGeometry( (wxPoint) lsrc->result.GetP0(),
(wxPoint) lsrc->result.GetArcMid(),
(wxPoint) lsrc->result.GetP1() );
arc->SetArcGeometry( lsrc->result.GetP0(),
lsrc->result.GetArcMid(),
lsrc->result.GetP1() );
arc->SetStroke( STROKE_PARAMS( lsrc->width, PLOT_DASH_TYPE::SOLID ) );
arc->SetLocalCoord();
@ -2815,9 +2815,9 @@ bool FABMASTER::loadOutline( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRA
PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC );
arc->SetLayer( layer );
arc->SetArcGeometry( (wxPoint) src->result.GetP0(),
(wxPoint) src->result.GetArcMid(),
(wxPoint) src->result.GetP1() );
arc->SetArcGeometry( src->result.GetP0(),
src->result.GetArcMid(),
src->result.GetP1() );
arc->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) );
if( arc->GetWidth() == 0 )
@ -2944,9 +2944,9 @@ bool FABMASTER::loadGraphics( BOARD* aBoard )
PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC );
arc->SetLayer( layer );
arc->SetArcGeometry( (wxPoint) src->result.GetP0(),
(wxPoint) src->result.GetArcMid(),
(wxPoint) src->result.GetP1() );
arc->SetArcGeometry( src->result.GetP0(),
src->result.GetArcMid(),
src->result.GetP1() );
arc->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) );
aBoard->Add( arc, ADD_MODE::APPEND );

View File

@ -196,7 +196,7 @@ void BOARD_EDITOR_CONTROL::Reset( RESET_REASON aReason )
if( aReason == MODEL_RELOAD || aReason == GAL_SWITCH )
{
m_placeOrigin->SetPosition( (wxPoint)getModel<BOARD>()->GetDesignSettings().GetAuxOrigin() );
m_placeOrigin->SetPosition( getModel<BOARD>()->GetDesignSettings().GetAuxOrigin() );
getView()->Remove( m_placeOrigin.get() );
getView()->Add( m_placeOrigin.get() );
}
@ -1529,7 +1529,7 @@ void BOARD_EDITOR_CONTROL::DoSetDrillOrigin( KIGFX::VIEW* aView, PCB_BASE_FRAME*
EDA_ITEM* originViewItem, const VECTOR2D& aPosition )
{
aFrame->GetDesignSettings().SetAuxOrigin( wxPoint( aPosition ) );
originViewItem->SetPosition( (wxPoint) aPosition );
originViewItem->SetPosition( aPosition );
aView->MarkDirty();
aFrame->OnModify();
}

View File

@ -963,10 +963,10 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent )
guide.SetPreferredLayer( activeLayer );
GENERAL_COLLECTOR collector;
collector.Collect( board, GENERAL_COLLECTOR::PadsOrTracks, (wxPoint) aPosition, guide );
collector.Collect( board, GENERAL_COLLECTOR::PadsOrTracks, aPosition, guide );
if( collector.GetCount() == 0 )
collector.Collect( board, GENERAL_COLLECTOR::Zones, (wxPoint) aPosition, guide );
collector.Collect( board, GENERAL_COLLECTOR::Zones, aPosition, guide );
// Apply the active selection filter, except we want to allow picking locked items for
// highlighting even if the user has disabled them for selection

View File

@ -112,7 +112,7 @@ bool EDIT_TOOL::Init()
DS_PROXY_VIEW_ITEM* ds = frame()->GetCanvas()->GetDrawingSheet();
VECTOR2D cursor = getViewControls()->GetCursorPosition( false );
if( ds && ds->HitTestDrawingSheetItems( getView(), (wxPoint) cursor ) )
if( ds && ds->HitTestDrawingSheetItems( getView(), cursor ) )
return true;
}
@ -387,8 +387,8 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
if( !retval )
{
retval = new PCB_TRACK( theArc->GetParent() );
retval->SetStart( (wxPoint) aAnchor );
retval->SetEnd( (wxPoint) aAnchor );
retval->SetStart( aAnchor );
retval->SetEnd( aAnchor );
retval->SetNet( theArc->GetNet() );
retval->SetLayer( theArc->GetLayer() );
retval->SetWidth( theArc->GetWidth() );
@ -543,19 +543,19 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
VECTOR2I newMid = CalcArcMid( newStart, newEnd, newCenter );
// Update objects
theArc->SetStart( (wxPoint) newStart );
theArc->SetEnd( (wxPoint) newEnd );
theArc->SetMid( (wxPoint) newMid );
theArc->SetStart( newStart );
theArc->SetEnd( newEnd );
theArc->SetMid( newMid );
if( isStartTrackOnStartPt )
trackOnStart->SetStart( (wxPoint) newStart );
trackOnStart->SetStart( newStart );
else
trackOnStart->SetEnd( (wxPoint) newStart );
trackOnStart->SetEnd( newStart );
if( isEndTrackOnStartPt )
trackOnEnd->SetStart( (wxPoint) newEnd );
trackOnEnd->SetStart( newEnd );
else
trackOnEnd->SetEnd( (wxPoint) newEnd );
trackOnEnd->SetEnd( newEnd );
// Update view
getView()->Update( trackOnStart );
@ -1380,7 +1380,7 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
DS_PROXY_VIEW_ITEM* ds = editFrame->GetCanvas()->GetDrawingSheet();
VECTOR2D cursorPos = getViewControls()->GetCursorPosition( false );
if( ds && ds->HitTestDrawingSheetItems( getView(), (wxPoint) cursorPos ) )
if( ds && ds->HitTestDrawingSheetItems( getView(), cursorPos ) )
m_toolMgr->RunAction( ACTIONS::pageSettings );
else
m_toolMgr->RunAction( PCB_ACTIONS::footprintProperties, true );
@ -2030,7 +2030,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent )
item->Rotate( selCenter, rotation );
break;
case ROTATE_AROUND_USER_ORIGIN:
item->Rotate( (wxPoint) frame()->GetScreen()->m_LocalOrigin, rotation );
item->Rotate( frame()->GetScreen()->m_LocalOrigin, rotation );
break;
case ROTATE_AROUND_AUX_ORIGIN:
item->Rotate( board()->GetDesignSettings().GetAuxOrigin(), rotation );

View File

@ -309,9 +309,9 @@ bool ZONE::IsOnLayer( PCB_LAYER_ID aLayer ) const
const EDA_RECT ZONE::GetBoundingBox() const
{
auto bb = m_Poly->BBox();
BOX2I bb = m_Poly->BBox();
EDA_RECT ret( (wxPoint) bb.GetOrigin(), wxSize( bb.GetWidth(), bb.GetHeight() ) );
EDA_RECT ret( bb.GetOrigin(), VECTOR2I( bb.GetWidth(), bb.GetHeight() ) );
return ret;
}

View File

@ -267,8 +267,8 @@ BOOST_AUTO_TEST_CASE( GridGeometry )
grid_opts.m_nx = c.m_geom.m_nx;
grid_opts.m_ny = c.m_geom.m_ny;
grid_opts.m_delta = (wxPoint) c.m_geom.m_delta;
grid_opts.m_offset = (wxPoint) c.m_geom.m_offset;
grid_opts.m_delta = c.m_geom.m_delta;
grid_opts.m_offset = c.m_geom.m_offset;
grid_opts.m_stagger = c.m_geom.m_stagger;
grid_opts.m_stagger_rows = c.m_geom.m_stagger_by_row;
grid_opts.m_reverseNumberingAlternate = c.m_geom.m_alternate_numbers;

View File

@ -213,18 +213,18 @@ BOOST_AUTO_TEST_CASE( Rotate )
if( schItem != nullptr )
{
// Only rotating pins around the center of parent sheet works.
schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
}
if( libItem != nullptr )
{
libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() );
}
CompareItems( newItem.get(), item.get() );

View File

@ -206,7 +206,7 @@ std::unique_ptr<FOOTPRINT> MakeInvalidCourtyardTestFP( BOARD& aBoard,
// As of 2019-01-17, this has to go after adding the courtyards,
// or all the poly sets are empty when DRC'd
footprint->SetPosition( (wxPoint) aFPDef.m_pos );
footprint->SetPosition( aFPDef.m_pos );
return footprint;
}

View File

@ -117,7 +117,7 @@ std::unique_ptr<FOOTPRINT> MakeCourtyardTestFP( BOARD& aBoard, const COURTYARD_T
footprint->SetReference( aFPDef.m_refdes );
// This has to go after adding the courtyards, or all the poly sets are empty when DRC'd
footprint->SetPosition( (wxPoint) aFPDef.m_pos );
footprint->SetPosition( aFPDef.m_pos );
return footprint;
}

View File

@ -36,8 +36,8 @@ void DrawSegment( FOOTPRINT& aFootprint, const SEG& aSeg, int aWidth, PCB_LAYER_
{
std::unique_ptr<FP_SHAPE> seg = std::make_unique<FP_SHAPE>( &aFootprint, SHAPE_T::SEGMENT );
seg->SetStart0( (wxPoint) aSeg.A );
seg->SetEnd0( (wxPoint) aSeg.B );
seg->SetStart0( aSeg.A );
seg->SetEnd0( aSeg.B );
seg->SetStroke( STROKE_PARAMS( aWidth, PLOT_DASH_TYPE::SOLID ) );
seg->SetLayer( aLayer );
@ -61,8 +61,8 @@ void DrawArc( FOOTPRINT& aFootprint, const VECTOR2I& aCentre, const VECTOR2I& aS
{
std::unique_ptr<FP_SHAPE> arc = std::make_unique<FP_SHAPE>( &aFootprint, SHAPE_T::ARC );
arc->SetCenter0( (wxPoint) aCentre );
arc->SetStart0( (wxPoint) aStart );
arc->SetCenter0( aCentre );
arc->SetStart0( aStart );
arc->SetArcAngleAndEnd0( aAngle * 10 );
arc->SetStroke( STROKE_PARAMS( aWidth, PLOT_DASH_TYPE::SOLID ) );