40 const std::map<wxString, wxString>* aProperties ) :
42 m_iuScale( aIuScale ),
43 m_titleBlock( aTitleBlock ),
44 m_pageInfo( aPageInfo ),
47 m_isFirstPage( false ),
48 m_project( aProject ),
49 m_properties( aProperties ),
76 const std::map<wxString, wxString>* aProperties,
80 wxString fileName(
m_fileName.c_str(), wxConvUTF8 );
81 wxString sheetName(
m_sheetName.c_str(), wxConvUTF8 );
82 wxString sheetPath(
m_sheetPath.c_str(), wxConvUTF8 );
137 if( viewport.
Intersects( item->GetApproxBBox() ) )
159 int accuracy = (int) aView->
ToWorld( 5.0 );
166 if( item->HitTest( aPosition, accuracy ) )
constexpr BOX2I BOX2ISafe(const BOX2D &aInput)
constexpr void SetMaximum()
constexpr void SetOrigin(const Vec &pos)
constexpr size_type GetWidth() const
constexpr coord_type GetLeft() const
constexpr void SetEnd(coord_type x, coord_type y)
constexpr coord_type GetTop() const
constexpr bool Intersects(const BOX2< Vec > &aRect) const
Base class to handle basic graphic items.
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
DS_DRAW_ITEM_BASE * GetFirst()
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void SetSheetPath(const wxString &aSheetPath)
Set the sheet path to draw/plot.
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
void SetDefaultPenSize(int aPenSize)
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.
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.
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
DS_DRAW_ITEM_BASE * GetNext()
void SetProject(const PROJECT *aProject)
const PROJECT * m_project
int m_colorLayer
Layer that is used for drawing sheet color (LAYER_DRAWINGSHEET is always used for visibility)
const BOX2I ViewBBox() const override
const TITLE_BLOCK * m_titleBlock
const EDA_IU_SCALE & m_iuScale
const std::map< wxString, wxString > * m_properties
bool HitTestDrawingSheetItems(KIGFX::VIEW *aView, const VECTOR2I &aPosition)
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
DS_PROXY_VIEW_ITEM(const EDA_IU_SCALE &aIuScale, const PAGE_INFO *aPageInfo, const PROJECT *aProject, const TITLE_BLOCK *aTitleBlock, const std::map< wxString, wxString > *aProperties)
void buildDrawList(KIGFX::VIEW *aView, const std::map< wxString, wxString > *aProperties, DS_DRAW_ITEM_LIST *aDrawList) const
const PAGE_INFO * m_pageInfo
void ViewGetLayers(int aLayers[], int &aCount) const override
int m_pageBorderColorLayer
Layer that is used for page border color.
A base class for most all the KiCad significant classes used in schematics and boards.
Methods for painting drawing sheet items.
void DrawBorder(const PAGE_INFO *aPageInfo, int aScaleFactor) const
virtual RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
virtual bool Draw(const VIEW_ITEM *, int) override
Takes an instance of VIEW_ITEM and passes it to a function that knows how to draw the item.
Store page-layout-specific render settings.
void SetNormalColor(const COLOR4D &aColor)
Abstract interface for drawing on a 2D-surface.
virtual void Translate(const VECTOR2D &aTranslation)
Translate the context.
virtual void Restore()
Restore the context.
virtual void Scale(const VECTOR2D &aScale)
Scale the context.
virtual void Save()
Save the context.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
float GetDrawingSheetLineWidth() const
const wxString & GetDefaultFont() const
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
const wxString & GetLayerName() const
virtual bool GetShowPageLimits() const
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
BOX2D GetViewport() const
Return the current viewport visible area rectangle.
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Describe the page size and margins of a paper page on which to eventually print or plot.
double GetHeightMils() const
double GetWidthMils() const
Container for project specific data.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
@ LAYER_PAGE_LIMITS
color for drawing the page extents (visibility stored in PCBNEW_SETTINGS::m_ShowPageLimits)
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
@ LAYER_SELECT_OVERLAY
currently selected items overlay
The Cairo implementation of the graphics abstraction layer.
constexpr int MilsToIU(int mils) const
@ NOT_USED
the 3d code uses this value
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D