From 12d21e34e24d608f4242db58c8cf15e9f649c63e Mon Sep 17 00:00:00 2001 From: Marek Roszko <mark.roszko@gmail.com> Date: Tue, 13 Oct 2020 23:37:48 -0400 Subject: [PATCH] Remove trigo.h from eda_text.h --- common/page_layout/ws_data_item.cpp | 1 + common/page_layout/ws_draw_item.cpp | 6 ++++++ common/plotters/DXF_plotter.cpp | 1 + common/plotters/GERBER_plotter.cpp | 1 + common/plotters/HPGL_plotter.cpp | 1 + common/plotters/PS_plotter.cpp | 1 + common/plotters/SVG_plotter.cpp | 1 + common/preview_items/arc_assistant.cpp | 1 + common/preview_items/ruler_item.cpp | 1 + eeschema/bus-wire-junction.cpp | 1 + eeschema/lib_pin.cpp | 1 + eeschema/sch_bitmap.cpp | 1 + eeschema/sch_bus_entry.cpp | 1 + eeschema/sch_component.cpp | 1 + eeschema/sch_field.cpp | 1 + eeschema/sch_line.cpp | 1 + eeschema/sch_no_connect.cpp | 1 + eeschema/sch_text.cpp | 1 + eeschema/tools/ee_selection_tool.cpp | 1 + gerbview/gerbview_frame.cpp | 1 + gerbview/gerbview_painter.cpp | 1 + include/eda_text.h | 1 - include/page_layout/ws_draw_item.h | 5 +---- pcbnew/class_dimension.cpp | 1 + pcbnew/class_marker_pcb.cpp | 1 + pcbnew/class_pcb_target.cpp | 1 + pcbnew/class_zone.cpp | 1 + pcbnew/dialogs/dialog_copper_zones.cpp | 1 + pcbnew/dialogs/dialog_move_exact.cpp | 1 + pcbnew/dialogs/dialog_position_relative.cpp | 1 + pcbnew/exporters/gendrill_Excellon_writer.cpp | 1 + pcbnew/fp_text.cpp | 1 + pcbnew/microwave/microwave_footprint.cpp | 1 + pcbnew/pcb_text.cpp | 1 + pcbnew/plugins/pcad/pcad2kicad_common.cpp | 1 + pcbnew/text_mod_grid_table.cpp | 1 + 36 files changed, 40 insertions(+), 5 deletions(-) diff --git a/common/page_layout/ws_data_item.cpp b/common/page_layout/ws_data_item.cpp index fa08f8a83b..475f74405f 100644 --- a/common/page_layout/ws_data_item.cpp +++ b/common/page_layout/ws_data_item.cpp @@ -58,6 +58,7 @@ #include <page_layout/ws_data_item.h> #include <page_layout/ws_draw_item.h> #include <page_layout/ws_painter.h> +#include <trigo.h> using KIGFX::COLOR4D; diff --git a/common/page_layout/ws_draw_item.cpp b/common/page_layout/ws_draw_item.cpp index ee00376194..588341816d 100644 --- a/common/page_layout/ws_draw_item.cpp +++ b/common/page_layout/ws_draw_item.cpp @@ -57,6 +57,7 @@ #include <page_info.h> #include <layers_id_colors_and_visibility.h> #include <gr_basic.h> +#include <trigo.h> // ============================ BASE CLASS ============================== @@ -187,6 +188,11 @@ wxString WS_DRAW_ITEM_TEXT::GetSelectMenuText( EDA_UNITS aUnits ) const } +void WS_DRAW_ITEM_TEXT::SetTextAngle( double aAngle ) +{ + EDA_TEXT::SetTextAngle( NormalizeAngle360Min( aAngle ) ); +} + // ============================ POLYGON ================================= void WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) diff --git a/common/plotters/DXF_plotter.cpp b/common/plotters/DXF_plotter.cpp index 7d428eadd9..770d980d70 100644 --- a/common/plotters/DXF_plotter.cpp +++ b/common/plotters/DXF_plotter.cpp @@ -33,6 +33,7 @@ #include <macros.h> #include <kicad_string.h> #include <convert_basic_shapes_to_polygon.h> +#include <trigo.h> /** * Oblique angle for DXF native text diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index df00216b97..43aba07eb3 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -29,6 +29,7 @@ #include <kicad_string.h> #include <convert_basic_shapes_to_polygon.h> #include <math/util.h> // for KiROUND +#include <trigo.h> #include <build_version.h> diff --git a/common/plotters/HPGL_plotter.cpp b/common/plotters/HPGL_plotter.cpp index 3be058a26d..df18936030 100644 --- a/common/plotters/HPGL_plotter.cpp +++ b/common/plotters/HPGL_plotter.cpp @@ -200,6 +200,7 @@ #include <kicad_string.h> #include <convert_basic_shapes_to_polygon.h> #include <math/util.h> // for KiROUND +#include <trigo.h> #include "plotter_hpgl.h" diff --git a/common/plotters/PS_plotter.cpp b/common/plotters/PS_plotter.cpp index 3d8f3c7bb3..33a27c9b6d 100644 --- a/common/plotters/PS_plotter.cpp +++ b/common/plotters/PS_plotter.cpp @@ -32,6 +32,7 @@ #include <eda_item.h> #include <convert_basic_shapes_to_polygon.h> #include <math/util.h> // for KiROUND +#include <trigo.h> #include "plotters_pslike.h" diff --git a/common/plotters/SVG_plotter.cpp b/common/plotters/SVG_plotter.cpp index 3f81c32572..06658c7df8 100644 --- a/common/plotters/SVG_plotter.cpp +++ b/common/plotters/SVG_plotter.cpp @@ -98,6 +98,7 @@ #include <eda_item.h> #include <common.h> #include <kicad_string.h> +#include <trigo.h> #include <cstdint> #include <wx/mstream.h> diff --git a/common/preview_items/arc_assistant.cpp b/common/preview_items/arc_assistant.cpp index 148c7edfb5..be3d77916c 100644 --- a/common/preview_items/arc_assistant.cpp +++ b/common/preview_items/arc_assistant.cpp @@ -31,6 +31,7 @@ #include <common.h> #include <base_units.h> +#include <trigo.h> using namespace KIGFX::PREVIEW; diff --git a/common/preview_items/ruler_item.cpp b/common/preview_items/ruler_item.cpp index be0ca85239..0302ecc030 100644 --- a/common/preview_items/ruler_item.cpp +++ b/common/preview_items/ruler_item.cpp @@ -28,6 +28,7 @@ #include <layers_id_colors_and_visibility.h> #include <painter.h> #include <view/view.h> +#include <trigo.h> #include <common.h> diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 7c3e89c121..ca7c13d87a 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -38,6 +38,7 @@ #include <tool/tool_manager.h> #include <tools/ee_actions.h> #include <tools/ee_selection_tool.h> +#include <trigo.h> std::vector<wxPoint> SCH_EDIT_FRAME::GetSchematicConnections() diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 2ea25c7dd2..d2b9c8779d 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -34,6 +34,7 @@ #include <lib_pin.h> #include <settings/settings_manager.h> #include <libedit/libedit_settings.h> +#include <trigo.h> #include "sch_painter.h" // small margin in internal units between the pin text and the pin line diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp index 20fef2e93c..2ad4fc9954 100644 --- a/eeschema/sch_bitmap.cpp +++ b/eeschema/sch_bitmap.cpp @@ -33,6 +33,7 @@ #include <base_units.h> #include <eda_draw_frame.h> #include <sch_bitmap.h> +#include <trigo.h> #include <wx/mstream.h> diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index 2672c0dbf0..2d1992d960 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -31,6 +31,7 @@ #include <sch_text.h> #include <settings/color_settings.h> #include <netclass.h> +#include <trigo.h> #include "sch_painter.h" diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 8cb64150b6..cba18224d6 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -32,6 +32,7 @@ #include <sch_sheet_path.h> #include <schematic.h> #include <trace_helpers.h> +#include <trigo.h> /** diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 5a6f35d79d..bd33ffc60a 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -44,6 +44,7 @@ #include <settings/color_settings.h> #include <kicad_string.h> #include <trace_helpers.h> +#include <trigo.h> SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_ITEM* aParent, diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index dd18461e3f..22ba73f24a 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp @@ -30,6 +30,7 @@ #include <schematic.h> #include <project/project_file.h> #include <project/net_settings.h> +#include <trigo.h> SCH_LINE::SCH_LINE( const wxPoint& pos, int layer ) : diff --git a/eeschema/sch_no_connect.cpp b/eeschema/sch_no_connect.cpp index a8b5a070dc..3b64792613 100644 --- a/eeschema/sch_no_connect.cpp +++ b/eeschema/sch_no_connect.cpp @@ -34,6 +34,7 @@ #include <sch_no_connect.h> #include <settings/color_settings.h> #include <default_values.h> // For some default values +#include <trigo.h> SCH_NO_CONNECT::SCH_NO_CONNECT( const wxPoint& pos ) : diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 9634838341..0302f83c23 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -45,6 +45,7 @@ #include <project/net_settings.h> #include <sch_iref.h> #include <dialog_helpers.h> +#include <trigo.h> using KIGFX::SCH_RENDER_SETTINGS; diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 8f8260861f..6097aa9e89 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -49,6 +49,7 @@ #include <tool/tool_manager.h> #include <tools/ee_grid_helper.h> #include <tools/sch_line_wire_bus_tool.h> +#include <trigo.h> #include <view/view.h> #include <view/view_controls.h> #include <view/view_group.h> diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 79dc0d6e79..7ef0b22fa2 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -51,6 +51,7 @@ #include <tools/gerbview_selection.h> #include <tools/gerbview_selection_tool.h> #include <tools/gerbview_control.h> +#include <trigo.h> #include <view/view.h> #include <base_screen.h> #include <gerbview_painter.h> diff --git a/gerbview/gerbview_painter.cpp b/gerbview/gerbview_painter.cpp index f580bb95e3..d632cdb64a 100644 --- a/gerbview/gerbview_painter.cpp +++ b/gerbview/gerbview_painter.cpp @@ -24,6 +24,7 @@ #include <convert_basic_shapes_to_polygon.h> #include <convert_to_biu.h> #include <gerbview.h> +#include <trigo.h> #include <dcode.h> #include <gerber_draw_item.h> diff --git a/include/eda_text.h b/include/eda_text.h index a22b6eca1d..54ac0781d1 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -25,7 +25,6 @@ #ifndef EDA_TEXT_H_ #define EDA_TEXT_H_ -#include <trigo.h> // NORMALIZE_ANGLE_POS( angle ); #include <common.h> // wxStringSplit #include <eda_rect.h> #include "kicad_string.h" diff --git a/include/page_layout/ws_draw_item.h b/include/page_layout/ws_draw_item.h index 11b0c9d1ce..64e5d76d2a 100644 --- a/include/page_layout/ws_draw_item.h +++ b/include/page_layout/ws_draw_item.h @@ -295,10 +295,7 @@ public: void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override; - void SetTextAngle( double aAngle ) override - { - EDA_TEXT::SetTextAngle( NormalizeAngle360Min( aAngle ) ); - } + void SetTextAngle( double aAngle ) override; wxPoint GetPosition() const override { return GetTextPos(); } void SetPosition( const wxPoint& aPos ) override { SetTextPos( aPos ); } diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index fe4302977a..5ef9c17a61 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -35,6 +35,7 @@ #include <geometry/shape_segment.h> #include <settings/color_settings.h> #include <settings/settings_manager.h> +#include <trigo.h> DIMENSION::DIMENSION( BOARD_ITEM* aParent, KICAD_T aType ) : diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp index 9bc4b31bb7..423f6fe928 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/class_marker_pcb.cpp @@ -34,6 +34,7 @@ #include <widgets/ui_common.h> #include <pgm_base.h> #include <drc/drc_item.h> +#include <trigo.h> /// Factor to convert the maker unit shape to internal units: diff --git a/pcbnew/class_pcb_target.cpp b/pcbnew/class_pcb_target.cpp index 9f8cea1a0f..a44b6ca880 100644 --- a/pcbnew/class_pcb_target.cpp +++ b/pcbnew/class_pcb_target.cpp @@ -36,6 +36,7 @@ #include <base_units.h> #include <settings/color_settings.h> #include <settings/settings_manager.h> +#include <trigo.h> PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent ) : diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 7aa95a4c34..541f561d97 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -35,6 +35,7 @@ #include <math_for_graphics.h> #include <settings/color_settings.h> #include <settings/settings_manager.h> +#include <trigo.h> ZONE_CONTAINER::ZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent, bool aInModule ) : BOARD_CONNECTED_ITEM( aParent, aInModule ? PCB_FP_ZONE_AREA_T : PCB_ZONE_AREA_T ), diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index c5cdcad131..c114e8aa6c 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -32,6 +32,7 @@ #include <widgets/unit_binder.h> #include <class_zone.h> #include <class_board.h> +#include <trigo.h> #include <dialog_copper_zones_base.h> diff --git a/pcbnew/dialogs/dialog_move_exact.cpp b/pcbnew/dialogs/dialog_move_exact.cpp index 90999716eb..d336e19b73 100644 --- a/pcbnew/dialogs/dialog_move_exact.cpp +++ b/pcbnew/dialogs/dialog_move_exact.cpp @@ -26,6 +26,7 @@ #include <math/util.h> // for KiROUND #include <widgets/tab_traversal.h> #include <pcb_edit_frame.h> +#include <trigo.h> // initialise statics DIALOG_MOVE_EXACT::MOVE_EXACT_OPTIONS DIALOG_MOVE_EXACT::m_options; diff --git a/pcbnew/dialogs/dialog_position_relative.cpp b/pcbnew/dialogs/dialog_position_relative.cpp index bb239ece72..73b994bce3 100644 --- a/pcbnew/dialogs/dialog_position_relative.cpp +++ b/pcbnew/dialogs/dialog_position_relative.cpp @@ -26,6 +26,7 @@ #include <tools/pcb_actions.h> #include <widgets/tab_traversal.h> #include <pcb_edit_frame.h> +#include <trigo.h> // initialise statics DIALOG_POSITION_RELATIVE::POSITION_RELATIVE_OPTIONS DIALOG_POSITION_RELATIVE::m_options; diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index 5d4cc2b93a..79260fb893 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -41,6 +41,7 @@ #include <pgm_base.h> #include <build_version.h> #include <math/util.h> // for KiROUND +#include <trigo.h> #include <pcbplot.h> #include <class_board.h> diff --git a/pcbnew/fp_text.cpp b/pcbnew/fp_text.cpp index 16b8b97733..269e400153 100644 --- a/pcbnew/fp_text.cpp +++ b/pcbnew/fp_text.cpp @@ -29,6 +29,7 @@ #include <class_board.h> #include <class_module.h> #include <settings/settings_manager.h> +#include <trigo.h> FP_TEXT::FP_TEXT( MODULE* parent, TEXT_TYPE text_type ) : BOARD_ITEM( parent, PCB_FP_TEXT_T ), diff --git a/pcbnew/microwave/microwave_footprint.cpp b/pcbnew/microwave/microwave_footprint.cpp index 653ed91252..b2c1c1d6e9 100644 --- a/pcbnew/microwave/microwave_footprint.cpp +++ b/pcbnew/microwave/microwave_footprint.cpp @@ -26,6 +26,7 @@ #include <confirm.h> #include <dialog_text_entry.h> #include <microwave/microwave_tool.h> +#include <trigo.h> MODULE* MICROWAVE_TOOL::createFootprint( MICROWAVE_FOOTPRINT_SHAPE aFootprintShape ) diff --git a/pcbnew/pcb_text.cpp b/pcbnew/pcb_text.cpp index 7d8689f030..252f3a5d22 100644 --- a/pcbnew/pcb_text.cpp +++ b/pcbnew/pcb_text.cpp @@ -30,6 +30,7 @@ #include <class_board.h> #include <pcb_text.h> #include <pcb_painter.h> +#include <trigo.h> using KIGFX::PCB_RENDER_SETTINGS; diff --git a/pcbnew/plugins/pcad/pcad2kicad_common.cpp b/pcbnew/plugins/pcad/pcad2kicad_common.cpp index d123d1daf3..10f21448c1 100644 --- a/pcbnew/plugins/pcad/pcad2kicad_common.cpp +++ b/pcbnew/plugins/pcad/pcad2kicad_common.cpp @@ -33,6 +33,7 @@ #include <common.h> #include <convert_to_biu.h> #include <math/util.h> // for KiROUND +#include <trigo.h> #include <pcad2kicad_common.h> diff --git a/pcbnew/text_mod_grid_table.cpp b/pcbnew/text_mod_grid_table.cpp index 2206738c12..ee9b8d2f81 100644 --- a/pcbnew/text_mod_grid_table.cpp +++ b/pcbnew/text_mod_grid_table.cpp @@ -26,6 +26,7 @@ #include <text_mod_grid_table.h> #include <widgets/grid_icon_text_helpers.h> #include <widgets/grid_combobox.h> +#include <trigo.h> #include "grid_layer_box_helpers.h" enum