108 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
142 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_LINE" ); }
154 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
161 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
180 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_POLYPOLYGONS" ); }
188 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
189 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
196 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
229 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_RECT" ); }
243 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
244 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
249 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
275 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_PAGE" ); }
291 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override {
return false; }
296 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
318 bool aItalic =
false,
bool aBold =
false,
332 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_TEXT" ); }
343 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
344 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
349 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
371 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_BITMAP" ); }
378 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
379 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
386 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
Drawing sheet structure type definitions.
Base class to handle basic graphic items.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
virtual void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset)=0
const BOX2I GetBoundingBox() const override=0
Return the orthogonal bounding box of this object for display purposes.
int GetIndexInPeer() const
virtual void SetEnd(const VECTOR2I &aPos)
virtual int GetPenWidth() const
virtual void PrintWsItem(const RENDER_SETTINGS *aSettings)
virtual const BOX2I GetApproxBBox()
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
DS_DATA_ITEM * GetPeer() const
DS_DRAW_ITEM_BASE(DS_DATA_ITEM *aPeer, int aIndex, KICAD_T aType)
const KIFONT::METRICS & GetFontMetrics() const
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
virtual ~DS_DRAW_ITEM_BASE()
virtual wxString GetClass() const override
Return the class name.
VECTOR2I GetPosition() const override
DS_DRAW_ITEM_BITMAP(DS_DATA_ITEM *aPeer, int aIndex, VECTOR2I aPos)
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
void SetPosition(const VECTOR2I &aPos) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
virtual wxString GetClass() const override
Return the class name.
void SetEnd(const VECTOR2I &aPos) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
void SetStart(const VECTOR2I &aPos)
const VECTOR2I & GetStart() const
VECTOR2I GetPosition() const override
DS_DRAW_ITEM_LINE(DS_DATA_ITEM *aPeer, int aIndex, VECTOR2I aStart, VECTOR2I aEnd, int aPenWidth)
void SetPosition(const VECTOR2I &aPos) override
const VECTOR2I & GetEnd() const
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
void SetPlotterMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to plot units.
void SetTitleBlock(const TITLE_BLOCK *aTblock)
Set the title block (mainly for drawing sheet editor)
int m_sheetCount
The number of sheets.
DS_DRAW_ITEM_BASE * GetFirst()
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
int GetDefaultPenSize() const
void SetSheetPath(const wxString &aSheetPath)
Set the sheet path to draw/plot.
static void GetTextVars(wxArrayString *aVars)
const std::map< wxString, wxString > * m_properties
const EDA_IU_SCALE & GetIuScale() const
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
void SetDefaultPenSize(int aPenSize)
wxString BuildFullText(const wxString &aTextbase)
void Print(const RENDER_SETTINGS *aSettings)
Draws the item list created by BuildDrawItemsList.
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
void SetProperties(const std::map< wxString, wxString > *aProps)
Set properties used for text variable resolution.
const TITLE_BLOCK * m_titleBlock
const PROJECT * m_project
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
bool m_isFirstPage
Is this the first page or not.
void Append(DS_DRAW_ITEM_BASE *aItem)
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
double GetMilsToIUfactor()
Get the scalar to convert pages units (mils) to draw/plot units.
std::vector< DS_DRAW_ITEM_BASE * > m_graphicList
DS_DRAW_ITEM_BASE * GetNext()
wxString m_pageNumber
The actual page number displayed in the title block.
void Remove(DS_DRAW_ITEM_BASE *aItem)
DS_DRAW_ITEM_LIST(const EDA_IU_SCALE &aIuScale, int aFlags=0)
void SetPaperFormat(const wxString &aFormatName)
Set the paper format name (mainly for drawing sheet editor)
const EDA_IU_SCALE & m_iuScale
void SetProject(const PROJECT *aProject)
A rectangle with thick segment showing the page limits and a marker showing the coordinate origin.
const VECTOR2I & GetMarkerPos() const
double GetMarkerSize() const
void SetPageSize(const VECTOR2I &aSize)
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void SetPosition(const VECTOR2I &aPos) override
DS_DRAW_ITEM_PAGE(int aPenWidth, double aMarkerSize)
void PrintWsItem(const RENDER_SETTINGS *, const VECTOR2I &) override
virtual wxString GetClass() const override
Return the class name.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
void SetMarkerPos(const VECTOR2I &aPos)
VECTOR2I GetPageSize() const
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
VECTOR2I GetPosition() const override
SHAPE_POLY_SET m_Polygons
The list of polygons.
virtual wxString GetClass() const override
Return the class name.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
VECTOR2I GetPosition() const override
SHAPE_POLY_SET & GetPolygons()
void SetPosition(const VECTOR2I &aPos) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
DS_DRAW_ITEM_POLYPOLYGONS(DS_DATA_ITEM *aPeer, int aIndex, VECTOR2I aPos, int aPenWidth)
Non filled rectangle with thick segment.
const VECTOR2I & GetEnd() const
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
const VECTOR2I & GetStart() const
virtual wxString GetClass() const override
Return the class name.
VECTOR2I GetPosition() const override
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
void SetEnd(const VECTOR2I &aPos) override
void SetPosition(const VECTOR2I &aPos) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
DS_DRAW_ITEM_RECT(DS_DATA_ITEM *aPeer, int aIndex, VECTOR2I aStart, VECTOR2I aEnd, int aPenWidth)
void SetStart(const VECTOR2I &aPos)
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
DS_DRAW_ITEM_TEXT(const EDA_IU_SCALE &aIuScale, DS_DATA_ITEM *aPeer, int aIndex, const wxString &aText, const VECTOR2I &aPos, const VECTOR2I &aSize, int aPenWidth, KIFONT::FONT *aFont, bool aItalic=false, bool aBold=false, const KIGFX::COLOR4D &aColor=KIGFX::COLOR4D::UNSPECIFIED)
const KIFONT::METRICS & getFontMetrics() const override
void SetPosition(const VECTOR2I &aPos) override
virtual wxString GetClass() const override
Return the class name.
virtual const BOX2I GetApproxBBox() override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
VECTOR2I GetPosition() const override
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const
Test if aPosition is inside or on the boundary of this item.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
void SetTextColor(const COLOR4D &aColor)
const VECTOR2I & GetTextPos() const
void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true)
void SetTextPos(const VECTOR2I &aPoint)
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
void SetBold(bool aBold)
Set the text to be bold - this will also update the font if needed.
void SetItalic(bool aItalic)
Set the text to be italic - this will also update the font if needed.
void SetFont(KIFONT::FONT *aFont)
FONT is an abstract base class for both outline and stroke fonts.
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Describe the page size and margins of a paper page on which to eventually print or plot.
Container for project specific data.
Represent a set of closed polygons.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Message panel definition file.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
VECTOR2< int32_t > VECTOR2I