KiCad PCB EDA Suite
|
#include <eda_shape.h>
Public Member Functions | |
EDA_SHAPE (SHAPE_T aType, int aLineWidth, FILL_T aFill) | |
virtual | ~EDA_SHAPE () |
void | SwapShape (EDA_SHAPE *aImage) |
wxString | ShowShape () const |
wxString | SHAPE_T_asString () const |
bool | IsAnnotationProxy () const |
void | SetIsAnnotationProxy (bool aIsProxy=true) |
bool | IsFilled () const |
void | SetFilled (bool aFlag) |
void | SetFillMode (FILL_T aFill) |
FILL_T | GetFillMode () const |
bool | IsClosed () const |
COLOR4D | GetFillColor () const |
void | SetFillColor (const COLOR4D &aColor) |
void | SetWidth (int aWidth) |
int | GetWidth () const |
virtual int | GetEffectiveWidth () const |
void | SetShape (SHAPE_T aShape) |
SHAPE_T | GetShape () const |
wxString | GetFriendlyName () const |
const VECTOR2I & | GetStart () const |
Return the starting point of the graphic. More... | |
int | GetStartY () const |
int | GetStartX () const |
void | SetStart (const VECTOR2I &aStart) |
void | SetStartY (int y) |
void | SetStartX (int x) |
const VECTOR2I & | GetEnd () const |
Return the ending point of the graphic. More... | |
int | GetEndY () const |
int | GetEndX () const |
void | SetEnd (const VECTOR2I &aEnd) |
void | SetEndY (int y) |
void | SetEndX (int x) |
virtual VECTOR2I | GetTopLeft () const |
virtual VECTOR2I | GetBotRight () const |
virtual void | SetTop (int val) |
virtual void | SetLeft (int val) |
virtual void | SetRight (int val) |
virtual void | SetBottom (int val) |
void | SetBezierC1 (const VECTOR2I &aPt) |
const VECTOR2I & | GetBezierC1 () const |
void | SetBezierC2 (const VECTOR2I &aPt) |
const VECTOR2I & | GetBezierC2 () const |
VECTOR2I | getCenter () const |
void | SetCenter (const VECTOR2I &aCenter) |
void | SetArcAngleAndEnd (const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false) |
Set the end point from the angle center and start. More... | |
EDA_ANGLE | GetArcAngle () const |
bool | EndsSwapped () const |
Have the start and end points been swapped since they were set? More... | |
VECTOR2I | GetArcMid () const |
std::vector< VECTOR2I > | GetRectCorners () const |
void | CalcArcAngles (EDA_ANGLE &aStartAngle, EDA_ANGLE &aEndAngle) const |
Calc arc start and end angles such that aStartAngle < aEndAngle. More... | |
int | GetRadius () const |
void | SetArcGeometry (const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd) |
Set the three controlling points for an arc. More... | |
void | SetCachedArcData (const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd, const VECTOR2I &aCenter) |
Set the data used for mid point caching. More... | |
const std::vector< VECTOR2I > & | GetBezierPoints () const |
void | DupPolyPointsList (std::vector< VECTOR2I > &aBuffer) const |
Duplicate the list of corners in a std::vector<VECTOR2I> More... | |
int | GetPointCount () const |
SHAPE_POLY_SET & | GetPolyShape () |
const SHAPE_POLY_SET & | GetPolyShape () const |
bool | IsPolyShapeValid () const |
void | SetPolyShape (const SHAPE_POLY_SET &aShape) |
void | SetPolyPoints (const std::vector< VECTOR2I > &aPoints) |
void | RebuildBezierToSegmentsPointsList (int aMinSegLen) |
Rebuild the m_bezierPoints vertex list that approximate the Bezier curve by a list of segments. More... | |
virtual std::vector< SHAPE * > | MakeEffectiveShapes (bool aEdgeOnly=false) const |
Make a set of SHAPE objects representing the EDA_SHAPE. More... | |
void | ShapeGetMsgPanelInfo (EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) |
double | GetLength () const |
Return the length of the track using the hypotenuse calculation. More... | |
void | TransformShapeToPolygon (SHAPE_POLY_SET &aBuffer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const |
Convert the shape to a closed polygon. More... | |
int | Compare (const EDA_SHAPE *aOther) const |
Protected Member Functions | |
void | setPosition (const VECTOR2I &aPos) |
VECTOR2I | getPosition () const |
void | move (const VECTOR2I &aMoveVector) |
void | rotate (const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) |
void | flip (const VECTOR2I &aCentre, bool aFlipLeftRight) |
void | scale (double aScale) |
const BOX2I | getBoundingBox () const |
void | computeArcBBox (BOX2I &aBBox) const |
bool | hitTest (const VECTOR2I &aPosition, int aAccuracy=0) const |
bool | hitTest (const BOX2I &aRect, bool aContained, int aAccuracy=0) const |
const std::vector< VECTOR2I > | buildBezierToSegmentsPointsList (int aMinSegLen) const |
void | beginEdit (const VECTOR2I &aStartPoint) |
bool | continueEdit (const VECTOR2I &aPosition) |
void | calcEdit (const VECTOR2I &aPosition) |
void | endEdit (bool aClosed=true) |
Finishes editing the shape. More... | |
void | setEditState (int aState) |
std::vector< SHAPE * > | makeEffectiveShapes (bool aEdgeOnly, bool aLineChainOnly=false) const |
Make a set of SHAPE objects representing the EDA_SHAPE. More... | |
Protected Attributes | |
bool | m_endsSwapped |
SHAPE_T | m_shape |
STROKE_PARAMS | m_stroke |
FILL_T | m_fill |
COLOR4D | m_fillColor |
VECTOR2I | m_start |
VECTOR2I | m_end |
VECTOR2I | m_arcCenter |
ARC_MID | m_arcMidData |
VECTOR2I | m_bezierC1 |
VECTOR2I | m_bezierC2 |
std::vector< VECTOR2I > | m_bezierPoints |
SHAPE_POLY_SET | m_poly |
int | m_editState |
bool | m_annotationProxy |
Definition at line 71 of file eda_shape.h.
Definition at line 40 of file eda_shape.cpp.
|
virtual |
Definition at line 52 of file eda_shape.cpp.
|
protected |
Definition at line 1226 of file eda_shape.cpp.
References SHAPE_LINE_CHAIN::Append(), GetShape(), m_editState, m_poly, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), SetArcGeometry(), SHAPE_LINE_CHAIN::SetClosed(), SetEnd(), SetStart(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by SCH_SHAPE::BeginEdit(), and LIB_SHAPE::BeginEdit().
|
protected |
Definition at line 431 of file eda_shape.cpp.
References BEZIER_POLY::GetPoly(), m_bezierC1, m_bezierC2, m_end, and m_start.
Referenced by makeEffectiveShapes(), and RebuildBezierToSegmentsPointsList().
Calc arc start and end angles such that aStartAngle < aEndAngle.
Each may be between -360.0 and 360.0.
Definition at line 502 of file eda_shape.cpp.
References ANGLE_0, ANGLE_360, getCenter(), GetEnd(), GetStart(), and EDA_ANGLE::Normalize().
Referenced by computeArcBBox(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), GetArcAngle(), hitTest(), LIB_SHAPE::Plot(), LIB_SHAPE::print(), and SCH_LEGACY_PLUGIN_CACHE::saveArc().
|
protected |
Definition at line 1284 of file eda_shape.cpp.
References ANGLE_180, GetArcAngle(), GetEnd(), GetLineLength(), SHAPE_LINE_CHAIN::GetPointCount(), GetRadius(), GetShape(), GetStart(), KiROUND(), m_arcCenter, m_editState, m_end, m_poly, m_start, SHAPE_POLY_SET::Outline(), SetArcGeometry(), SetEnd(), SHAPE_LINE_CHAIN::SetPoint(), SHAPE_T_asString(), sq, UNIMPLEMENTED_FOR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SCH_SHAPE::CalcEdit(), and LIB_SHAPE::CalcEdit().
int EDA_SHAPE::Compare | ( | const EDA_SHAPE * | aOther | ) | const |
Definition at line 1469 of file eda_shape.cpp.
References SHAPE_POLY_SET::CVertex(), STROKE_PARAMS::GetPlotStyle(), STROKE_PARAMS::GetWidth(), m_arcCenter, m_bezierC1, m_bezierC2, m_bezierPoints, m_end, m_fill, m_poly, m_shape, m_start, m_stroke, TEST, TEST_E, TEST_PT, and SHAPE_POLY_SET::TotalVertices().
Referenced by LIB_SHAPE::compare(), LIB_TEXTBOX::compare(), and BOARD::cmp_drawings::operator()().
|
protected |
Definition at line 1035 of file eda_shape.cpp.
References ANGLE_0, ANGLE_180, ANGLE_270, ANGLE_90, CalcArcAngles(), GetRadius(), IsFilled(), m_arcCenter, m_end, m_start, BOX2< Vec >::Merge(), EDA_ANGLE::Normalize(), BOX2< Vec >::SetOrigin(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by getBoundingBox().
|
protected |
Definition at line 1257 of file eda_shape.cpp.
References SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::CLastPoint(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::GetPointCount(), GetShape(), m_poly, SHAPE_POLY_SET::Outline(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by SCH_SHAPE::ContinueEdit(), and LIB_SHAPE::ContinueEdit().
void EDA_SHAPE::DupPolyPointsList | ( | std::vector< VECTOR2I > & | aBuffer | ) | const |
Duplicate the list of corners in a std::vector<VECTOR2I>
It must be used only to convert the SHAPE_POLY_SET internal corner buffer to a list of VECTOR2Is, and nothing else, because it duplicates the buffer, that is inefficient to know for instance the corner count
Definition at line 1186 of file eda_shape.cpp.
References SHAPE_POLY_SET::CIterate(), SHAPE_POLY_SET::COutline(), m_poly, SHAPE_POLY_SET::OutlineCount(), and SHAPE_LINE_CHAIN::PointCount().
Referenced by PCB_POINT_EDITOR::updatePoints().
|
protected |
Finishes editing the shape.
aClosed | Should polygon shapes be closed (yes for pcbnew/fpeditor, no for libedit) |
Definition at line 1414 of file eda_shape.cpp.
References SHAPE_LINE_CHAIN::CLastPoint(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::GetPointCount(), GetShape(), m_poly, SHAPE_POLY_SET::Outline(), SHAPE_LINE_CHAIN::Remove(), SHAPE_LINE_CHAIN::SetClosed(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by SCH_SHAPE::EndEdit(), and LIB_SHAPE::EndEdit().
|
inline |
Have the start and end points been swapped since they were set?
Definition at line 195 of file eda_shape.h.
References m_endsSwapped.
Referenced by BOOST_AUTO_TEST_CASE().
|
protected |
Definition at line 320 of file eda_shape.cpp.
References BEZIER_POLY::GetPoly(), STROKE_PARAMS::GetWidth(), m_arcCenter, m_bezierC1, m_bezierC2, m_bezierPoints, m_end, m_poly, m_shape, m_start, m_stroke, SHAPE_POLY_SET::Mirror(), SHAPE_T_asString(), UNIMPLEMENTED_FOR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_SHAPE::Flip(), LIB_SHAPE::MirrorHorizontal(), SCH_SHAPE::MirrorHorizontally(), LIB_SHAPE::MirrorVertical(), and SCH_SHAPE::MirrorVertically().
EDA_ANGLE EDA_SHAPE::GetArcAngle | ( | ) | const |
Definition at line 585 of file eda_shape.cpp.
References CalcArcAngles().
Referenced by BOARD_ADAPTER::addShape(), calcEdit(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ConvertOutlineToPolygon(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), FootprintWriteShape(), GetArcMid(), GetLength(), idf_export_outline(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), makeEffectiveShapes(), DSN::SPECCTRA_DB::makeIMAGE(), PCB_PARSER::parsePAD(), BRDITEMS_PLOTTER::PlotPcbShape(), ShapeGetMsgPanelInfo(), AR_MATRIX::TraceSegmentPcb(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), and DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow().
VECTOR2I EDA_SHAPE::GetArcMid | ( | ) | const |
Definition at line 488 of file eda_shape.cpp.
References ARC_MID::center, ARC_MID::end, GetArcAngle(), m_arcCenter, m_arcMidData, m_end, m_start, ARC_MID::mid, RotatePoint(), and ARC_MID::start.
Referenced by KI_TEST::CheckFpShape(), PCB_POINT_EDITOR::editArcMidKeepEndpoints(), PCB_PLUGIN::format(), formatArc(), PCB_SHAPE::GetFocusPosition(), PCB_POINT_EDITOR::makePoints(), CONVERT_TOOL::makePolysFromChainedSegs(), SetArcGeometry(), TransformShapeToPolygon(), and PCB_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 176 of file eda_shape.h.
References m_bezierC1.
Referenced by GRAPHICS_CLEANER::areEquivalent(), KI_TEST::CheckFpShape(), KIGFX::PCB_PAINTER::draw(), PCB_PLUGIN::format(), formatBezier(), getBoundingBox(), PCB_POINT_EDITOR::makePoints(), FOOTPRINT::cmp_drawings::operator()(), PCB_PARSER::parsePAD(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), shapeNeedsUpdate(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), TransformShapeToPolygon(), and PCB_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 179 of file eda_shape.h.
References m_bezierC2.
Referenced by GRAPHICS_CLEANER::areEquivalent(), KI_TEST::CheckFpShape(), KIGFX::PCB_PAINTER::draw(), PCB_PLUGIN::format(), formatBezier(), getBoundingBox(), PCB_POINT_EDITOR::makePoints(), FOOTPRINT::cmp_drawings::operator()(), PCB_PARSER::parsePAD(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), shapeNeedsUpdate(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), TransformShapeToPolygon(), and PCB_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 230 of file eda_shape.h.
References m_bezierPoints.
Referenced by ConvertOutlineToPolygon(), GRAPHICS_CLEANER::isNullShape(), and CONVERT_TOOL::makePolysFromChainedSegs().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 168 of file eda_shape.h.
References GetEnd().
Referenced by KIGFX::PCB_PAINTER::draw(), PCB_POINT_EDITOR::makePoints(), and PCB_POINT_EDITOR::updatePoints().
|
protected |
Definition at line 684 of file eda_shape.cpp.
References SHAPE_POLY_SET::CIterate(), computeArcBBox(), GetBezierC1(), GetBezierC2(), GetEnd(), GetRadius(), GetRectCorners(), GetStart(), GetWidth(), BOX2< Vec >::Inflate(), SHAPE_POLY_SET::IsEmpty(), m_poly, m_shape, BOX2< Vec >::Merge(), BOX2< Vec >::Normalize(), BOX2< Vec >::SetEnd(), BOX2< Vec >::SetOrigin(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by LIB_SHAPE::GetBoundingBox(), SCH_SHAPE::GetBoundingBox(), PCB_SHAPE::GetBoundingBox(), getCenter(), and hitTest().
VECTOR2I EDA_SHAPE::getCenter | ( | ) | const |
Definition at line 444 of file eda_shape.cpp.
References BOX2< Vec >::Centre(), getBoundingBox(), m_arcCenter, m_end, m_shape, m_start, SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by CalcArcAngles(), LIB_SHAPE::GetCenter(), SCH_SHAPE::GetCenter(), PCB_SHAPE::GetCenter(), getPosition(), hitTest(), makeEffectiveShapes(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), SCH_SHAPE::Print(), LIB_SHAPE::print(), SCH_SHAPE::PrintBackground(), PLOTTER::ThickArc(), GERBER_PLOTTER::ThickArc(), and TransformShapeToPolygon().
|
inlinevirtual |
Reimplemented in SCH_SHAPE.
Definition at line 110 of file eda_shape.h.
References GetWidth().
Referenced by makeEffectiveShapes().
|
inline |
Return the ending point of the graphic.
Definition at line 145 of file eda_shape.h.
References m_end.
Referenced by PCB_POINT_EDITOR::addCorner(), BOARD_ADAPTER::addShape(), GRAPHICS_CLEANER::areEquivalent(), BOOST_AUTO_TEST_CASE(), CalcArcAngles(), calcEdit(), KI_TEST::CheckFpShape(), ConvertOutlineToPolygon(), CreateBoardSection(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawLine(), PCB_POINT_EDITOR::editArcEndpointKeepCenter(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), FootprintWriteShape(), PCB_PLUGIN::format(), formatArc(), formatBezier(), formatRect(), GetBotRight(), PCB_TEXTBOX::GetBotRight(), getBoundingBox(), GetLength(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), GetRectCorners(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), LIB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), CONVERT_TOOL::getStartEndPoints(), PCB_TEXTBOX::GetTopLeft(), hash_fp_item(), hitTest(), idf_export_outline(), GRAPHICS_CLEANER::isNullShape(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), SCH_EAGLE_PLUGIN::loadSymbolRectangle(), EDIT_POINTS_FACTORY::Make(), makeEffectiveShapes(), DSN::SPECCTRA_DB::makeIMAGE(), PCB_POINT_EDITOR::makePoints(), CONVERT_TOOL::makePolysFromChainedSegs(), GRAPHICS_CLEANER::mergeRects(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), PCB_SHAPE::NormalizeRect(), FOOTPRINT::cmp_drawings::operator()(), PCB_PARSER::parsePAD(), SCH_EDITOR_CONTROL::Paste(), SCH_SHAPE::Plot(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_SHAPE::Print(), SCH_TEXTBOX::Print(), SCH_SHAPE::PrintBackground(), SCH_LEGACY_PLUGIN_CACHE::saveArc(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), SCH_LEGACY_PLUGIN_CACHE::saveRectangle(), SCH_SEXPR_PLUGIN_CACHE::saveTextBox(), SCH_SEXPR_PLUGIN::saveTextBox(), ShapeGetMsgPanelInfo(), shapeNeedsUpdate(), PLOTTER::ThickArc(), GERBER_PLOTTER::ThickArc(), AR_MATRIX::TraceSegmentPcb(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), TransformShapeToPolygon(), EE_POINT_EDITOR::updatePoints(), and PCB_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 147 of file eda_shape.h.
References m_end, and VECTOR2< T >::x.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PCB_TEXTBOX::GetBotRight(), PCB_TEXTBOX::GetTopLeft(), and DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run().
|
inline |
Definition at line 146 of file eda_shape.h.
References m_end, and VECTOR2< T >::y.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PCB_TEXTBOX::GetBotRight(), PCB_TEXTBOX::GetTopLeft(), and DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run().
|
inline |
Definition at line 105 of file eda_shape.h.
References m_fillColor.
Referenced by SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), KIGFX::SCH_PAINTER::getRenderColor(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), SCH_SHAPE::Print(), LIB_SHAPE::print(), LIB_TEXTBOX::print(), SCH_TEXTBOX::Print(), SCH_SHAPE::PrintBackground(), SCH_SEXPR_PLUGIN::saveShape(), SCH_SEXPR_PLUGIN_CACHE::saveSymbolDrawItem(), SCH_SEXPR_PLUGIN_CACHE::saveTextBox(), SCH_SEXPR_PLUGIN::saveTextBox(), KIGFX::SCH_PAINTER::setDeviceColors(), DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 101 of file eda_shape.h.
References m_fill.
Referenced by KI_TEST::CheckFpShape(), KIGFX::SCH_PAINTER::draw(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), IsFilled(), CONVERT_TOOL::makePolysFromClosedGraphics(), SCH_SHAPE::Print(), LIB_SYMBOL::Print(), LIB_SHAPE::print(), LIB_TEXTBOX::print(), SCH_TEXTBOX::Print(), SCH_SHAPE::PrintBackground(), LIB_SYMBOL::PrintBackground(), SCH_LEGACY_PLUGIN_CACHE::saveArc(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), SCH_LEGACY_PLUGIN_CACHE::saveCircle(), SCH_LEGACY_PLUGIN_CACHE::savePolyLine(), SCH_LEGACY_PLUGIN_CACHE::saveRectangle(), SCH_SEXPR_PLUGIN::saveShape(), SCH_SEXPR_PLUGIN_CACHE::saveSymbolDrawItem(), SCH_SEXPR_PLUGIN_CACHE::saveTextBox(), SCH_SEXPR_PLUGIN::saveTextBox(), KIGFX::SCH_PAINTER::setDeviceColors(), and DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow().
wxString EDA_SHAPE::GetFriendlyName | ( | ) | const |
Definition at line 611 of file eda_shape.cpp.
References _, IsAnnotationProxy(), and m_shape.
Referenced by PCB_SHAPE::GetFriendlyName(), and ShapeGetMsgPanelInfo().
double EDA_SHAPE::GetLength | ( | ) | const |
Return the length of the track using the hypotenuse calculation.
Definition at line 110 of file eda_shape.cpp.
References EDA_ANGLE::AsRadians(), SHAPE_POLY_SET::COutline(), SHAPE_LINE_CHAIN::CSegment(), GetArcAngle(), GetEnd(), GetLineLength(), GetRadius(), GetStart(), SEG::Length(), m_bezierPoints, m_poly, m_shape, SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by DRAWING_TOOL::drawShape(), and ShapeGetMsgPanelInfo().
int EDA_SHAPE::GetPointCount | ( | ) | const |
Definition at line 1215 of file eda_shape.cpp.
References GetPolyShape(), and SHAPE_POLY_SET::VertexCount().
Referenced by GRAPHICS_CLEANER::isNullShape(), SCH_SEXPR_PARSER::ParseSchematic(), and EE_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 247 of file eda_shape.h.
References m_poly.
Referenced by EE_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::addCorner(), KI_TEST::CheckFpShape(), ConvertOutlineToPolygon(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), CADSTAR_SCH_ARCHIVE_LOADER::fixUpLibraryPins(), PCB_PLUGIN::format(), formatPoly(), PCB_SHAPE::GetCorners(), PCB_SHAPE::GetFocusPosition(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), GetPointCount(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), IsPolyShapeValid(), SCH_EAGLE_PLUGIN::loadSymbolPolyLine(), EDIT_POINTS_FACTORY::Make(), makeEffectiveShapes(), PCB_POINT_EDITOR::makePoints(), FOOTPRINT::cmp_drawings::operator()(), EAGLE_PLUGIN::packagePolygon(), PCB_PARSER::parsePAD(), SCH_SEXPR_PARSER::ParseSchematic(), SCH_EDITOR_CONTROL::Paste(), BRDITEMS_PLOTTER::PlotPcbShape(), EE_POINT_EDITOR::removeCorner(), PCB_POINT_EDITOR::removeCorner(), EE_POINT_EDITOR::removeCornerCondition(), PCB_POINT_EDITOR::removeCornerCondition(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), SCH_LEGACY_PLUGIN_CACHE::savePolyLine(), ShapeGetMsgPanelInfo(), shapeNeedsUpdate(), PCB_POINT_EDITOR::updateItem(), EE_POINT_EDITOR::updateParentItem(), and EE_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 248 of file eda_shape.h.
References m_poly.
|
protected |
Definition at line 99 of file eda_shape.cpp.
References SHAPE_POLY_SET::CVertex(), getCenter(), m_poly, m_shape, and m_start.
Referenced by LIB_SHAPE::GetPosition(), SCH_SHAPE::GetPosition(), PCB_SHAPE::GetPosition(), and setPosition().
int EDA_SHAPE::GetRadius | ( | ) | const |
Definition at line 523 of file eda_shape.cpp.
References GetLineLength(), KiROUND(), m_arcCenter, m_end, m_shape, m_start, SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by BOARD_ADAPTER::addShape(), calcEdit(), computeArcBBox(), ConvertOutlineToPolygon(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), formatCircle(), getBoundingBox(), PCB_SHAPE::GetFocusPosition(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), GetLength(), hash_fp_item(), hitTest(), idf_export_outline(), GRAPHICS_CLEANER::isNullShape(), makeEffectiveShapes(), DSN::SPECCTRA_DB::makeIMAGE(), ALTIUM_PCB::Parse(), PCB_PARSER::parsePAD(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_SHAPE::Print(), LIB_SHAPE::print(), SCH_SHAPE::PrintBackground(), SCH_LEGACY_PLUGIN_CACHE::saveArc(), SCH_LEGACY_PLUGIN_CACHE::saveCircle(), scale(), ShapeGetMsgPanelInfo(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), and TransformShapeToPolygon().
std::vector< VECTOR2I > EDA_SHAPE::GetRectCorners | ( | ) | const |
Definition at line 1020 of file eda_shape.cpp.
References GetEnd(), GetStart(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOARD_ADAPTER::addShape(), ConvertOutlineToPolygon(), KIGFX::PCB_PAINTER::draw(), getBoundingBox(), PCB_SHAPE::GetCorners(), hitTest(), makeEffectiveShapes(), SCH_EDITOR_CONTROL::Paste(), SCH_SHAPE::Plot(), BRDITEMS_PLOTTER::PlotPcbShape(), TransformShapeToPolygon(), and PCB_TEXTBOX::TransformShapeToPolygon().
|
inline |
Definition at line 113 of file eda_shape.h.
References m_shape.
Referenced by PCB_POINT_EDITOR::addCorner(), EE_POINT_EDITOR::addCornerCondition(), LIB_SHAPE::AddPoint(), SCH_SHAPE::AddPoint(), BOARD_ADAPTER::addShape(), GRAPHICS_CLEANER::areEquivalent(), beginEdit(), calcEdit(), PCB_POINT_EDITOR::canAddCorner(), KI_TEST::CheckFpShape(), continueEdit(), ConvertOutlineToPolygon(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), endEdit(), PAD_TOOL::explodePad(), CADSTAR_SCH_ARCHIVE_LOADER::fixUpLibraryPins(), FootprintWriteShape(), PCB_PLUGIN::format(), PCB_SHAPE::GetCorners(), FOOTPRINT::GetCoverageArea(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), LIB_SHAPE::GetMenuImage(), SCH_SHAPE::GetMenuImage(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), CONVERT_TOOL::getStartEndPoints(), EE_SELECTION_TOOL::GuessSelectionCandidates(), hash_fp_item(), idf_export_outline(), GRAPHICS_CLEANER::isNullShape(), EE_POINT_EDITOR::Main(), EDIT_POINTS_FACTORY::Make(), DSN::SPECCTRA_DB::makeIMAGE(), PCB_POINT_EDITOR::makePoints(), CONVERT_TOOL::makePolysFromChainedSegs(), GRAPHICS_CLEANER::mergeRects(), PCB_SHAPE::Mirror(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), PCB_SHAPE::cmp_drawings::operator()(), FOOTPRINT::cmp_drawings::operator()(), ALTIUM_PCB::Parse(), SCH_EDITOR_CONTROL::Paste(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_SHAPE::Print(), LIB_SHAPE::print(), SCH_SHAPE::PrintBackground(), PAD_TOOL::RecombinePad(), PCB_POINT_EDITOR::removeCorner(), PCB_POINT_EDITOR::removeCornerCondition(), PCB_TEXTBOX::Rotate(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), SCH_LEGACY_PLUGIN_CACHE::saveArc(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), SCH_LEGACY_PLUGIN_CACHE::saveCircle(), SCH_LEGACY_PLUGIN_CACHE::savePolyLine(), SCH_LEGACY_PLUGIN_CACHE::saveRectangle(), SCH_SEXPR_PLUGIN::saveShape(), SCH_LEGACY_PLUGIN_CACHE::SaveSymbol(), SCH_SEXPR_PLUGIN_CACHE::saveSymbolDrawItem(), shapeNeedsUpdate(), GERBER_PLOTTER::ThickArc(), AR_MATRIX::TraceSegmentPcb(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), PCB_TEXTBOX::TransformShapeToPolygon(), PCB_POINT_EDITOR::updateItem(), EE_POINT_EDITOR::updateParentItem(), EE_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), and DIALOG_GRAPHIC_ITEM_PROPERTIES::Validate().
|
inline |
Return the starting point of the graphic.
Definition at line 120 of file eda_shape.h.
References m_start.
Referenced by PCB_POINT_EDITOR::addCorner(), BOARD_ADAPTER::addShape(), GRAPHICS_CLEANER::areEquivalent(), BOOST_AUTO_TEST_CASE(), CalcArcAngles(), calcEdit(), KI_TEST::CheckFpShape(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ConvertOutlineToPolygon(), CreateBoardSection(), KIGFX::PCB_PAINTER::draw(), PCB_POINT_EDITOR::editArcEndpointKeepCenter(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), FootprintWriteShape(), PCB_PLUGIN::format(), formatArc(), formatBezier(), formatCircle(), formatRect(), PCB_TEXTBOX::GetBotRight(), getBoundingBox(), PCB_SHAPE::GetFocusPosition(), GetLength(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), GetRectCorners(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), LIB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), CONVERT_TOOL::getStartEndPoints(), GetTopLeft(), PCB_TEXTBOX::GetTopLeft(), hash_fp_item(), hitTest(), idf_export_outline(), GRAPHICS_CLEANER::isNullShape(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), EDIT_POINTS_FACTORY::Make(), DSN::SPECCTRA_DB::makeIMAGE(), PCB_POINT_EDITOR::makePoints(), CONVERT_TOOL::makePolysFromChainedSegs(), GRAPHICS_CLEANER::mergeRects(), PCB_SHAPE::NormalizeRect(), FOOTPRINT::cmp_drawings::operator()(), PCB_PARSER::parsePAD(), SCH_EDITOR_CONTROL::Paste(), SCH_SHAPE::Plot(), BRDITEMS_PLOTTER::PlotPcbShape(), BRDITEMS_PLOTTER::PlotPcbTarget(), SCH_SHAPE::Print(), SCH_TEXTBOX::Print(), SCH_SHAPE::PrintBackground(), SCH_LEGACY_PLUGIN_CACHE::saveArc(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), SCH_SEXPR_PLUGIN_CACHE::saveTextBox(), SCH_SEXPR_PLUGIN::saveTextBox(), ShapeGetMsgPanelInfo(), shapeNeedsUpdate(), PLOTTER::ThickArc(), GERBER_PLOTTER::ThickArc(), AR_MATRIX::TraceSegmentPcb(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), TransformShapeToPolygon(), EE_POINT_EDITOR::updatePoints(), and PCB_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 122 of file eda_shape.h.
References m_start, and VECTOR2< T >::x.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PCB_TEXTBOX::GetBotRight(), PCB_TEXTBOX::GetTopLeft(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), and DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run().
|
inline |
Definition at line 121 of file eda_shape.h.
References m_start, and VECTOR2< T >::y.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PCB_TEXTBOX::GetBotRight(), PCB_TEXTBOX::GetTopLeft(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), and DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 167 of file eda_shape.h.
References GetStart().
Referenced by KIGFX::PCB_PAINTER::draw(), PCB_POINT_EDITOR::makePoints(), and PCB_POINT_EDITOR::updatePoints().
|
inline |
Definition at line 109 of file eda_shape.h.
References STROKE_PARAMS::GetWidth(), and m_stroke.
Referenced by BOARD_ADAPTER::addShape(), GRAPHICS_CLEANER::areEquivalent(), ConvertOutlineToPolygon(), KIGFX::PCB_PAINTER::draw(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), getBoundingBox(), FOOTPRINT::GetCoverageArea(), PCB_TEXTBOX::GetEffectiveShape(), GetEffectiveWidth(), LIB_SHAPE::GetPenWidth(), SCH_SHAPE::GetPenWidth(), SCH_TEXTBOX::GetTextMargin(), PCB_TEXTBOX::GetTextMargin(), hash_fp_item(), hitTest(), GRAPHICS_CLEANER::isNullShape(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), FABMASTER::loadOutline(), FABMASTER::loadPolygon(), DSN::SPECCTRA_DB::makeIMAGE(), CONVERT_TOOL::makePolysFromChainedSegs(), PCB_SHAPE::Mirror(), FOOTPRINT::cmp_drawings::operator()(), PCB_PARSER::parsePAD(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_LEGACY_PLUGIN_CACHE::saveArc(), SCH_LEGACY_PLUGIN_CACHE::saveBezier(), SCH_LEGACY_PLUGIN_CACHE::saveCircle(), SCH_LEGACY_PLUGIN_CACHE::savePolyLine(), SCH_LEGACY_PLUGIN_CACHE::saveRectangle(), PLOTTER::ThickArc(), GERBER_PLOTTER::ThickArc(), AR_MATRIX::TraceSegmentPcb(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow(), TransformShapeToPolygon(), PCB_TEXTBOX::TransformShapeToPolygon(), PCB_POINT_EDITOR::updateItem(), and PCB_SHAPE::ViewBBox().
|
protected |
Definition at line 852 of file eda_shape.cpp.
References BOX2< Vec >::Contains(), getBoundingBox(), getCenter(), GetEnd(), SHAPE_LINE_CHAIN::GetPoint(), SHAPE_LINE_CHAIN::GetPointCount(), GetRadius(), GetRectCorners(), GetStart(), GetWidth(), BOX2< Vec >::Inflate(), BOX2< Vec >::Intersects(), BOX2< Vec >::IntersectsCircleEdge(), SHAPE_LINE_CHAIN::IsClosed(), IsFilled(), m_bezierPoints, m_poly, m_shape, BOX2< Vec >::Normalize(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
|
protected |
Definition at line 738 of file eda_shape.cpp.
References SHAPE_POLY_SET::Append(), CalcArcAngles(), SHAPE_POLY_SET::Collide(), SHAPE_POLY_SET::CollideEdge(), EuclideanNorm(), getCenter(), GetEnd(), GetRadius(), GetRectCorners(), GetStart(), GetWidth(), IsAnnotationProxy(), IsFilled(), m_bezierPoints, m_end, m_poly, m_shape, m_start, SHAPE_POLY_SET::NewOutline(), EDA_ANGLE::Normalize(), RebuildBezierToSegmentsPointsList(), SHAPE_T_asString(), TestSegmentHit(), and UNIMPLEMENTED_FOR.
Referenced by LIB_SHAPE::HitTest(), SCH_SHAPE::HitTest(), and PCB_SHAPE::HitTest().
|
inline |
Definition at line 87 of file eda_shape.h.
References m_annotationProxy.
Referenced by KIGFX::PCB_PAINTER::draw(), GetFriendlyName(), hitTest(), makeEffectiveShapes(), PAD_TOOL::RecombinePad(), ShowShape(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), TransformShapeToPolygon(), and PCB_POINT_EDITOR::updateItem().
bool EDA_SHAPE::IsClosed | ( | ) | const |
Definition at line 141 of file eda_shape.cpp.
References SHAPE_LINE_CHAIN::IsClosed(), SHAPE_POLY_SET::IsEmpty(), m_bezierPoints, m_poly, m_shape, SHAPE_POLY_SET::Outline(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by CONVERT_TOOL::makePolysFromClosedGraphics(), and CONVERT_TOOL::makePolysFromOpenGraphics().
|
inline |
Definition at line 90 of file eda_shape.h.
References GetFillMode().
Referenced by BOARD_ADAPTER::addShape(), computeArcBBox(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PCB_PLUGIN::format(), FOOTPRINT::GetCoverageArea(), PCB_SHAPE::GetFocusPosition(), hash_fp_item(), hitTest(), makeEffectiveShapes(), PCB_PARSER::parsePAD(), BRDITEMS_PLOTTER::PlotPcbShape(), LIB_SHAPE::print(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), KIGFX::SCH_PAINTER::setDeviceColors(), shapeNeedsUpdate(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow(), and TransformShapeToPolygon().
bool EDA_SHAPE::IsPolyShapeValid | ( | ) | const |
Definition at line 1203 of file eda_shape.cpp.
References GetPolyShape(), and SHAPE_LINE_CHAIN::PointCount().
Referenced by PCB_PLUGIN::format(), BRDITEMS_PLOTTER::PlotPcbShape(), and TransformShapeToPolygon().
|
protected |
Make a set of SHAPE objects representing the EDA_SHAPE.
Caller owns the objects.
aEdgeOnly | indicates only edges should be generated (even if 0 width), and no fill shapes. |
aLineChainOnly | indicates SHAPE_POLY_SET is being abused slightly to represent a lineChain rather than a closed polygon |
Definition at line 1095 of file eda_shape.cpp.
References ANGLE_360, buildBezierToSegmentsPointsList(), SHAPE_POLY_SET::COutline(), GetArcAngle(), getCenter(), GetEffectiveWidth(), GetEnd(), GetPolyShape(), GetRadius(), GetRectCorners(), IsAnnotationProxy(), IsFilled(), m_arcCenter, m_end, m_shape, m_start, SHAPE_POLY_SET::OutlineCount(), SHAPE_LINE_CHAIN::Segment(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::SetClosed(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by MakeEffectiveShapes(), and LIB_SHAPE::MakeEffectiveShapes().
|
inlinevirtual |
Make a set of SHAPE objects representing the EDA_SHAPE.
Caller owns the objects.
aEdgeOnly | indicates only edges should be generated (even if 0 width), and no fill shapes. |
Reimplemented in LIB_SHAPE.
Definition at line 289 of file eda_shape.h.
References makeEffectiveShapes().
Referenced by BOARD_ADAPTER::addShape(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), PCB_SHAPE::GetEffectiveShape(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_SHAPE::Print(), SCH_TEXTBOX::Print(), and PNS_KICAD_IFACE_BASE::syncGraphicalItem().
|
protected |
Definition at line 173 of file eda_shape.cpp.
References m_arcCenter, m_bezierC1, m_bezierC2, m_bezierPoints, m_end, m_poly, m_shape, m_start, SHAPE_POLY_SET::Move(), SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by SCH_TEXTBOX::Move().
void EDA_SHAPE::RebuildBezierToSegmentsPointsList | ( | int | aMinSegLen | ) |
Rebuild the m_bezierPoints vertex list that approximate the Bezier curve by a list of segments.
Has meaning only for BEZIER shape.
aMinSegLen | is the min length of segments approximating the bezier. The shape's last segment can be shorter. This parameter avoids having too many very short segment in list. Good values are between m_width/2 and m_width. |
Definition at line 405 of file eda_shape.cpp.
References buildBezierToSegmentsPointsList(), EuclideanNorm(), m_bezierPoints, and m_shape.
Referenced by ConvertOutlineToPolygon(), hitTest(), GRAPHICS_CLEANER::isNullShape(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), PCB_SHAPE::Mirror(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), and PCB_POINT_EDITOR::updateItem().
Definition at line 263 of file eda_shape.cpp.
References SHAPE_POLY_SET::Append(), EDA_ANGLE::IsCardinal(), KI_FALLTHROUGH, m_arcCenter, m_bezierC1, m_bezierC2, m_bezierPoints, m_end, m_poly, m_shape, m_start, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::RemoveAllContours(), SHAPE_POLY_SET::Rotate(), RotatePoint(), SHAPE_T_asString(), UNIMPLEMENTED_FOR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SCH_SHAPE::Rotate(), LIB_SHAPE::Rotate(), and PCB_SHAPE::Rotate().
|
protected |
Definition at line 208 of file eda_shape.cpp.
References SHAPE_LINE_CHAIN::CPoints(), GetRadius(), KiROUND(), m_arcCenter, m_bezierC1, m_bezierC2, m_end, m_poly, m_shape, m_start, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), SetPolyPoints(), SHAPE_T_asString(), UNIMPLEMENTED_FOR, VECTOR2< T >::x, and VECTOR2< T >::y.
void EDA_SHAPE::SetArcAngleAndEnd | ( | const EDA_ANGLE & | aAngle, |
bool | aCheckNegativeAngle = false |
||
) |
Set the end point from the angle center and start.
Definition at line 596 of file eda_shape.cpp.
References ANGLE_0, m_arcCenter, m_end, m_endsSwapped, m_start, EDA_ANGLE::Normalize720(), and RotatePoint().
Referenced by PAD::AddPrimitiveArc(), PCAD2KICAD::PCAD_ARC::AddToBoard(), BOOST_AUTO_TEST_CASE(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), DRAWING_TOOL::drawArc(), CADSTAR_PCB_ARCHIVE_LOADER::getShapeFromVertex(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), EAGLE_PLUGIN::loadPlain(), SCH_EAGLE_PLUGIN::loadSymbolWire(), EAGLE_PLUGIN::packageWire(), SCH_ALTIUM_PLUGIN::ParseArc(), GPCB_FPL_CACHE::parseFOOTPRINT(), and DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow().
void EDA_SHAPE::SetArcGeometry | ( | const VECTOR2I & | aStart, |
const VECTOR2I & | aMid, | ||
const VECTOR2I & | aEnd | ||
) |
Set the three controlling points for an arc.
NB: these are NOT what's currently stored, so we have to do some calculations behind the scenes. However, they are what SHOULD be stored.
Definition at line 555 of file eda_shape.cpp.
References CalcArcCenter(), GetArcMid(), m_arcCenter, m_arcMidData, m_end, m_endsSwapped, m_start, SetCachedArcData(), and VECTOR2< T >::SquaredEuclideanNorm().
Referenced by beginEdit(), calcEdit(), PCB_POINT_EDITOR::editArcMidKeepEndpoints(), ALTIUM_PCB::HelperCreateBoardOutline(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), and CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices().
|
inline |
Definition at line 175 of file eda_shape.h.
References m_bezierC1.
Referenced by PAD::AddPrimitiveCurve(), PAD_TOOL::explodePad(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), SCH_ALTIUM_PLUGIN::ParseBezier(), PAD_TOOL::RecombinePad(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), and PCB_POINT_EDITOR::updateItem().
|
inline |
Definition at line 178 of file eda_shape.h.
References m_bezierC2.
Referenced by PAD::AddPrimitiveCurve(), PAD_TOOL::explodePad(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), SCH_ALTIUM_PLUGIN::ParseBezier(), PAD_TOOL::RecombinePad(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), and PCB_POINT_EDITOR::updateItem().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 173 of file eda_shape.h.
References SetEndY().
Referenced by PCB_POINT_EDITOR::updateItem().
void EDA_SHAPE::SetCachedArcData | ( | const VECTOR2I & | aStart, |
const VECTOR2I & | aMid, | ||
const VECTOR2I & | aEnd, | ||
const VECTOR2I & | aCenter | ||
) |
Set the data used for mid point caching.
If the controlling points remain constant, then we keep the midpoint the same as it was when read in. This minimizes VCS churn
aStart | Cached start point |
aMid | Cached mid point |
aEnd | Cached end point |
aCenter | Calculated center point using the preceeding three |
Definition at line 546 of file eda_shape.cpp.
References ARC_MID::center, ARC_MID::end, m_arcMidData, ARC_MID::mid, and ARC_MID::start.
Referenced by SetArcGeometry().
void EDA_SHAPE::SetCenter | ( | const VECTOR2I & | aCenter | ) |
Definition at line 470 of file eda_shape.cpp.
References m_arcCenter, m_shape, m_start, SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by PAD::AddPrimitiveArc(), PCAD2KICAD::PCAD_ARC::AddToBoard(), BOOST_AUTO_TEST_CASE(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), LTSPICE_SCH_PARSER::CreateArc(), PCB_POINT_EDITOR::editArcCenterKeepEndpoints(), PCB_POINT_EDITOR::editArcEndpointKeepCenter(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), PAD_TOOL::explodePad(), CADSTAR_PCB_ARCHIVE_LOADER::getShapeFromVertex(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), EAGLE_PLUGIN::loadPlain(), SCH_EAGLE_PLUGIN::loadSymbolWire(), EAGLE_PLUGIN::packageWire(), SCH_ALTIUM_PLUGIN::ParseArc(), GPCB_FPL_CACHE::parseFOOTPRINT(), PAD_TOOL::RecombinePad(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), and updateArcFromConstructionMgr().
|
inlineprotected |
Definition at line 345 of file eda_shape.h.
References m_editState.
Referenced by LIB_SHAPE::SetEditState(), and SCH_SHAPE::SetEditState().
|
inline |
Definition at line 149 of file eda_shape.h.
References m_end, and m_endsSwapped.
Referenced by PCB_POINT_EDITOR::addCorner(), PAD::AddPrimitiveAnnotationBox(), PAD::AddPrimitiveCircle(), PAD::AddPrimitiveCurve(), PAD::AddPrimitiveRect(), PAD::AddPrimitiveSegment(), SCH_ALTIUM_PLUGIN::AddTextBox(), PCAD2KICAD::PCAD_LINE::AddToBoard(), PCAD2KICAD::PCAD_POLYGON::AddToBoard(), beginEdit(), calcEdit(), SCH_EDIT_TOOL::ChangeTextType(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertFills6ToFootprintItem(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToBoardItem(), ALTIUM_PCB::ConvertTracks6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToFootprintItem(), ALTIUM_PCB::ConvertTracks6ToFootprintItemOnLayer(), LTSPICE_SCH_PARSER::CreateArc(), LTSPICE_SCH_PARSER::CreateCircle(), MICROWAVE_TOOL::createMicrowaveInductor(), LTSPICE_SCH_PARSER::CreateRect(), PCB_POINT_EDITOR::editArcEndpointKeepCenter(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), PCB_POINT_EDITOR::editArcMidKeepCenter(), PAD_TOOL::explodePad(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), CADSTAR_PCB_ARCHIVE_LOADER::getShapeFromVertex(), ALTIUM_PCB::HelperCreateBoardOutline(), HelperGeneratePowerPortGraphics(), ALTIUM_PCB::HelperParseDimensions6Leader(), ALTIUM_PCB::HelperParsePad6NonCopper(), initTextTable(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), SCH_LEGACY_PLUGIN_CACHE::loadCircle(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), CADSTAR_SCH_ARCHIVE_LOADER::loadLibrarySymbolShapeVertices(), FABMASTER::loadOutline(), EAGLE_PLUGIN::loadPlain(), SCH_LEGACY_PLUGIN_CACHE::loadRect(), SCH_EAGLE_PLUGIN::loadSymbolCircle(), SCH_EAGLE_PLUGIN::loadSymbolRectangle(), GRAPHICS_CLEANER::mergeRects(), PCB_SHAPE::NormalizeRect(), EAGLE_PLUGIN::packageCircle(), EAGLE_PLUGIN::packageWire(), SCH_ALTIUM_PLUGIN::ParseArc(), SCH_ALTIUM_PLUGIN::ParseBezier(), SCH_ALTIUM_PLUGIN::ParseEllipse(), GPCB_FPL_CACHE::parseFOOTPRINT(), SCH_ALTIUM_PLUGIN::ParseRectangle(), SCH_ALTIUM_PLUGIN::ParseRoundRectangle(), DRAWING_TOOL::PlaceCharacteristics(), DRAWING_TOOL::PlaceStackup(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotPcbTarget(), PAD_TOOL::RecombinePad(), PCB_TEXTBOX::Rotate(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), PCB_TARGET::TransformShapeToPolygon(), updateArcFromConstructionMgr(), PCB_POINT_EDITOR::updateItem(), EE_POINT_EDITOR::updateParentItem(), and updateSegmentFromGeometryMgr().
|
inline |
Definition at line 161 of file eda_shape.h.
References m_end, m_endsSwapped, and VECTOR2< T >::x.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), PCB_TEXTBOX::SetLeft(), PCB_TEXTBOX::SetRight(), SetRight(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), PCB_TARGET::TransformShapeToPolygon(), and EE_POINT_EDITOR::updateParentItem().
|
inline |
Definition at line 155 of file eda_shape.h.
References m_end, m_endsSwapped, and VECTOR2< T >::y.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), PCB_TEXTBOX::SetBottom(), SetBottom(), PCB_TEXTBOX::SetTop(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), and EE_POINT_EDITOR::updateParentItem().
|
inline |
Definition at line 106 of file eda_shape.h.
References m_fillColor.
Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_ALTIUM_PLUGIN::ParseEllipse(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), SetSchShapeFillAndColor(), DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 95 of file eda_shape.h.
References m_fill.
Referenced by PAD::AddPrimitiveAnnotationBox(), PAD::AddPrimitiveArc(), PAD::AddPrimitiveCircle(), PAD::AddPrimitiveCurve(), PAD::AddPrimitivePoly(), PAD::AddPrimitiveRect(), PAD::AddPrimitiveSegment(), SCH_ALTIUM_PLUGIN::AddTextBox(), ZONE_CREATE_HELPER::commitZone(), ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), MICROWAVE_TOOL::createPolygonShape(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarShape(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawRectangle(), DRAWING_TOOL::drawShape(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PAD_TOOL::explodePad(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), ALTIUM_PCB::HelperParsePad6NonCopper(), FABMASTER::loadGraphics(), EAGLE_PLUGIN::loadPlain(), FABMASTER::loadPolygon(), CONVERT_TOOL::makePolysFromClosedGraphics(), GRAPHICS_CLEANER::mergeRects(), DIALOG_PAD_PROPERTIES::onAddPrimitive(), EAGLE_PLUGIN::packageCircle(), EAGLE_PLUGIN::packagePolygon(), EAGLE_PLUGIN::packageRectangle(), SCH_ALTIUM_PLUGIN::ParseEllipse(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotPcbTarget(), PAD_TOOL::RecombinePad(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), and DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataFromWindow().
|
inline |
Definition at line 100 of file eda_shape.h.
References m_fill.
Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), SCH_LEGACY_PLUGIN_CACHE::loadCircle(), SCH_LEGACY_PLUGIN_CACHE::loadPolyLine(), SCH_LEGACY_PLUGIN_CACHE::loadRect(), SCH_EAGLE_PLUGIN::loadSymbolPolyLine(), SCH_EAGLE_PLUGIN::loadSymbolRectangle(), SCH_EAGLE_PLUGIN::loadSymbolWire(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), CONVERT_TOOL::makePolysFromClosedGraphics(), SCH_ALTIUM_PLUGIN::ParseEllipse(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), SetLibShapeFillAndColor(), SetSchShapeFillAndColor(), DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 88 of file eda_shape.h.
References m_annotationProxy.
Referenced by PAD::AddPrimitiveAnnotationBox(), PAD_TOOL::explodePad(), DIALOG_PAD_PROPERTIES::onAddPrimitive(), and PAD_TOOL::RecombinePad().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 171 of file eda_shape.h.
References SetStartX().
Referenced by PCB_POINT_EDITOR::updateItem().
void EDA_SHAPE::SetPolyPoints | ( | const std::vector< VECTOR2I > & | aPoints | ) |
Definition at line 1085 of file eda_shape.cpp.
References SHAPE_POLY_SET::Append(), m_poly, SHAPE_POLY_SET::NewOutline(), and SHAPE_POLY_SET::RemoveAllContours().
Referenced by PAD::AddPrimitivePoly(), PCAD2KICAD::PCAD_POLYGON::AddToBoard(), MICROWAVE_TOOL::createPolygonShape(), ALTIUM_PCB::HelperParsePad6NonCopper(), EAGLE_PLUGIN::packagePolygon(), EAGLE_PLUGIN::packageRectangle(), scale(), and DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataFromWindow().
|
inline |
Definition at line 255 of file eda_shape.h.
References SHAPE_POLY_SET::Fracture(), SHAPE_POLY_SET::HoleCount(), m_poly, SHAPE_POLY_SET::OutlineCount(), and SHAPE_POLY_SET::PM_FAST.
Referenced by PAD::AddPrimitivePoly(), ZONE_CREATE_HELPER::commitZone(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), CONVERT_TOOL::CreatePolys(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarShape(), PAD_TOOL::explodePad(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), FABMASTER::loadGraphics(), FABMASTER::loadPolygon(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), and PAD_TOOL::RecombinePad().
|
protected |
Definition at line 93 of file eda_shape.cpp.
References getPosition(), and move.
Referenced by LIB_SHAPE::MoveTo(), SCH_SHAPE::SetPosition(), PCB_SHAPE::SetPosition(), and LIB_SHAPE::SetPosition().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 172 of file eda_shape.h.
References SetEndX().
Referenced by PCB_POINT_EDITOR::updateItem().
|
inline |
Definition at line 112 of file eda_shape.h.
References m_shape.
Referenced by PAD::AddPrimitivePoly(), ZONE_CREATE_HELPER::commitZone(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), CONVERT_TOOL::CreatePolys(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), DRAWING_TOOL::DrawRectangle(), DRAWING_TOOL::drawShape(), PAD_TOOL::explodePad(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), ALTIUM_PCB::HelperParsePad6NonCopper(), EAGLE_PLUGIN::loadPlain(), FABMASTER::loadPolygon(), GRAPHICS_CLEANER::mergeRects(), DIALOG_PAD_PROPERTIES::onAddPrimitive(), GPCB_FPL_CACHE::parseFOOTPRINT(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotPcbTarget(), PAD_TOOL::RecombinePad(), and PCB_TEXTBOX::Rotate().
|
inline |
Definition at line 124 of file eda_shape.h.
References m_endsSwapped, and m_start.
Referenced by PCB_POINT_EDITOR::addCorner(), PAD::AddPrimitiveAnnotationBox(), PAD::AddPrimitiveArc(), PAD::AddPrimitiveCircle(), PAD::AddPrimitiveCurve(), PAD::AddPrimitiveRect(), PAD::AddPrimitiveSegment(), SCH_ALTIUM_PLUGIN::AddTextBox(), PCAD2KICAD::PCAD_ARC::AddToBoard(), PCAD2KICAD::PCAD_LINE::AddToBoard(), PCAD2KICAD::PCAD_POLYGON::AddToBoard(), beginEdit(), BOOST_AUTO_TEST_CASE(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertFills6ToFootprintItem(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToBoardItem(), ALTIUM_PCB::ConvertTracks6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToFootprintItem(), ALTIUM_PCB::ConvertTracks6ToFootprintItemOnLayer(), LTSPICE_SCH_PARSER::CreateArc(), MICROWAVE_TOOL::createMicrowaveInductor(), PCB_POINT_EDITOR::editArcEndpointKeepCenter(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), PCB_POINT_EDITOR::editArcMidKeepCenter(), PAD_TOOL::explodePad(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), CADSTAR_PCB_ARCHIVE_LOADER::getShapeFromVertex(), ALTIUM_PCB::HelperCreateBoardOutline(), ALTIUM_PCB::HelperParseDimensions6Datum(), ALTIUM_PCB::HelperParseDimensions6Leader(), ALTIUM_PCB::HelperParsePad6NonCopper(), initTextTable(), SCH_LEGACY_PLUGIN_CACHE::loadArc(), SCH_LEGACY_PLUGIN_CACHE::loadBezier(), SCH_LEGACY_PLUGIN_CACHE::loadCircle(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), CADSTAR_SCH_ARCHIVE_LOADER::loadLibrarySymbolShapeVertices(), FABMASTER::loadOutline(), EAGLE_PLUGIN::loadPlain(), SCH_EAGLE_PLUGIN::loadSymbolWire(), GRAPHICS_CLEANER::mergeRects(), PCB_SHAPE::NormalizeRect(), EAGLE_PLUGIN::packageCircle(), EAGLE_PLUGIN::packageWire(), SCH_ALTIUM_PLUGIN::ParseArc(), SCH_ALTIUM_PLUGIN::ParseBezier(), GPCB_FPL_CACHE::parseFOOTPRINT(), DRAWING_TOOL::PlaceCharacteristics(), DRAWING_TOOL::PlaceStackup(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotPcbTarget(), PAD_TOOL::RecombinePad(), PCB_TEXTBOX::Rotate(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), PCB_TARGET::TransformShapeToPolygon(), updateArcFromConstructionMgr(), PCB_POINT_EDITOR::updateItem(), and updateSegmentFromGeometryMgr().
|
inline |
Definition at line 136 of file eda_shape.h.
References m_endsSwapped, m_start, and VECTOR2< T >::x.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), PCB_TEXTBOX::SetLeft(), SetLeft(), PCB_TEXTBOX::SetRight(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), and EE_POINT_EDITOR::updateParentItem().
|
inline |
Definition at line 130 of file eda_shape.h.
References m_endsSwapped, m_start, and VECTOR2< T >::y.
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), LIB_SHAPE::Normalize(), SCH_SHAPE::Normalize(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), PCB_TEXTBOX::SetBottom(), PCB_TEXTBOX::SetTop(), SetTop(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), and EE_POINT_EDITOR::updateParentItem().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 170 of file eda_shape.h.
References SetStartY().
Referenced by PCB_POINT_EDITOR::updateItem().
|
inline |
Definition at line 108 of file eda_shape.h.
References m_stroke, and STROKE_PARAMS::SetWidth().
Referenced by EDA_SHAPE_DESC::EDA_SHAPE_DESC(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), and FABMASTER::loadOutline().
wxString EDA_SHAPE::SHAPE_T_asString | ( | ) | const |
Definition at line 75 of file eda_shape.cpp.
References m_shape.
Referenced by LIB_SHAPE::AddPoint(), SCH_SHAPE::AddPoint(), BOARD_ADAPTER::addShape(), GRAPHICS_CLEANER::areEquivalent(), beginEdit(), calcEdit(), continueEdit(), ConvertOutlineToPolygon(), endEdit(), PAD_TOOL::explodePad(), flip(), PCB_PLUGIN::format(), getBoundingBox(), getCenter(), PCB_SHAPE::GetCorners(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), GetLength(), LIB_SHAPE::GetMenuImage(), SCH_SHAPE::GetMenuImage(), GetRadius(), hitTest(), IsClosed(), GRAPHICS_CLEANER::isNullShape(), EDIT_POINTS_FACTORY::Make(), makeEffectiveShapes(), PCB_SHAPE::Mirror(), move(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), BRDITEMS_PLOTTER::PlotPcbShape(), SCH_SHAPE::Print(), LIB_SHAPE::print(), SCH_SHAPE::PrintBackground(), PAD_TOOL::RecombinePad(), rotate(), SCH_SEXPR_PLUGIN::saveShape(), SCH_SEXPR_PLUGIN_CACHE::saveSymbolDrawItem(), scale(), SetCenter(), shapeNeedsUpdate(), TransformShapeToPolygon(), EE_POINT_EDITOR::updateParentItem(), EE_POINT_EDITOR::updatePoints(), and DIALOG_GRAPHIC_ITEM_PROPERTIES::Validate().
void EDA_SHAPE::ShapeGetMsgPanelInfo | ( | EDA_DRAW_FRAME * | aFrame, |
std::vector< MSG_PANEL_ITEM > & | aList | ||
) |
Definition at line 626 of file eda_shape.cpp.
References _, std::abs(), GetArcAngle(), GetEnd(), GetFriendlyName(), GetLength(), GetLineLength(), STROKE_PARAMS::GetMsgPanelInfo(), EDA_BASE_FRAME::GetOriginTransforms(), GetPolyShape(), GetRadius(), GetStart(), m_shape, m_stroke, EDA_UNIT_UTILS::UI::MessageTextFromValue(), UNITS_PROVIDER::MessageTextFromValue(), and RADIANS_T.
Referenced by LIB_SHAPE::GetMsgPanelInfo(), SCH_SHAPE::GetMsgPanelInfo(), and PCB_SHAPE::GetMsgPanelInfo().
wxString EDA_SHAPE::ShowShape | ( | ) | const |
Definition at line 57 of file eda_shape.cpp.
References _, IsAnnotationProxy(), and m_shape.
Referenced by DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), PCB_SHAPE::GetItemDescription(), and LIB_SHAPE::GetTypeName().
void EDA_SHAPE::SwapShape | ( | EDA_SHAPE * | aImage | ) |
Definition at line 1446 of file eda_shape.cpp.
References image, m_arcCenter, m_bezierC1, m_bezierC2, m_bezierPoints, m_editState, m_end, m_endsSwapped, m_fill, m_fillColor, m_poly, m_shape, m_start, m_stroke, and SWAPITEM.
Referenced by PCB_SHAPE::swapData(), and SCH_SHAPE::SwapData().
void EDA_SHAPE::TransformShapeToPolygon | ( | SHAPE_POLY_SET & | aBuffer, |
int | aClearance, | ||
int | aError, | ||
ERROR_LOC | aErrorLoc, | ||
bool | ignoreLineWidth = false |
||
) | const |
Convert the shape to a closed polygon.
Circles and arcs are approximated by segments.
aBuffer | is a buffer to store the polygon. |
aClearance | is the clearance around the pad. |
aError | is the maximum deviation from a true arc. |
aErrorLoc | whether any approximation error shoule be placed inside or outside |
ignoreLineWidth | is used for edge cut items where the line width is only for visualization |
Definition at line 1510 of file eda_shape.cpp.
References SEG::A, SHAPE_POLY_SET::Append(), SEG::B, GetArcMid(), GetBezierC1(), GetBezierC2(), getCenter(), GetEnd(), SHAPE_LINE_CHAIN::GetPoint(), SHAPE_LINE_CHAIN::GetPointCount(), BEZIER_POLY::GetPoly(), GetRadius(), GetRectCorners(), SHAPE_LINE_CHAIN::GetSegment(), GetStart(), GetWidth(), IsAnnotationProxy(), IsFilled(), IsPolyShapeValid(), m_poly, m_shape, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_T_asString(), TransformArcToPolygon(), TransformCircleToPolygon(), TransformOvalToPolygon(), TransformRingToPolygon(), and UNIMPLEMENTED_FOR.
Referenced by PCB_SHAPE::TransformShapeToPolygon().
|
protected |
Definition at line 378 of file eda_shape.h.
Referenced by IsAnnotationProxy(), and SetIsAnnotationProxy().
|
protected |
Definition at line 368 of file eda_shape.h.
Referenced by calcEdit(), Compare(), computeArcBBox(), flip(), GetArcMid(), getCenter(), GetRadius(), makeEffectiveShapes(), PCB_SHAPE::Mirror(), move(), rotate(), scale(), SetArcAngleAndEnd(), SetArcGeometry(), SetCenter(), and SwapShape().
|
protected |
Definition at line 369 of file eda_shape.h.
Referenced by GetArcMid(), SetArcGeometry(), and SetCachedArcData().
|
protected |
Definition at line 371 of file eda_shape.h.
Referenced by buildBezierToSegmentsPointsList(), Compare(), flip(), GetBezierC1(), PCB_SHAPE::Mirror(), move(), rotate(), scale(), SetBezierC1(), and SwapShape().
|
protected |
Definition at line 372 of file eda_shape.h.
Referenced by buildBezierToSegmentsPointsList(), Compare(), flip(), GetBezierC2(), PCB_SHAPE::Mirror(), move(), rotate(), scale(), SetBezierC2(), and SwapShape().
|
protected |
Definition at line 374 of file eda_shape.h.
Referenced by Compare(), flip(), GetBezierPoints(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), GetLength(), hitTest(), IsClosed(), move(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), SCH_SHAPE::Print(), LIB_SHAPE::print(), SCH_SHAPE::PrintBackground(), RebuildBezierToSegmentsPointsList(), rotate(), and SwapShape().
|
protected |
Definition at line 377 of file eda_shape.h.
Referenced by beginEdit(), calcEdit(), LIB_SHAPE::LIB_SHAPE(), setEditState(), and SwapShape().
|
protected |
Definition at line 366 of file eda_shape.h.
Referenced by buildBezierToSegmentsPointsList(), calcEdit(), Compare(), computeArcBBox(), flip(), PCB_TEXTBOX::Flip(), GetArcMid(), getCenter(), LIB_TEXTBOX::GetDrawPos(), SCH_TEXTBOX::GetDrawPos(), GetEnd(), GetEndX(), GetEndY(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), GetRadius(), hitTest(), makeEffectiveShapes(), PCB_SHAPE::Mirror(), PCB_TEXTBOX::Mirror(), move(), SCH_TEXTBOX::Plot(), LIB_SHAPE::Plot(), LIB_TEXTBOX::Plot(), LIB_SHAPE::print(), LIB_TEXTBOX::print(), rotate(), scale(), SetArcAngleAndEnd(), SetArcGeometry(), SetEnd(), SetEndX(), SetEndY(), and SwapShape().
|
protected |
Definition at line 359 of file eda_shape.h.
Referenced by EndsSwapped(), SetArcAngleAndEnd(), SetArcGeometry(), SetEnd(), SetEndX(), SetEndY(), SetStart(), SetStartX(), SetStartY(), and SwapShape().
|
protected |
Definition at line 362 of file eda_shape.h.
Referenced by Compare(), GetFillMode(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), SetFilled(), SetFillMode(), and SwapShape().
|
protected |
Definition at line 363 of file eda_shape.h.
Referenced by GetFillColor(), SetFillColor(), and SwapShape().
|
protected |
Definition at line 375 of file eda_shape.h.
Referenced by LIB_SHAPE::AddPoint(), SCH_SHAPE::AddPoint(), beginEdit(), calcEdit(), Compare(), continueEdit(), DupPolyPointsList(), endEdit(), flip(), getBoundingBox(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), GetLength(), GetPolyShape(), getPosition(), hitTest(), IsClosed(), PCB_SHAPE::Mirror(), move(), SCH_SHAPE::Plot(), LIB_SHAPE::Plot(), SCH_SHAPE::Print(), LIB_SHAPE::print(), SCH_SHAPE::PrintBackground(), rotate(), scale(), SetPolyPoints(), SetPolyShape(), SwapShape(), TransformShapeToPolygon(), and PCB_TEXTBOX::TransformShapeToPolygon().
|
protected |
Definition at line 360 of file eda_shape.h.
Referenced by Compare(), flip(), getBoundingBox(), getCenter(), PCB_SHAPE::GetFocusPosition(), GetFriendlyName(), GetLength(), getPosition(), GetRadius(), GetShape(), hitTest(), IsClosed(), PCB_SHAPE::IsType(), makeEffectiveShapes(), move(), PCB_SHAPE::NormalizeRect(), RebuildBezierToSegmentsPointsList(), rotate(), scale(), SetCenter(), SetShape(), SHAPE_T_asString(), ShapeGetMsgPanelInfo(), ShowShape(), SwapShape(), and TransformShapeToPolygon().
|
protected |
Definition at line 365 of file eda_shape.h.
Referenced by buildBezierToSegmentsPointsList(), calcEdit(), Compare(), computeArcBBox(), flip(), PCB_TEXTBOX::Flip(), GetArcMid(), getCenter(), LIB_TEXTBOX::GetDrawPos(), SCH_TEXTBOX::GetDrawPos(), LIB_SHAPE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), getPosition(), GetRadius(), GetStart(), GetStartX(), GetStartY(), hitTest(), makeEffectiveShapes(), PCB_SHAPE::Mirror(), PCB_TEXTBOX::Mirror(), move(), SCH_TEXTBOX::Plot(), LIB_SHAPE::Plot(), LIB_TEXTBOX::Plot(), LIB_SHAPE::print(), LIB_TEXTBOX::print(), rotate(), scale(), SetArcAngleAndEnd(), SetArcGeometry(), SetCenter(), SetStart(), SetStartX(), SetStartY(), and SwapShape().
|
protected |
Definition at line 361 of file eda_shape.h.
Referenced by Compare(), flip(), LIB_SHAPE::GetEffectiveLineStyle(), SCH_SHAPE::GetEffectiveLineStyle(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), SCH_SHAPE::GetPenWidth(), LIB_SHAPE::GetStroke(), SCH_SHAPE::GetStroke(), PCB_SHAPE::GetStroke(), GetWidth(), LIB_SHAPE::SetStroke(), SCH_SHAPE::SetStroke(), PCB_SHAPE::SetStroke(), SetWidth(), ShapeGetMsgPanelInfo(), and SwapShape().