diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp
index b0b3c8f8d3..7abdf93f8a 100644
--- a/common/eda_draw_frame.cpp
+++ b/common/eda_draw_frame.cpp
@@ -272,7 +272,7 @@ void EDA_DRAW_FRAME::OnUpdateSelectGrid( wxUpdateUIEvent& aEvent )
}
-void EDA_DRAW_FRAME::PrintPage( RENDER_SETTINGS* aSettings )
+void EDA_DRAW_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
{
wxMessageBox( wxT("EDA_DRAW_FRAME::PrintPage() error") );
}
@@ -825,7 +825,7 @@ void EDA_DRAW_FRAME::FocusOnLocation( const wxPoint& aPos )
static const wxString productName = wxT( "KiCad E.D.A. " );
-void PrintPageLayout( RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageInfo,
+void PrintPageLayout( const RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageInfo,
const wxString& aFullSheetName, const wxString& aFileName,
const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber,
double aMils2Iu, const PROJECT* aProject, const wxString& aSheetLayer,
@@ -850,7 +850,7 @@ void PrintPageLayout( RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageInfo,
}
-void EDA_DRAW_FRAME::PrintWorkSheet( RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen,
+void EDA_DRAW_FRAME::PrintWorkSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen,
double aMils2Iu, const wxString &aFilename,
const wxString &aSheetLayer )
{
diff --git a/common/eda_text.cpp b/common/eda_text.cpp
index 8795497fe6..3f9ed7a5b1 100644
--- a/common/eda_text.cpp
+++ b/common/eda_text.cpp
@@ -398,8 +398,8 @@ bool EDA_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy
}
-void EDA_TEXT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor,
- OUTLINE_MODE aFillMode )
+void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ COLOR4D aColor, OUTLINE_MODE aFillMode )
{
if( IsMultilineAllowed() )
{
@@ -462,7 +462,7 @@ void EDA_TEXT::GetLinePositions( std::vector& aPositions, int aLineCoun
}
}
-void EDA_TEXT::printOneLineOfText( RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+void EDA_TEXT::printOneLineOfText( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
COLOR4D aColor, OUTLINE_MODE aFillMode,
const wxString& aText, const wxPoint &aPos )
{
diff --git a/common/marker_base.cpp b/common/marker_base.cpp
index 3f41c8f3bc..22f5406bee 100644
--- a/common/marker_base.cpp
+++ b/common/marker_base.cpp
@@ -134,7 +134,7 @@ EDA_RECT MARKER_BASE::GetBoundingBoxMarker() const
}
-void MARKER_BASE::PrintMarker( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void MARKER_BASE::PrintMarker( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
diff --git a/common/page_layout/ws_draw_item.cpp b/common/page_layout/ws_draw_item.cpp
index 70f581e11d..ef81612bbf 100644
--- a/common/page_layout/ws_draw_item.cpp
+++ b/common/page_layout/ws_draw_item.cpp
@@ -159,7 +159,7 @@ void WS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS
// ============================ TEXT ==============================
-void WS_DRAW_ITEM_TEXT::PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void WS_DRAW_ITEM_TEXT::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
Print( aSettings, aOffset, aSettings->GetLayerColor( LAYER_WORKSHEET ), FILLED );
}
@@ -197,7 +197,7 @@ void WS_DRAW_ITEM_TEXT::SetTextAngle( double aAngle )
// ============================ POLYGON =================================
-void WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
@@ -301,7 +301,7 @@ wxString WS_DRAW_ITEM_POLYPOLYGONS::GetSelectMenuText( EDA_UNITS aUnits ) const
// ============================ RECT ==============================
-void WS_DRAW_ITEM_RECT::PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void WS_DRAW_ITEM_RECT::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
@@ -400,7 +400,7 @@ wxString WS_DRAW_ITEM_RECT::GetSelectMenuText( EDA_UNITS aUnits ) const
// ============================ LINE ==============================
-void WS_DRAW_ITEM_LINE::PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void WS_DRAW_ITEM_LINE::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
@@ -432,7 +432,7 @@ wxString WS_DRAW_ITEM_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
// ============== BITMAP ================
-void WS_DRAW_ITEM_BITMAP::PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void WS_DRAW_ITEM_BITMAP::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
WS_DATA_ITEM_BITMAP* bitmap = (WS_DATA_ITEM_BITMAP*) GetPeer();
@@ -533,7 +533,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( const PAGE_INFO& aPageInfo,
* The selected items are drawn after (usually 0 or 1)
* to be sure they are seen, even for overlapping items
*/
-void WS_DRAW_ITEM_LIST::Print( RENDER_SETTINGS* aSettings )
+void WS_DRAW_ITEM_LIST::Print( const RENDER_SETTINGS* aSettings )
{
std::vector second_items;
diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp
index 359e7ca484..f04fe72d51 100644
--- a/eeschema/class_libentry.cpp
+++ b/eeschema/class_libentry.cpp
@@ -436,8 +436,8 @@ wxString LIB_PART::SubReference( int aUnit, bool aAddSeparator )
}
-void LIB_PART::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, int aMulti,
- int aConvert, const PART_DRAW_OPTIONS& aOpts )
+void LIB_PART::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts )
{
/* draw background for filled items using background option
* Solid lines will be drawn after the background
diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h
index 74af5b9c47..54f93311a2 100644
--- a/eeschema/class_libentry.h
+++ b/eeschema/class_libentry.h
@@ -300,8 +300,8 @@ public:
* @param aConvert - Component conversion (DeMorgan) if available.
* @param aOpts - Drawing options
*/
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, int aMulti, int aConvert,
- const PART_DRAW_OPTIONS& aOpts );
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts );
/**
* Plot lib part to plotter.
diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp
index 54cb081a76..77e01d1f38 100644
--- a/eeschema/lib_arc.cpp
+++ b/eeschema/lib_arc.cpp
@@ -291,7 +291,7 @@ int LIB_ARC::GetPenWidth() const
}
-void LIB_ARC::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+void LIB_ARC::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform )
{
bool forceNoFill = static_cast( aData );
diff --git a/eeschema/lib_arc.h b/eeschema/lib_arc.h
index 305eaf451c..2042526c9a 100644
--- a/eeschema/lib_arc.h
+++ b/eeschema/lib_arc.h
@@ -50,7 +50,7 @@ class LIB_ARC : public LIB_ITEM
int m_Width; /* Line width */
int m_editState;
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) override;
public:
diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp
index 431287c5c4..86daa0c9e8 100644
--- a/eeschema/lib_bezier.cpp
+++ b/eeschema/lib_bezier.cpp
@@ -202,7 +202,7 @@ int LIB_BEZIER::GetPenWidth() const
}
-void LIB_BEZIER::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+void LIB_BEZIER::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform )
{
bool forceNoFill = static_cast( aData );
diff --git a/eeschema/lib_bezier.h b/eeschema/lib_bezier.h
index 9c6a03ba60..bb1f5a569b 100644
--- a/eeschema/lib_bezier.h
+++ b/eeschema/lib_bezier.h
@@ -103,8 +103,8 @@ private:
int compare( const LIB_ITEM& aOther,
LIB_ITEM::COMPARE_FLAGS aCompareFlags = LIB_ITEM::COMPARE_FLAGS::NORMAL ) const override;
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
- const TRANSFORM& aTransform ) override;
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ void* aData, const TRANSFORM& aTransform ) override;
};
diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp
index 1c60027c26..bbfe37540c 100644
--- a/eeschema/lib_circle.cpp
+++ b/eeschema/lib_circle.cpp
@@ -194,8 +194,8 @@ int LIB_CIRCLE::GetPenWidth() const
}
-void LIB_CIRCLE::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
- const TRANSFORM& aTransform )
+void LIB_CIRCLE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ void* aData, const TRANSFORM& aTransform )
{
bool forceNoFill = static_cast( aData );
int penWidth = GetPenWidth();
diff --git a/eeschema/lib_circle.h b/eeschema/lib_circle.h
index 8cabd5f6dd..5de4dc9cce 100644
--- a/eeschema/lib_circle.h
+++ b/eeschema/lib_circle.h
@@ -105,7 +105,7 @@ private:
int compare( const LIB_ITEM& aOther,
LIB_ITEM::COMPARE_FLAGS aCompareFlags = LIB_ITEM::COMPARE_FLAGS::NORMAL ) const override;
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) override;
};
diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp
index 82d48d379f..20a7656bbc 100644
--- a/eeschema/lib_field.cpp
+++ b/eeschema/lib_field.cpp
@@ -105,7 +105,7 @@ int LIB_FIELD::GetPenWidth() const
}
-void LIB_FIELD::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+void LIB_FIELD::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform )
{
wxDC* DC = aSettings->GetPrintDC();
diff --git a/eeschema/lib_field.h b/eeschema/lib_field.h
index 9e405164df..0428f6b44f 100644
--- a/eeschema/lib_field.h
+++ b/eeschema/lib_field.h
@@ -68,7 +68,7 @@ class LIB_FIELD : public LIB_ITEM, public EDA_TEXT
* the m_Text
*
*/
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) override;
/**
diff --git a/eeschema/lib_item.cpp b/eeschema/lib_item.cpp
index 9e5e07706d..7e5eb78a2d 100644
--- a/eeschema/lib_item.cpp
+++ b/eeschema/lib_item.cpp
@@ -134,8 +134,8 @@ bool LIB_ITEM::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy )
}
-void LIB_ITEM::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
- const TRANSFORM& aTransform )
+void LIB_ITEM::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ void* aData, const TRANSFORM& aTransform )
{
print( aSettings, aOffset, aData, aTransform );
}
diff --git a/eeschema/lib_item.h b/eeschema/lib_item.h
index 4a1e5d2025..97c005e2dc 100644
--- a/eeschema/lib_item.h
+++ b/eeschema/lib_item.h
@@ -69,7 +69,7 @@ class LIB_ITEM : public EDA_ITEM
* @param aData A pointer to any object specific data required to perform the draw.
* @param aTransform A reference to a #TRANSFORM object containing drawing transform.
*/
- virtual void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ virtual void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) = 0;
friend class LIB_PART;
@@ -175,8 +175,8 @@ public:
* pass reference to the lib component for pins.
* @param aTransform Transform Matrix (rotation, mirror ..)
*/
- virtual void Print( RENDER_SETTINGS* aSettings, const wxPoint &aOffset, void* aData,
- const TRANSFORM& aTransform );
+ virtual void Print( const RENDER_SETTINGS* aSettings, const wxPoint &aOffset,
+ void* aData, const TRANSFORM& aTransform );
virtual int GetPenWidth() const = 0;
diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp
index 21dc1962d0..a69c314e41 100644
--- a/eeschema/lib_pin.cpp
+++ b/eeschema/lib_pin.cpp
@@ -69,9 +69,9 @@ const wxString LIB_PIN::GetCanonicalElectricalTypeName( ELECTRICAL_PINTYPE aType
// i.e. the clock symbols (falling clock is actually external but is of
// the same kind)
-static int internalPinDecoSize( RENDER_SETTINGS* aSettings, const LIB_PIN &aPin )
+static int internalPinDecoSize( const RENDER_SETTINGS* aSettings, const LIB_PIN &aPin )
{
- KIGFX::SCH_RENDER_SETTINGS* settings = static_cast( aSettings );
+ const KIGFX::SCH_RENDER_SETTINGS* settings = static_cast( aSettings );
if( settings && settings->m_PinSymbolSize )
return settings->m_PinSymbolSize;
@@ -82,9 +82,9 @@ static int internalPinDecoSize( RENDER_SETTINGS* aSettings, const LIB_PIN &aPin
/// Utility for getting the size of the 'external' pin decorators (as a radius)
// i.e. the negation circle, the polarity 'slopes' and the nonlogic
// marker
-static int externalPinDecoSize( RENDER_SETTINGS* aSettings, const LIB_PIN &aPin )
+static int externalPinDecoSize( const RENDER_SETTINGS* aSettings, const LIB_PIN &aPin )
{
- KIGFX::SCH_RENDER_SETTINGS* settings = static_cast( aSettings );
+ const KIGFX::SCH_RENDER_SETTINGS* settings = static_cast( aSettings );
if( settings && settings->m_PinSymbolSize )
return settings->m_PinSymbolSize;
@@ -171,7 +171,7 @@ int LIB_PIN::GetPenWidth() const
}
-void LIB_PIN::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+void LIB_PIN::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform )
{
PART_DRAW_OPTIONS* opts = (PART_DRAW_OPTIONS*) aData;
@@ -199,7 +199,7 @@ void LIB_PIN::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* a
}
-void LIB_PIN::printPinSymbol( RENDER_SETTINGS* aSettings, const wxPoint& aPos, int aOrient )
+void LIB_PIN::printPinSymbol( const RENDER_SETTINGS* aSettings, const wxPoint& aPos, int aOrient )
{
wxDC* DC = aSettings->GetPrintDC();
int MapX1, MapY1, x1, y1;
@@ -310,7 +310,7 @@ void LIB_PIN::printPinSymbol( RENDER_SETTINGS* aSettings, const wxPoint& aPos, i
}
-void LIB_PIN::printPinTexts( RENDER_SETTINGS* aSettings, wxPoint& aPinPos, int aPinOrient,
+void LIB_PIN::printPinTexts( const RENDER_SETTINGS* aSettings, wxPoint& aPinPos, int aPinOrient,
int aTextInside, bool aDrawPinNum, bool aDrawPinName )
{
if( !aDrawPinName && !aDrawPinNum )
@@ -460,7 +460,7 @@ void LIB_PIN::printPinTexts( RENDER_SETTINGS* aSettings, wxPoint& aPinPos, int a
-void LIB_PIN::printPinElectricalTypeName( RENDER_SETTINGS* aSettings, wxPoint& aPosition,
+void LIB_PIN::printPinElectricalTypeName( const RENDER_SETTINGS* aSettings, wxPoint& aPosition,
int aOrientation )
{
wxDC* DC = aSettings->GetPrintDC();
diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h
index 582b482093..d925ad2544 100644
--- a/eeschema/lib_pin.h
+++ b/eeschema/lib_pin.h
@@ -81,7 +81,7 @@ protected:
* Print the pin symbol without text.
* If \a aColor != 0, draw with \a aColor, else with the normal pin color.
*/
- void printPinSymbol( RENDER_SETTINGS* aSettings, const wxPoint& aPos, int aOrientation );
+ void printPinSymbol( const RENDER_SETTINGS* aSettings, const wxPoint& aPos, int aOrientation );
/**
* Put the pin number and pin text info, given the pin line coordinates.
@@ -91,13 +91,13 @@ protected:
* If aTextInside then the text is been put inside,otherwise all is drawn outside.
* Pin Name: substring between '~' is negated
*/
- void printPinTexts( RENDER_SETTINGS* aSettings, wxPoint& aPinPos, int aPinOrient,
+ void printPinTexts( const RENDER_SETTINGS* aSettings, wxPoint& aPinPos, int aPinOrient,
int aTextInside, bool aDrawPinNum, bool aDrawPinName );
/**
* Draw the electrical type text of the pin (only for the footprint editor)
*/
- void printPinElectricalTypeName( RENDER_SETTINGS* aSettings, wxPoint& aPosition,
+ void printPinElectricalTypeName( const RENDER_SETTINGS* aSettings, wxPoint& aPosition,
int aOrientation );
public:
@@ -189,7 +189,7 @@ public:
* electrical types
* @param aTransform Transform Matrix (rotation, mirror ..)
*/
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) override;
/**
diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp
index 718063183a..045f153c4f 100644
--- a/eeschema/lib_polyline.cpp
+++ b/eeschema/lib_polyline.cpp
@@ -193,7 +193,7 @@ int LIB_POLYLINE::GetPenWidth() const
}
-void LIB_POLYLINE::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+void LIB_POLYLINE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform )
{
bool forceNoFill = static_cast( aData );
diff --git a/eeschema/lib_polyline.h b/eeschema/lib_polyline.h
index 1f7046118a..8b549a54f6 100644
--- a/eeschema/lib_polyline.h
+++ b/eeschema/lib_polyline.h
@@ -33,7 +33,7 @@ class LIB_POLYLINE : public LIB_ITEM
int m_Width; // Line width
std::vector m_PolyPoints; // list of points (>= 2)
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) override;
public:
diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp
index 7e067e159d..7fc02bba2a 100644
--- a/eeschema/lib_rectangle.cpp
+++ b/eeschema/lib_rectangle.cpp
@@ -158,8 +158,8 @@ int LIB_RECTANGLE::GetPenWidth() const
}
-void LIB_RECTANGLE::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
- const TRANSFORM& aTransform )
+void LIB_RECTANGLE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ void* aData, const TRANSFORM& aTransform )
{
bool forceNoFill = static_cast( aData );
int penWidth = GetPenWidth();
diff --git a/eeschema/lib_rectangle.h b/eeschema/lib_rectangle.h
index 9362d045ab..23c1d660e8 100644
--- a/eeschema/lib_rectangle.h
+++ b/eeschema/lib_rectangle.h
@@ -34,8 +34,8 @@ class LIB_RECTANGLE : public LIB_ITEM
wxPoint m_Pos; // Rectangle start point.
int m_Width; // Line width
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
- const TRANSFORM& aTransform ) override;
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ void* aData, const TRANSFORM& aTransform ) override;
public:
LIB_RECTANGLE( LIB_PART * aParent );
diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp
index 49d0999ecd..b9b913ac55 100644
--- a/eeschema/lib_text.cpp
+++ b/eeschema/lib_text.cpp
@@ -301,7 +301,7 @@ int LIB_TEXT::GetPenWidth() const
}
-void LIB_TEXT::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+void LIB_TEXT::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform )
{
wxDC* DC = aSettings->GetPrintDC();
diff --git a/eeschema/lib_text.h b/eeschema/lib_text.h
index 9b1f306958..8e3526125b 100644
--- a/eeschema/lib_text.h
+++ b/eeschema/lib_text.h
@@ -39,7 +39,7 @@
*/
class LIB_TEXT : public LIB_ITEM, public EDA_TEXT
{
- void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
+ void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
const TRANSFORM& aTransform ) override;
public:
diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp
index cc1160e1a1..b9e0bf9005 100644
--- a/eeschema/sch_bitmap.cpp
+++ b/eeschema/sch_bitmap.cpp
@@ -114,7 +114,7 @@ const EDA_RECT SCH_BITMAP::GetBoundingBox() const
}
-void SCH_BITMAP::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_BITMAP::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxPoint pos = m_pos + aOffset;
diff --git a/eeschema/sch_bitmap.h b/eeschema/sch_bitmap.h
index 551e55578e..bf86619cc6 100644
--- a/eeschema/sch_bitmap.h
+++ b/eeschema/sch_bitmap.h
@@ -97,7 +97,7 @@ public:
void SwapData( SCH_ITEM* aItem ) override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp
index 8758a3a5bf..f150564cb6 100644
--- a/eeschema/sch_bus_entry.cpp
+++ b/eeschema/sch_bus_entry.cpp
@@ -195,10 +195,10 @@ void SCH_BUS_BUS_ENTRY::GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemLis
}
-void SCH_BUS_ENTRY_BASE::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_BUS_ENTRY_BASE::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
- COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
+ COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
aSettings->GetLayerColor( m_layer ) : GetStrokeColor();
int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth();
diff --git a/eeschema/sch_bus_entry.h b/eeschema/sch_bus_entry.h
index df96c0fc6e..900b60fecd 100644
--- a/eeschema/sch_bus_entry.h
+++ b/eeschema/sch_bus_entry.h
@@ -79,7 +79,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
const EDA_RECT GetBoundingBox() const override;
diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp
index 4fb80dee44..4f12261258 100644
--- a/eeschema/sch_component.cpp
+++ b/eeschema/sch_component.cpp
@@ -352,7 +352,7 @@ int SCH_COMPONENT::GetUnitCount() const
}
-void SCH_COMPONENT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_COMPONENT::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
PART_DRAW_OPTIONS opts;
opts.transform = m_transform;
diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h
index 25c5d2604c..4eb64de239 100644
--- a/eeschema/sch_component.h
+++ b/eeschema/sch_component.h
@@ -495,7 +495,7 @@ public:
* @param aOffset is the drawing offset (usually wxPoint(0,0),
* but can be different when moving an object)
*/
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
void SwapData( SCH_ITEM* aItem ) override;
diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp
index 77471930e6..b125a5f00d 100644
--- a/eeschema/sch_edit_frame.cpp
+++ b/eeschema/sch_edit_frame.cpp
@@ -1054,7 +1054,7 @@ void SCH_EDIT_FRAME::OnExit( wxCommandEvent& event )
}
-void SCH_EDIT_FRAME::PrintPage( RENDER_SETTINGS* aSettings )
+void SCH_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
{
wxString fileName = Prj().AbsolutePath( GetScreen()->GetFileName() );
diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h
index b5012feef4..6efe6a3b27 100644
--- a/eeschema/sch_edit_frame.h
+++ b/eeschema/sch_edit_frame.h
@@ -865,7 +865,7 @@ public:
*
* @param aDC = wxDC given by the calling print function
*/
- virtual void PrintPage( RENDER_SETTINGS* aSettings ) override;
+ virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp
index 0ea4989d55..5034d2e0d3 100644
--- a/eeschema/sch_field.cpp
+++ b/eeschema/sch_field.cpp
@@ -195,7 +195,7 @@ int SCH_FIELD::GetPenWidth() const
}
-void SCH_FIELD::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_FIELD::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( IsForceVisible() ? LAYER_HIDDEN : m_layer );
diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h
index 4cf16953f4..cf894288a7 100644
--- a/eeschema/sch_field.h
+++ b/eeschema/sch_field.h
@@ -150,7 +150,7 @@ public:
int GetPenWidth() const override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
void Move( const wxPoint& aMoveVector ) override
{
diff --git a/eeschema/sch_item.h b/eeschema/sch_item.h
index 7280e263d4..9fa010ac6b 100644
--- a/eeschema/sch_item.h
+++ b/eeschema/sch_item.h
@@ -308,7 +308,7 @@ public:
*
* @param aOffset drawing offset (usually {0,0} but can be different when moving an object)
*/
- virtual void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) = 0;
+ virtual void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) = 0;
/**
* Move the item by \a aMoveVector to a new position.
diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp
index 5c9661580d..6415c3fb31 100644
--- a/eeschema/sch_junction.cpp
+++ b/eeschema/sch_junction.cpp
@@ -109,7 +109,7 @@ const EDA_RECT SCH_JUNCTION::GetBoundingBox() const
}
-void SCH_JUNCTION::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_JUNCTION::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = GetJunctionColor();
diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h
index 47e10a5642..65d3fd3d60 100644
--- a/eeschema/sch_junction.h
+++ b/eeschema/sch_junction.h
@@ -62,7 +62,7 @@ public:
const EDA_RECT GetBoundingBox() const override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
void Move( const wxPoint& aMoveVector ) override
{
diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp
index 2bf3a6aa59..5ccaf07e3f 100644
--- a/eeschema/sch_line.cpp
+++ b/eeschema/sch_line.cpp
@@ -315,7 +315,7 @@ int SCH_LINE::GetPenWidth() const
}
-void SCH_LINE::Print( RENDER_SETTINGS* aSettings, const wxPoint& offset )
+void SCH_LINE::Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = GetLineColor();
diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h
index e9bd273474..cc8afed8f9 100644
--- a/eeschema/sch_line.h
+++ b/eeschema/sch_line.h
@@ -164,7 +164,7 @@ public:
*/
double GetLength() const;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
int GetPenWidth() const override;
diff --git a/eeschema/sch_marker.cpp b/eeschema/sch_marker.cpp
index 5001147a1c..bbfe5f9e54 100644
--- a/eeschema/sch_marker.cpp
+++ b/eeschema/sch_marker.cpp
@@ -142,7 +142,7 @@ KIGFX::COLOR4D SCH_MARKER::getColor() const
}
-void SCH_MARKER::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_MARKER::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
PrintMarker( aSettings, aOffset );
}
diff --git a/eeschema/sch_marker.h b/eeschema/sch_marker.h
index 4fe64249c8..481d8c913b 100644
--- a/eeschema/sch_marker.h
+++ b/eeschema/sch_marker.h
@@ -58,7 +58,7 @@ public:
SCH_LAYER_ID GetColorLayer() const;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
void Plot( PLOTTER* aPlotter ) override
{
diff --git a/eeschema/sch_no_connect.cpp b/eeschema/sch_no_connect.cpp
index c64b399ac5..5ae9036e99 100644
--- a/eeschema/sch_no_connect.cpp
+++ b/eeschema/sch_no_connect.cpp
@@ -101,7 +101,7 @@ int SCH_NO_CONNECT::GetPenWidth() const
}
-void SCH_NO_CONNECT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_NO_CONNECT::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
int half = GetSize() / 2;
diff --git a/eeschema/sch_no_connect.h b/eeschema/sch_no_connect.h
index 31c2aeb496..fc0556a67e 100644
--- a/eeschema/sch_no_connect.h
+++ b/eeschema/sch_no_connect.h
@@ -69,7 +69,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) override;
diff --git a/eeschema/sch_pin.h b/eeschema/sch_pin.h
index e8d5c1d32d..315f75b8d3 100644
--- a/eeschema/sch_pin.h
+++ b/eeschema/sch_pin.h
@@ -77,7 +77,7 @@ public:
wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aList ) override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override {}
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override {}
void Move( const wxPoint& aMoveVector ) override {}
diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp
index d6066ed8a8..7abce05917 100644
--- a/eeschema/sch_screen.cpp
+++ b/eeschema/sch_screen.cpp
@@ -739,7 +739,7 @@ void SCH_SCREEN::UpdateLocalLibSymbolLinks()
}
-void SCH_SCREEN::Print( RENDER_SETTINGS* aSettings )
+void SCH_SCREEN::Print( const RENDER_SETTINGS* aSettings )
{
// Ensure links are up to date, even if a library was reloaded for some reason:
std::vector junctions;
diff --git a/eeschema/sch_screen.h b/eeschema/sch_screen.h
index b6540d810e..dad53e9c0f 100644
--- a/eeschema/sch_screen.h
+++ b/eeschema/sch_screen.h
@@ -276,7 +276,7 @@ public:
* @note This function is useful only for schematic. The library editor and library viewer
* do not use a draw list and therefore draws nothing.
*/
- void Print( RENDER_SETTINGS* aSettings );
+ void Print( const RENDER_SETTINGS* aSettings );
/**
* Plot all the schematic objects to \a aPlotter.
diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp
index aab3912bb0..74024530f2 100644
--- a/eeschema/sch_sheet.cpp
+++ b/eeschema/sch_sheet.cpp
@@ -979,15 +979,15 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter )
}
-void SCH_SHEET::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_SHEET::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
- wxDC* DC = aSettings->GetPrintDC();
- wxPoint pos = m_pos + aOffset;
- int lineWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
- auto* settings = dynamic_cast( aSettings );
- bool override = settings && settings->m_OverrideItemColors;
- COLOR4D border = GetBorderColor();
- COLOR4D background = GetBackgroundColor();
+ wxDC* DC = aSettings->GetPrintDC();
+ wxPoint pos = m_pos + aOffset;
+ int lineWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
+ const auto* settings = dynamic_cast( aSettings );
+ bool override = settings && settings->m_OverrideItemColors;
+ COLOR4D border = GetBorderColor();
+ COLOR4D background = GetBackgroundColor();
if( override || border == COLOR4D::UNSPECIFIED )
border = aSettings->GetLayerColor( LAYER_SHEET );
diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h
index 07d00a9bd0..f5561fe80d 100644
--- a/eeschema/sch_sheet.h
+++ b/eeschema/sch_sheet.h
@@ -121,7 +121,7 @@ public:
*/
bool IsMovableFromAnchorPoint() override { return true; }
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
/**
* Calculate the graphic shape (a polygon) associated to the text.
@@ -129,7 +129,7 @@ public:
* @param aPoints = a buffer to fill with polygon corners coordinates
* @param aPos = Position of the shape
*/
- void CreateGraphicShape( RENDER_SETTINGS* aSettings,
+ void CreateGraphicShape( const RENDER_SETTINGS* aSettings,
std::vector & aPoints, const wxPoint& aPos ) override;
void SwapData( SCH_ITEM* aItem ) override;
@@ -437,7 +437,7 @@ public:
int GetPenWidth() const override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
/**
* Return a bounding box for the sheet body but not the fields.
diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp
index 51a5ff68e2..1a3e748848 100644
--- a/eeschema/sch_sheet_path.cpp
+++ b/eeschema/sch_sheet_path.cpp
@@ -73,7 +73,7 @@ public:
// pure virtuals:
void SetPosition( const wxPoint& ) override {}
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override {}
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override {}
void Move( const wxPoint& aMoveVector ) override {}
void MirrorY( int aYaxis_position ) override {}
void MirrorX( int aXaxis_position ) override {}
diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp
index d5e87106be..89ef2ceb06 100644
--- a/eeschema/sch_sheet_pin.cpp
+++ b/eeschema/sch_sheet_pin.cpp
@@ -64,7 +64,7 @@ EDA_ITEM* SCH_SHEET_PIN::Clone() const
}
-void SCH_SHEET_PIN::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_SHEET_PIN::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
// The icon selection is handle by the virtual method CreateGraphicShape called by ::Print
SCH_HIERLABEL::Print( aSettings, aOffset );
@@ -251,7 +251,7 @@ void SCH_SHEET_PIN::Rotate( wxPoint aPosition )
}
-void SCH_SHEET_PIN::CreateGraphicShape( RENDER_SETTINGS* aRenderSettings,
+void SCH_SHEET_PIN::CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings,
std::vector& aPoints, const wxPoint& aPos )
{
/*
diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp
index 129ba5a6d1..7ff4e01009 100644
--- a/eeschema/sch_text.cpp
+++ b/eeschema/sch_text.cpp
@@ -173,7 +173,7 @@ bool SCH_TEXT::IncrementLabel( int aIncrement )
}
-wxPoint SCH_TEXT::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const
+wxPoint SCH_TEXT::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const
{
wxPoint text_offset;
@@ -321,12 +321,12 @@ bool SCH_TEXT::operator<( const SCH_ITEM& aItem ) const
}
-int SCH_TEXT::GetTextOffset( RENDER_SETTINGS* aSettings ) const
+int SCH_TEXT::GetTextOffset( const RENDER_SETTINGS* aSettings ) const
{
double ratio;
if( aSettings )
- ratio = static_cast( aSettings )->m_TextOffsetRatio;
+ ratio = static_cast( aSettings )->m_TextOffsetRatio;
else if( Schematic() )
ratio = Schematic()->Settings().m_TextOffsetRatio;
else
@@ -344,7 +344,7 @@ int SCH_TEXT::GetPenWidth() const
}
-void SCH_TEXT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_TEXT::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
COLOR4D color = aSettings->GetLayerColor( m_layer );
wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings );
@@ -910,7 +910,7 @@ void SCH_GLOBALLABEL::RunOnChildren( const std::function& aFu
}
-wxPoint SCH_GLOBALLABEL::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const
+wxPoint SCH_GLOBALLABEL::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const
{
wxPoint text_offset;
int dist = GetTextOffset( aSettings );
@@ -1158,7 +1158,7 @@ bool SCH_GLOBALLABEL::ResolveTextVar( wxString* token, int aDepth ) const
}
-void SCH_GLOBALLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
+void SCH_GLOBALLABEL::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
static std::vector s_poly;
@@ -1188,7 +1188,7 @@ void SCH_GLOBALLABEL::Plot( PLOTTER* aPlotter )
m_intersheetRefsField.Plot( aPlotter );
}
-void SCH_GLOBALLABEL::CreateGraphicShape( RENDER_SETTINGS* aRenderSettings,
+void SCH_GLOBALLABEL::CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings,
std::vector& aPoints, const wxPoint& Pos )
{
int margin = GetTextOffset( aRenderSettings );
@@ -1380,7 +1380,7 @@ void SCH_HIERLABEL::SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle )
}
-void SCH_HIERLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& offset )
+void SCH_HIERLABEL::Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset )
{
wxCHECK_RET( Schematic(), "No parent SCHEMATIC set for SCH_LABEL!" );
@@ -1400,7 +1400,7 @@ void SCH_HIERLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& offset )
}
-void SCH_HIERLABEL::CreateGraphicShape( RENDER_SETTINGS* aRenderSettings,
+void SCH_HIERLABEL::CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings,
std::vector& aPoints, const wxPoint& Pos )
{
int* Template = TemplateShape[static_cast( m_shape )][static_cast( m_spin_style )];
@@ -1477,7 +1477,7 @@ const EDA_RECT SCH_HIERLABEL::GetBoundingBox() const
}
-wxPoint SCH_HIERLABEL::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const
+wxPoint SCH_HIERLABEL::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const
{
wxPoint text_offset;
int dist = GetTextOffset( aSettings );
diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h
index cb7e57e153..e977817c68 100644
--- a/eeschema/sch_text.h
+++ b/eeschema/sch_text.h
@@ -242,9 +242,9 @@ public:
* This offset depends on the orientation, the type of text, and the area required to
* draw the associated graphic symbol or to put the text above a wire.
*/
- virtual wxPoint GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const;
+ virtual wxPoint GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& offset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset ) override;
/**
* Calculate the graphic shape (a polygon) associated to the text.
@@ -253,7 +253,7 @@ public:
* @param Pos Position of the shape, for texts and labels: do nothing
* Mainly for derived classes (SCH_SHEET_PIN and Hierarchical labels)
*/
- virtual void CreateGraphicShape( RENDER_SETTINGS* aSettings,
+ virtual void CreateGraphicShape( const RENDER_SETTINGS* aSettings,
std::vector & aPoints, const wxPoint& Pos )
{
aPoints.clear();
@@ -265,7 +265,7 @@ public:
bool operator<( const SCH_ITEM& aItem ) const override;
- int GetTextOffset( RENDER_SETTINGS* aSettings = nullptr ) const;
+ int GetTextOffset( const RENDER_SETTINGS* aSettings = nullptr ) const;
int GetPenWidth() const override;
@@ -408,11 +408,11 @@ public:
void SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle ) override;
- wxPoint GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const override;
+ wxPoint GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const override;
const EDA_RECT GetBoundingBox() const override;
- void CreateGraphicShape( RENDER_SETTINGS* aRenderSettings,
+ void CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings,
std::vector& aPoints, const wxPoint& aPos ) override;
void UpdateIntersheetRefProps();
@@ -432,7 +432,7 @@ public:
BITMAP_DEF GetMenuImage() const override;
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& offset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset ) override;
void Plot( PLOTTER* aPlotter ) override;
@@ -470,7 +470,7 @@ public:
~SCH_HIERLABEL() { }
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& offset ) override;
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset ) override;
static inline bool ClassOf( const EDA_ITEM* aItem )
{
@@ -484,9 +484,9 @@ public:
void SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle ) override;
- wxPoint GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const override;
+ wxPoint GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const override;
- void CreateGraphicShape( RENDER_SETTINGS* aSettings, std::vector& aPoints,
+ void CreateGraphicShape( const RENDER_SETTINGS* aSettings, std::vector& aPoints,
const wxPoint& Pos ) override;
const EDA_RECT GetBoundingBox() const override;
diff --git a/eeschema/symbol_editor/symbol_edit_frame.h b/eeschema/symbol_editor/symbol_edit_frame.h
index f929be4013..40f93081da 100644
--- a/eeschema/symbol_editor/symbol_edit_frame.h
+++ b/eeschema/symbol_editor/symbol_edit_frame.h
@@ -284,7 +284,7 @@ public:
/**
* Print a page.
*/
- void PrintPage( RENDER_SETTINGS* aSettings ) override;
+ void PrintPage( const RENDER_SETTINGS* aSettings ) override;
/**
* Create the SVG print file for the current edited symbol.
diff --git a/eeschema/symbol_editor/symbol_editor_plotter.cpp b/eeschema/symbol_editor/symbol_editor_plotter.cpp
index f1e47e0ba6..c233be7411 100644
--- a/eeschema/symbol_editor/symbol_editor_plotter.cpp
+++ b/eeschema/symbol_editor/symbol_editor_plotter.cpp
@@ -80,7 +80,7 @@ void SYMBOL_EDIT_FRAME::SVGPlotSymbol( const wxString& aFullFileName )
}
-void SYMBOL_EDIT_FRAME::PrintPage( RENDER_SETTINGS* aSettings )
+void SYMBOL_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
{
if( !m_my_part )
return;
diff --git a/include/eda_draw_frame.h b/include/eda_draw_frame.h
index 664fefbc28..438a7605b5 100644
--- a/include/eda_draw_frame.h
+++ b/include/eda_draw_frame.h
@@ -297,7 +297,7 @@ public:
* @param aFilename The filename to display in basic inscriptions.
* @param aSheetLayer The layer displayed from PcbNew.
*/
- void PrintWorkSheet( RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen, double aMils2Iu,
+ void PrintWorkSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen, double aMils2Iu,
const wxString& aFilename, const wxString& aSheetLayer = wxEmptyString );
void DisplayToolMsg( const wxString& msg ) override;
@@ -385,7 +385,7 @@ public:
*
* @param aDC wxDC given by the calling print function
*/
- virtual void PrintPage( RENDER_SETTINGS* aSettings );
+ virtual void PrintPage( const RENDER_SETTINGS* aSettings );
/**
* Use to start up the GAL drawing canvas.
diff --git a/include/eda_text.h b/include/eda_text.h
index 2a792d03ae..15e4e6f481 100644
--- a/include/eda_text.h
+++ b/include/eda_text.h
@@ -272,8 +272,8 @@ public:
* @param aColor text color.
* @param aDisplay_mode #FILLED or #SKETCH.
*/
- void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor,
- OUTLINE_MODE aDisplay_mode = FILLED );
+ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
+ COLOR4D aColor, OUTLINE_MODE aDisplay_mode = FILLED );
/**
* Convert the text shape to a list of segment.
@@ -383,7 +383,7 @@ private:
* @param aText the single line of text to draw.
* @param aPos the position of this line ).
*/
- void printOneLineOfText( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor,
+ void printOneLineOfText( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor,
OUTLINE_MODE aFillMode, const wxString& aText, const wxPoint& aPos );
wxString m_text;
diff --git a/include/marker_base.h b/include/marker_base.h
index 7c8bcab3b2..b40ac7fc33 100644
--- a/include/marker_base.h
+++ b/include/marker_base.h
@@ -76,7 +76,7 @@ public:
/**
* Print the shape is the polygon defined in m_Corners (array of wxPoints).
*/
- void PrintMarker( RENDER_SETTINGS* aSettings, const wxPoint& aOffset );
+ void PrintMarker( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset );
/**
* @return the position of this marker in internal units.
diff --git a/include/page_layout/ws_draw_item.h b/include/page_layout/ws_draw_item.h
index ba8116653d..41f7b39143 100644
--- a/include/page_layout/ws_draw_item.h
+++ b/include/page_layout/ws_draw_item.h
@@ -76,13 +76,13 @@ public:
}
// The function to print a WS_DRAW_ITEM
- virtual void PrintWsItem( RENDER_SETTINGS* aSettings )
+ virtual void PrintWsItem( const RENDER_SETTINGS* aSettings )
{
PrintWsItem( aSettings, wxPoint( 0, 0 ) );
}
// More advanced version of DrawWsItem. This is what must be defined in the derived type.
- virtual void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) = 0;
+ virtual void PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) = 0;
// Derived types must define GetBoundingBox() as a minimum, and can then override the
// two HitTest() functions if they need something more specific.
@@ -141,7 +141,7 @@ public:
const EDA_RECT GetBoundingBox() const override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
- void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
@@ -175,7 +175,7 @@ public:
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
- void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
@@ -224,7 +224,7 @@ public:
wxPoint GetPosition() const override { return GetStart(); }
void SetPosition( const wxPoint& aPos ) override { SetStart( aPos ); }
- void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
const EDA_RECT GetBoundingBox() const override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
@@ -270,7 +270,7 @@ public:
wxPoint GetPosition() const override { return wxPoint( 0, 0 ); }
void SetPosition( const wxPoint& aPos ) override { /* do nothing */ }
- void PrintWsItem( RENDER_SETTINGS* , const wxPoint& ) override { /* do nothing */ }
+ void PrintWsItem( const RENDER_SETTINGS* , const wxPoint& ) override { /* do nothing */ }
const EDA_RECT GetBoundingBox() const override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override { return false; }
@@ -312,7 +312,7 @@ public:
virtual wxString GetClass() const override { return wxT( "WS_DRAW_ITEM_TEXT" ); }
- void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
void SetTextAngle( double aAngle ) override;
@@ -350,7 +350,7 @@ public:
wxPoint GetPosition() const override { return m_pos; }
void SetPosition( const wxPoint& aPos ) override { m_pos = aPos; }
- void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
+ void PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
@@ -509,7 +509,7 @@ public:
/**
* Draws the item list created by BuildWorkSheetGraphicList
*/
- void Print( RENDER_SETTINGS* aSettings );
+ void Print( const RENDER_SETTINGS* aSettings );
/**
* Drawing or plot the page layout.
diff --git a/include/page_layout/ws_painter.h b/include/page_layout/ws_painter.h
index 62d1230677..180a8d0421 100644
--- a/include/page_layout/ws_painter.h
+++ b/include/page_layout/ws_painter.h
@@ -150,7 +150,7 @@ private:
* - the LTmargin The left top margin of the page layout.
* - the RBmargin The right bottom margin of the page layout.
*/
-void PrintPageLayout( RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageInfo,
+void PrintPageLayout( const RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageInfo,
const wxString& aFullSheetName, const wxString& aFileName,
const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber,
double aScalar, const PROJECT* aProject,
diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp
index 0475fc1c12..6d4cf27be8 100644
--- a/pagelayout_editor/pl_editor_frame.cpp
+++ b/pagelayout_editor/pl_editor_frame.cpp
@@ -750,7 +750,7 @@ void PL_EDITOR_FRAME::UpdateStatusBar()
}
-void PL_EDITOR_FRAME::PrintPage( RENDER_SETTINGS* aSettings )
+void PL_EDITOR_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
{
GetScreen()->SetVirtualPageNumber( GetPageNumberOption() ? 1 : 2 );
WS_DATA_MODEL& model = WS_DATA_MODEL::GetTheInstance();
diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h
index ad83f4f60a..d1c610ee7c 100644
--- a/pagelayout_editor/pl_editor_frame.h
+++ b/pagelayout_editor/pl_editor_frame.h
@@ -217,7 +217,7 @@ public:
* used to print a page
* @param aDC = wxDC given by the calling print function
*/
- virtual void PrintPage( RENDER_SETTINGS* aSettings ) override;
+ virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
void OnFileHistory( wxCommandEvent& event );
void OnClearFileHistory( wxCommandEvent& aEvent );