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_BITMAP (BITMAP_BASE *aImage) | |
void | SyncDrawItems (DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override |
int | GetPPI () const |
void | SetPPI (int aBitmapPPI) |
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 |
virtual int | GetPenSizeIU () |
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. | |
virtual bool | IsInsidePage (int ii) const |
const wxString | GetClassName () const |
Public Attributes | |
BITMAP_BASE * | m_ImageBitmap |
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 |
Definition at line 355 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.
|
inline |
Definition at line 358 of file ds_data_item.h.
References m_ImageBitmap.
|
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().
|
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().
|
virtualinherited |
Reimplemented in DS_DATA_ITEM_POLYGONS, and DS_DATA_ITEM_TEXT.
Definition at line 134 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), KiROUND(), DS_DATA_MODEL::m_DefaultLineWidth, DS_DATA_ITEM::m_LineWidth, and DS_DATA_MODEL::m_WSunits2Iu.
Referenced by DS_DATA_ITEM::SyncDrawItems().
int DS_DATA_ITEM_BITMAP::GetPPI | ( | ) | const |
Definition at line 765 of file ds_data_item.cpp.
References BITMAP_BASE::GetPPI(), BITMAP_BASE::GetScale(), and m_ImageBitmap.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel().
|
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 DS_DATA_ITEM_POLYGONS::GetCornerPosition(), DS_DATA_ITEM::GetStartPosIU(), DS_DATA_ITEM::IsInsidePage(), DS_DATA_ITEM_POLYGONS::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(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), 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().
|
virtualinherited |
Reimplemented in DS_DATA_ITEM_POLYGONS.
Definition at line 342 of file ds_data_item.cpp.
References DS_DATA_ITEM::GetEndPos(), DS_DATA_ITEM::GetStartPos(), DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_LT_Corner, DS_DATA_MODEL::m_RB_Corner, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and 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().
|
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().
void DS_DATA_ITEM_BITMAP::SetPPI | ( | int | aBitmapPPI | ) |
Definition at line 774 of file ds_data_item.cpp.
References BITMAP_BASE::GetPPI(), m_ImageBitmap, and BITMAP_BASE::SetScale().
Referenced by PROPERTIES_FRAME::CopyPrmsFromPanelToItem().
|
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 716 of file ds_data_item.cpp.
References KIGFX::VIEW::Add(), DS_DRAW_ITEM_LIST::Append(), EDA_ITEM::GetFlags(), DS_DRAW_ITEM_LIST::GetMilsToIUfactor(), BITMAP_BASE::GetOriginalImageData(), BITMAP_BASE::GetPPI(), DS_DATA_ITEM::GetStartPosIU(), DS_DATA_ITEM::IsInsidePage(), DS_DATA_ITEM::m_drawItems, m_ImageBitmap, DS_DATA_ITEM::m_RepeatCount, DS_DRAW_ITEM_LIST::Remove(), KIGFX::VIEW::Remove(), EDA_ITEM::SetFlags(), and BITMAP_BASE::SetPixelSizeIu().
|
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(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), 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().
BITMAP_BASE* DS_DATA_ITEM_BITMAP::m_ImageBitmap |
Definition at line 370 of file ds_data_item.h.
Referenced by DS_DATA_ITEM_BITMAP(), DS_DATA_MODEL_IO::format(), DS_DRAW_ITEM_BITMAP::GetBoundingBox(), GetPPI(), DRAWING_SHEET_PARSER::parseBitmap(), PlotDrawingSheet(), DS_DRAW_ITEM_BITMAP::PrintWsItem(), DRAWING_SHEET_PARSER::readPngdata(), SetPPI(), and SyncDrawItems().
|
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(), DS_DATA_ITEM_POLYGONS::GetPenSizeIU(), DS_DATA_ITEM_TEXT::GetPenSizeIU(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
|
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().
|
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().
|
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(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and 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().