KiCad PCB EDA Suite
|
#include <ds_data_item.h>
Public Types | |
enum | DS_ITEM_TYPE { DS_TEXT , DS_SEGMENT , DS_RECT , DS_POLYPOLYGON , DS_BITMAP } |
Public Member Functions | |
DS_DATA_ITEM_POLYGONS () | |
void | SyncDrawItems (DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override |
virtual int | GetPenSizeIU () override |
void | AppendCorner (const VECTOR2D &aCorner) |
Add a corner in corner list. | |
void | CloseContour () |
Close the current contour, by storing the index of the last corner of the current polygon in m_polyIndexEnd. | |
int | GetPolyCount () const |
unsigned | GetPolyIndexStart (unsigned aContour) const |
unsigned | GetPolyIndexEnd (unsigned aContour) const |
const VECTOR2D | GetCornerPosition (unsigned aIdx, int aRepeat=0) const |
const VECTOR2I | GetCornerPositionIU (unsigned aIdx, int aRepeat=0) const |
void | SetBoundingBox () |
Calculate the bounding box of the set polygons. | |
bool | IsInsidePage (int ii) const override |
const std::vector< DS_DRAW_ITEM_BASE * > & | GetDrawItems () const |
void | SetStart (double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor=RB_CORNER) |
void | SetEnd (double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor=RB_CORNER) |
DS_ITEM_TYPE | GetType () const |
PAGE_OPTION | GetPage1Option () const |
void | SetPage1Option (PAGE_OPTION aChoice) |
const VECTOR2I | GetStartPosIU (int ii=0) const |
const VECTOR2I | GetEndPosIU (int ii=0) const |
const VECTOR2D | GetStartPos (int ii=0) const |
const VECTOR2D | GetEndPos (int ii=0) const |
void | MoveTo (const VECTOR2D &aPosition) |
Move item to a new position. | |
void | MoveToIU (const VECTOR2I &aPosition) |
Move item to a new position. | |
void | MoveStartPointTo (const VECTOR2D &aPosition) |
Move the starting point of the item to a new position. | |
void | MoveStartPointToIU (const VECTOR2I &aPosition) |
Move the starting point of the item to a new position. | |
void | MoveEndPointTo (const VECTOR2D &aPosition) |
Move the ending point of the item to a new position. | |
void | MoveEndPointToIU (const VECTOR2I &aPosition) |
Move the ending point of the item to a new position. | |
const wxString | GetClassName () const |
Public Attributes | |
EDA_ANGLE | m_Orient |
std::vector< VECTOR2D > | m_Corners |
wxString | m_Name |
wxString | m_Info |
POINT_COORD | m_Pos |
POINT_COORD | m_End |
double | m_LineWidth |
int | m_RepeatCount |
VECTOR2D | m_IncrementVector |
int | m_IncrementLabel |
Protected Attributes | |
DS_ITEM_TYPE | m_type |
PAGE_OPTION | m_pageOption |
std::vector< DS_DRAW_ITEM_BASE * > | m_drawItems |
Private Attributes | |
std::vector< unsigned > | m_polyIndexEnd |
VECTOR2D | m_minCoord |
VECTOR2D | m_maxCoord |
Definition at line 215 of file ds_data_item.h.
|
inherited |
Enumerator | |
---|---|
DS_TEXT | |
DS_SEGMENT | |
DS_RECT | |
DS_POLYPOLYGON | |
DS_BITMAP |
Definition at line 98 of file ds_data_item.h.
DS_DATA_ITEM_POLYGONS::DS_DATA_ITEM_POLYGONS | ( | ) |
Definition at line 376 of file ds_data_item.cpp.
|
inline |
Add a corner in corner list.
aCorner | is the item to append. |
Definition at line 229 of file ds_data_item.h.
References m_Corners.
Referenced by DRAWING_SHEET_PARSER::parsePolyOutline().
|
inline |
Close the current contour, by storing the index of the last corner of the current polygon in m_polyIndexEnd.
Definition at line 238 of file ds_data_item.h.
References m_Corners, and m_polyIndexEnd.
Referenced by DRAWING_SHEET_PARSER::parsePolygon().
|
inherited |
Definition at line 359 of file ds_data_item.cpp.
References _, DS_DATA_ITEM::DS_BITMAP, DS_DATA_ITEM::DS_POLYPOLYGON, DS_DATA_ITEM::DS_RECT, DS_DATA_ITEM::DS_SEGMENT, DS_DATA_ITEM::DS_TEXT, DS_DATA_ITEM::GetType(), and name.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel().
const VECTOR2D DS_DATA_ITEM_POLYGONS::GetCornerPosition | ( | unsigned | aIdx, |
int | aRepeat = 0 |
||
) | const |
Definition at line 443 of file ds_data_item.cpp.
References DS_DATA_ITEM::GetStartPos(), m_Corners, m_Orient, RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GetCornerPositionIU().
const VECTOR2I DS_DATA_ITEM_POLYGONS::GetCornerPositionIU | ( | unsigned | aIdx, |
int | aRepeat = 0 |
||
) | const |
Definition at line 508 of file ds_data_item.cpp.
References GetCornerPosition(), DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SyncDrawItems().
|
inlineinherited |
Definition at line 110 of file ds_data_item.h.
References DS_DATA_ITEM::m_drawItems.
Referenced by PL_EDIT_TOOL::DoDelete(), PL_DRAWING_TOOLS::DrawShape(), DS_PROXY_UNDO_ITEM::DS_PROXY_UNDO_ITEM(), PL_EDIT_TOOL::moveItem(), DIALOG_INSPECTOR::onCellClicked(), PL_DRAWING_TOOLS::PlaceItem(), DS_PROXY_UNDO_ITEM::Restore(), and PL_POINT_EDITOR::updateItem().
|
inherited |
Definition at line 304 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_ITEM::m_End, DS_DATA_ITEM::m_IncrementVector, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DATA_ITEM::GetEndPosIU(), DS_DATA_ITEM::IsInsidePage(), and DS_DATA_ITEM::MoveTo().
|
inherited |
Definition at line 334 of file ds_data_item.cpp.
References DS_DATA_ITEM::GetEndPos(), DS_DATA_MODEL::GetTheInstance(), KiROUND(), DS_DATA_MODEL::m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DATA_ITEM::MoveTo(), DS_DATA_ITEM::SyncDrawItems(), and PL_POINT_EDITOR::updateItem().
|
inlineinherited |
Definition at line 133 of file ds_data_item.h.
References DS_DATA_ITEM::m_pageOption.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), DS_DATA_MODEL_IO::formatOptions(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), and DS_DRAW_ITEM_BASE::ViewGetLayers().
|
overridevirtual |
Reimplemented from DS_DATA_ITEM.
Definition at line 437 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), KiROUND(), and DS_DATA_ITEM::m_LineWidth.
Referenced by SyncDrawItems().
|
inline |
Definition at line 246 of file ds_data_item.h.
References m_polyIndexEnd.
Referenced by DS_DATA_MODEL_IO::format(), and SyncDrawItems().
|
inline |
aContour | is the index of the contour. |
Definition at line 264 of file ds_data_item.h.
References m_polyIndexEnd.
Referenced by DS_DATA_MODEL_IO::format(), and SyncDrawItems().
|
inline |
aContour | is the index of the contour. |
Definition at line 252 of file ds_data_item.h.
References m_polyIndexEnd.
Referenced by DS_DATA_MODEL_IO::format(), and SyncDrawItems().
|
inherited |
Definition at line 266 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_ITEM::m_IncrementVector, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_ITEM::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GetCornerPosition(), DS_DATA_ITEM::GetStartPosIU(), DS_DATA_ITEM::IsInsidePage(), IsInsidePage(), and DS_DATA_ITEM::MoveTo().
|
inherited |
Definition at line 297 of file ds_data_item.cpp.
References DS_DATA_ITEM::GetStartPos(), DS_DATA_MODEL::GetTheInstance(), KiROUND(), DS_DATA_MODEL::m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_EDIT_TOOL::moveItem(), DS_DATA_ITEM::MoveTo(), PL_DRAWING_TOOLS::PlaceItem(), DS_DATA_ITEM::SyncDrawItems(), SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), and PL_POINT_EDITOR::updateItem().
|
inlineinherited |
Definition at line 128 of file ds_data_item.h.
References DS_DATA_ITEM::m_type.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::Format(), DS_DATA_MODEL_IO::format(), DS_DATA_MODEL_IO::formatRepeatParameters(), DS_DATA_ITEM::GetClassName(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DS_DATA_ITEM::MoveEndPointTo(), and PL_DRAWING_TOOLS::PlaceItem().
|
overridevirtual |
Reimplemented from DS_DATA_ITEM.
Definition at line 488 of file ds_data_item.cpp.
References DS_DATA_ITEM::GetStartPos(), DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_LT_Corner, m_maxCoord, m_minCoord, DS_DATA_MODEL::m_RB_Corner, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SyncDrawItems().
|
inherited |
Move the ending point of the item to a new position.
This has meaning only for items defined by 2 points (segments and rectangles).
aPosition | is the new position of the ending point, in mm. |
Definition at line 213 of file ds_data_item.cpp.
References DS_DATA_ITEM::DS_RECT, DS_DATA_ITEM::DS_SEGMENT, DS_DATA_MODEL::GetTheInstance(), DS_DATA_ITEM::GetType(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_ITEM::m_End, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DATA_ITEM::MoveEndPointToIU(), and DS_DATA_ITEM::MoveTo().
|
inherited |
Move the ending point of the item to a new position.
This has meaning only for items defined by 2 points (segments and rectangles).
aPosition | is the new position of the ending point in graphic units |
Definition at line 256 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, DS_DATA_ITEM::MoveEndPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_POINT_EDITOR::updateItem().
|
inherited |
Move the starting point of the item to a new position.
aPosition | the new position of the starting point, in mm. |
Definition at line 171 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_ITEM::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DATA_ITEM::MoveStartPointToIU(), and DS_DATA_ITEM::MoveTo().
|
inherited |
Move the starting point of the item to a new position.
aPosition | is the new position of item in graphic units. |
Definition at line 204 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, DS_DATA_ITEM::MoveStartPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_DRAWING_TOOLS::PlaceItem(), and PL_POINT_EDITOR::updateItem().
|
inherited |
Move item to a new position.
aPosition | the new position of item, in mm. |
Definition at line 155 of file ds_data_item.cpp.
References DS_DATA_ITEM::GetEndPos(), DS_DATA_ITEM::GetEndPosIU(), DS_DATA_ITEM::GetStartPos(), DS_DATA_ITEM::GetStartPosIU(), DS_DATA_ITEM::m_drawItems, DS_DATA_ITEM::MoveEndPointTo(), and DS_DATA_ITEM::MoveStartPointTo().
Referenced by DS_DATA_ITEM::MoveToIU().
|
inherited |
Move item to a new position.
aPosition | the new position of the starting point in graphic units. |
Definition at line 145 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, DS_DATA_ITEM::MoveTo(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_DRAWING_TOOLS::DrawShape(), and PL_EDIT_TOOL::moveItem().
void DS_DATA_ITEM_POLYGONS::SetBoundingBox | ( | ) |
Calculate the bounding box of the set polygons.
Definition at line 454 of file ds_data_item.cpp.
References m_Corners, m_maxCoord, m_minCoord, m_Orient, RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DRAWING_SHEET_PARSER::parsePolygon().
|
inlineinherited |
Definition at line 121 of file ds_data_item.h.
References POINT_COORD::m_Anchor, DS_DATA_ITEM::m_End, POINT_COORD::m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inlineinherited |
Definition at line 134 of file ds_data_item.h.
References DS_DATA_ITEM::m_pageOption.
Referenced by PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), and DRAWING_SHEET_PARSER::readOption().
|
inlineinherited |
Definition at line 114 of file ds_data_item.h.
References POINT_COORD::m_Anchor, POINT_COORD::m_Pos, DS_DATA_ITEM::m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
Reimplemented from DS_DATA_ITEM.
Definition at line 382 of file ds_data_item.cpp.
References KIGFX::VIEW::Add(), DS_DRAW_ITEM_LIST::Append(), SHAPE_POLY_SET::Append(), GetCornerPositionIU(), EDA_ITEM::GetFlags(), GetPenSizeIU(), GetPolyCount(), GetPolyIndexEnd(), GetPolyIndexStart(), DS_DATA_ITEM::GetStartPosIU(), IsInsidePage(), DS_DATA_ITEM::m_drawItems, DS_DATA_ITEM::m_RepeatCount, SHAPE_POLY_SET::NewOutline(), DS_DRAW_ITEM_LIST::Remove(), and KIGFX::VIEW::Remove().
std::vector<VECTOR2D> DS_DATA_ITEM_POLYGONS::m_Corners |
Definition at line 288 of file ds_data_item.h.
Referenced by AppendCorner(), CloseContour(), DS_DATA_MODEL_IO::format(), GetCornerPosition(), and SetBoundingBox().
|
protectedinherited |
Definition at line 211 of file ds_data_item.h.
Referenced by DS_DATA_ITEM::GetDrawItems(), DS_DATA_ITEM::MoveTo(), DS_DATA_ITEM::SyncDrawItems(), SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), and DS_DATA_ITEM::~DS_DATA_ITEM().
|
inherited |
Definition at line 201 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), DS_DATA_ITEM::GetEndPos(), DS_DATA_ITEM::MoveEndPointTo(), DRAWING_SHEET_PARSER::parseGraphic(), and DS_DATA_ITEM::SetEnd().
|
inherited |
Definition at line 205 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_ITEM::DS_DATA_ITEM(), DS_DATA_ITEM_TEXT::DS_DATA_ITEM_TEXT(), DS_DATA_MODEL_IO::formatRepeatParameters(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DRAWING_SHEET_PARSER::parseText(), and DS_DATA_ITEM_TEXT::SyncDrawItems().
|
inherited |
Definition at line 204 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::formatRepeatParameters(), DS_DATA_ITEM::GetEndPos(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DS_DATA_ITEM::GetStartPos(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
|
inherited |
Definition at line 199 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
|
inherited |
Definition at line 202 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_ITEM::DS_DATA_ITEM(), DS_DATA_ITEM_TEXT::DS_DATA_ITEM_TEXT(), DS_DATA_MODEL_IO::format(), DS_DATA_ITEM::GetPenSizeIU(), GetPenSizeIU(), DS_DATA_ITEM_TEXT::GetPenSizeIU(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
|
private |
Definition at line 293 of file ds_data_item.h.
Referenced by IsInsidePage(), and SetBoundingBox().
|
private |
Definition at line 292 of file ds_data_item.h.
Referenced by IsInsidePage(), and SetBoundingBox().
|
inherited |
Definition at line 198 of file ds_data_item.h.
Referenced by DS_DATA_MODEL_IO::format(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
EDA_ANGLE DS_DATA_ITEM_POLYGONS::m_Orient |
Definition at line 287 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), GetCornerPosition(), DRAWING_SHEET_PARSER::parsePolygon(), and SetBoundingBox().
|
protectedinherited |
Definition at line 209 of file ds_data_item.h.
Referenced by DS_DATA_ITEM::DS_DATA_ITEM(), DS_DATA_ITEM::GetPage1Option(), and DS_DATA_ITEM::SetPage1Option().
|
private |
Definition at line 291 of file ds_data_item.h.
Referenced by CloseContour(), GetPolyCount(), GetPolyIndexEnd(), and GetPolyIndexStart().
|
inherited |
Definition at line 200 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), DS_DATA_ITEM::GetStartPos(), DS_DATA_ITEM::MoveStartPointTo(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), DRAWING_SHEET_PARSER::parseText(), and DS_DATA_ITEM::SetStart().
|
inherited |
Definition at line 203 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_ITEM::DS_DATA_ITEM(), DS_DATA_MODEL_IO::formatRepeatParameters(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), DRAWING_SHEET_PARSER::parseText(), DS_DATA_ITEM::SyncDrawItems(), SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and DS_DATA_ITEM_BITMAP::SyncDrawItems().
|
protectedinherited |
Definition at line 208 of file ds_data_item.h.
Referenced by DS_DATA_ITEM::DS_DATA_ITEM(), DS_DATA_ITEM::GetType(), and DS_DATA_ITEM::SyncDrawItems().