From 733978dfd0f20b50e69312100af3f151806c48df Mon Sep 17 00:00:00 2001 From: qu1ck Date: Sat, 18 Feb 2023 10:31:08 -0800 Subject: [PATCH] Fix swig mappings for PCB_BITMAP --- pcbnew/python/swig/board.i | 1 + pcbnew/python/swig/board_item.i | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/pcbnew/python/swig/board.i b/pcbnew/python/swig/board.i index 01ed5f7b9a..7ef1f70a0f 100644 --- a/pcbnew/python/swig/board.i +++ b/pcbnew/python/swig/board.i @@ -64,6 +64,7 @@ HANDLE_EXCEPTIONS(BOARD::TracksInNetBetweenPoints) %include netclass.i %include pcb_plot_params.i %include pcb_group.i +%include pcb_bitmap.i // std::vector templates %template(VIA_DIMENSION_Vector) std::vector; diff --git a/pcbnew/python/swig/board_item.i b/pcbnew/python/swig/board_item.i index dde2613222..30d932cc64 100644 --- a/pcbnew/python/swig/board_item.i +++ b/pcbnew/python/swig/board_item.i @@ -68,6 +68,7 @@ class PCB_ARC; class ZONE; class FP_ZONE; class PCB_TARGET; +class PCB_BITMAP; // Anything targeted to the %wrapper section is extern "C" whereas code targeted // to %header section is C++. @@ -97,6 +98,7 @@ static PCB_ARC* Cast_to_PCB_ARC( BOARD_ITEM* ); static ZONE* Cast_to_ZONE( BOARD_ITEM* ); static FP_ZONE* Cast_to_FP_ZONE( BOARD_ITEM* ); static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* ); +static PCB_BITMAP* Cast_to_PCB_BITMAP( BOARD_ITEM* ); #ifdef __cplusplus } // extern "C" @@ -126,6 +128,7 @@ static PCB_ARC* Cast_to_PCB_ARC( BOARD_ITEM* ); static ZONE* Cast_to_ZONE( BOARD_ITEM* ); static FP_ZONE* Cast_to_FP_ZONE( BOARD_ITEM* ); static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* ); +static PCB_BITMAP* Cast_to_PCB_BITMAP( BOARD_ITEM* ); %extend BOARD_ITEM @@ -174,6 +177,8 @@ static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* ); return Cast_to_PCB_ARC(self) elif ct=="PCB_TARGET": return Cast_to_PCB_TARGET(self) + elif ct=="PCB_BITMAP": + return Cast_to_PCB_BITMAP(self) elif ct=="ZONE": return Cast_to_ZONE(self) else: @@ -226,4 +231,5 @@ static PCB_ARC* Cast_to_PCB_ARC( BOARD_ITEM* self ) { static ZONE* Cast_to_ZONE( BOARD_ITEM* self ) { return dynamic_cast(self); } static FP_ZONE* Cast_to_FP_ZONE( BOARD_ITEM* self ) { return dynamic_cast(self); } static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* self ) { return dynamic_cast(self); } +static PCB_BITMAP* Cast_to_PCB_BITMAP( BOARD_ITEM* self ) { return dynamic_cast(self); } %}