|
KiCad PCB EDA Suite
|
#include "drawing_tool.h"#include "geometry/shape_rect.h"#include "dialog_table_properties.h"#include <set>#include <pgm_base.h>#include <settings/settings_manager.h>#include <pcbnew_settings.h>#include <footprint_editor_settings.h>#include <dialogs/dialog_barcode_properties.h>#include <dialogs/dialog_text_properties.h>#include <dialogs/dialog_track_via_size.h>#include <gal/graphics_abstraction_layer.h>#include <geometry/geometry_utils.h>#include <geometry/shape_segment.h>#include <import_gfx/dialog_import_graphics.h>#include <preview_items/arc_assistant.h>#include <preview_items/bezier_assistant.h>#include <preview_items/two_point_assistant.h>#include <preview_items/two_point_geom_manager.h>#include <ratsnest/ratsnest_data.h>#include <router/router_tool.h>#include <status_popup.h>#include <tool/tool_manager.h>#include <tools/pcb_actions.h>#include <tools/pcb_grid_helper.h>#include <kiplatform/ui.h>#include <tools/pcb_selection_tool.h>#include <pcb_barcode.h>#include <tools/tool_event_utils.h>#include <tool/arc_draw_behavior.h>#include <tool/bezier_draw_behavior.h>#include <tool/ellipse_draw_behavior.h>#include <tools/zone_create_helper.h>#include <tools/zone_filler_tool.h>#include <view/view.h>#include <widgets/appearance_controls.h>#include <widgets/wx_infobar.h>#include <wildcards_and_files_ext.h>#include <wx/filedlg.h>#include <wx/msgdlg.h>#include <bitmaps.h>#include <board.h>#include <board_commit.h>#include <board_design_settings.h>#include <drc/drc_engine.h>#include <drc/drc_rule.h>#include <confirm.h>#include <footprint.h>#include <macros.h>#include <gal/painter.h>#include <pad.h>#include <pcb_edit_frame.h>#include <pcb_group.h>#include <pcb_point.h>#include <pcb_reference_image.h>#include <pcb_text.h>#include <pcb_textbox.h>#include <pcb_table.h>#include <pcb_tablecell.h>#include <pcb_track.h>#include <pcb_dimension.h>#include <constraints/board_constraint_adapter.h>#include <constraints/constraint_builder.h>#include <constraints/pcb_constraint.h>#include <pcbnew_id.h>#include <scoped_set_reset.h>#include <string_utils.h>#include <zone.h>#include <fix_board_shape.h>#include <view/view_controls.h>Go to the source code of this file.
Classes | |
| class | VIA_SIZE_MENU |
| struct | POINT_PLACER |
Typedefs | |
| using | SCOPED_DRAW_MODE = SCOPED_SET_RESET<DRAWING_TOOL::MODE> |
Functions | |
| static void | bindDimensionEndpoints (BOARD *aBoard, PCB_DIMENSION_BASE *aDimension, BOARD_ITEM *aParent, BOARD_COMMIT &aCommit) |
| static std::vector< PCB_CONSTRAINT * > | stageAutoConstraints (BOARD *aBoard, PCB_SHAPE *aShape, BOARD_ITEM *aParent, BOARD_COMMIT &aCommit, bool aAxisConstraint) |
| static void | snapAutoConstraints (PCB_BASE_EDIT_FRAME *aFrame, BOARD *aBoard, const std::vector< PCB_CONSTRAINT * > &aConstraints) |
| static VECTOR2I | evalEllipsePoint (const PCB_SHAPE *aGraphic, const VECTOR2I &aCursorPos) |
| static void | updateSegmentFromGeometryMgr (const KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER &aMgr, PCB_SHAPE *aGraphic) |
Definition at line 98 of file drawing_tool.cpp.
|
static |
Definition at line 103 of file drawing_tool.cpp.
References COMMIT::Add(), CENTER, COINCIDENT, ConstraintIsDuplicateOnBoard(), END, end, PCB_DIMENSION_BASE::GetEnd(), PCB_DIMENSION_BASE::GetStart(), EDA_ITEM::m_Uuid, PCB_DIM_ALIGNED_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, pcbIUScale, POINT_ON_LINE, SelectEndpointBindings(), SelectRadialDimensionTarget(), START, EDA_ITEM::Type(), and WHOLE.
Referenced by DRAWING_TOOL::DrawDimension().
Definition at line 2534 of file drawing_tool.cpp.
References center, EDA_ANGLE::Cos(), EDA_SHAPE::GetEllipseCenter(), EDA_SHAPE::GetEllipseMajorRadius(), EDA_SHAPE::GetEllipseMinorRadius(), EDA_SHAPE::GetEllipseRotation(), KiROUND(), RADIANS_T, EDA_ANGLE::Sin(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DRAWING_TOOL::drawShape().
|
static |
Definition at line 191 of file drawing_tool.cpp.
References _, APPEND_UNDO, ApplyConstraintImmediately(), COMMIT::Empty(), COMMIT::Modify(), and BOARD_COMMIT::Push().
Referenced by DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawBezier(), DRAWING_TOOL::DrawEllipseArc(), DRAWING_TOOL::DrawLine(), DRAWING_TOOL::drawShape(), and DRAWING_TOOL::runSimpleShapeDraw().
|
static |
Definition at line 171 of file drawing_tool.cpp.
References COMMIT::Add(), and SelectShapeAutoConstraints().
Referenced by DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawBezier(), DRAWING_TOOL::DrawEllipseArc(), DRAWING_TOOL::DrawLine(), DRAWING_TOOL::drawShape(), and DRAWING_TOOL::runSimpleShapeDraw().
|
static |
Definition at line 2556 of file drawing_tool.cpp.
References std::abs(), ANGLE_0, ANGLE_360, ANGLE_90, center, ELLIPSE, ELLIPSE_ARC, end, KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::GetEnd(), KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::GetOrigin(), EDA_SHAPE::GetShape(), KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::IsReset(), PCB_SHAPE::SetEllipseCenter(), PCB_SHAPE::SetEllipseEndAngle(), PCB_SHAPE::SetEllipseMajorRadius(), PCB_SHAPE::SetEllipseMinorRadius(), PCB_SHAPE::SetEllipseRotation(), PCB_SHAPE::SetEllipseStartAngle(), PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DRAWING_TOOL::drawShape().