34 using namespace KIGFX;
39 m_mils2IUscalefactor( aMils2IUscalefactor ),
40 m_titleBlock( aTitleBlock ),
41 m_pageInfo( aPageInfo ),
44 m_isFirstPage( false ),
45 m_project( aProject ),
74 wxString fileName(
m_fileName.c_str(), wxConvUTF8 );
75 wxString sheetName(
m_sheetName.c_str(), wxConvUTF8 );
111 auto ws_settings = static_cast<DS_RENDER_SETTINGS*>( ws_painter.
GetSettings() );
140 int accuracy = (int) aView->
ToWorld( 5.0 );
147 if( item->HitTest( aPosition, accuracy ) )
int m_pageBorderColorLayer
Layer that is used for page border color.
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
currently selected items overlay
Container for project specific data.
void SetMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to draw/plot units.
The Cairo implementation of the graphics abstraction layer.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
int GetHeightMils() const
void SetDefaultPenSize(int aPenSize)
bool IsFlippedX() const
Return true if flip flag for the X axis is set.
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
the 3d code uses this value
void DrawBorder(const PAGE_INFO *aPageInfo, int aScaleFactor) const
void ViewGetLayers(int aLayers[], int &aCount) const override
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
bool GetShowPageLimits() const
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
bool HitTestDrawingSheetItems(KIGFX::VIEW *aView, const wxPoint &aPosition)
float GetDrawingSheetLineWidth() const
Hold the information shown in the lower right corner of a plot, printout, or editing view.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
DS_PROXY_VIEW_ITEM(int aScaleFactor, const PAGE_INFO *aPageInfo, const PROJECT *aProject, const TITLE_BLOCK *aTitleBlock)
Base class to handle basic graphic items.
int m_colorLayer
Layer that is used for drawing sheet color (LAYER_DRAWINGSHEET is always used for visibility)
DS_DRAW_ITEM_BASE * GetNext()
VECTOR2< double > VECTOR2D
int m_mils2IUscalefactor
the factor between mils (units used in drawing sheet and internal units) it is the value IU_PER_MILS ...
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
Describe the page size and margins of a paper page on which to eventually print or plot.
void buildDrawList(KIGFX::VIEW *aView, DS_DRAW_ITEM_LIST *aDrawList) const
drawingsheet frame and titleblock
const TITLE_BLOCK * m_titleBlock
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
virtual void Scale(const VECTOR2D &aScale)
Scale the context.
const PAGE_INFO * m_pageInfo
void SetEnd(coord_type x, coord_type y)
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
virtual void Restore()
Restore the context.
const BOX2I ViewBBox() const override
void SetOrigin(const Vec &pos)
void SetProject(const PROJECT *aProject)
A base class for most all the KiCad significant classes used in schematics and boards.
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
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.
Methods for painting drawing sheet items.
virtual void Save()
Save the context.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
DS_DRAW_ITEM_BASE * GetFirst()
virtual void Translate(const VECTOR2D &aTranslation)
Translate the context.
const PROJECT * m_project
Abstract interface for drawing on a 2D-surface.