Make RENDER_SETTINGS argument const

This commit is contained in:
Dominik Wernberger 2020-12-20 19:18:54 +01:00 committed by Seth Hillbrand
parent 5d099bb789
commit bb2881a5ab
61 changed files with 129 additions and 129 deletions

View File

@ -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") ); 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. " ); 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 wxString& aFullSheetName, const wxString& aFileName,
const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber, const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber,
double aMils2Iu, const PROJECT* aProject, const wxString& aSheetLayer, 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, double aMils2Iu, const wxString &aFilename,
const wxString &aSheetLayer ) const wxString &aSheetLayer )
{ {

View File

@ -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, void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
OUTLINE_MODE aFillMode ) COLOR4D aColor, OUTLINE_MODE aFillMode )
{ {
if( IsMultilineAllowed() ) if( IsMultilineAllowed() )
{ {
@ -462,7 +462,7 @@ void EDA_TEXT::GetLinePositions( std::vector<wxPoint>& 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, COLOR4D aColor, OUTLINE_MODE aFillMode,
const wxString& aText, const wxPoint &aPos ) const wxString& aText, const wxPoint &aPos )
{ {

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();

View File

@ -159,7 +159,7 @@ void WS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS
// ============================ TEXT ============================== // ============================ 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 ); Print( aSettings, aOffset, aSettings->GetLayerColor( LAYER_WORKSHEET ), FILLED );
} }
@ -197,7 +197,7 @@ void WS_DRAW_ITEM_TEXT::SetTextAngle( double aAngle )
// ============================ POLYGON ================================= // ============================ 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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET ); COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
@ -301,7 +301,7 @@ wxString WS_DRAW_ITEM_POLYPOLYGONS::GetSelectMenuText( EDA_UNITS aUnits ) const
// ============================ RECT ============================== // ============================ 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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET ); COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
@ -400,7 +400,7 @@ wxString WS_DRAW_ITEM_RECT::GetSelectMenuText( EDA_UNITS aUnits ) const
// ============================ LINE ============================== // ============================ 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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET ); COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
@ -432,7 +432,7 @@ wxString WS_DRAW_ITEM_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
// ============== BITMAP ================ // ============== 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(); 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) * The selected items are drawn after (usually 0 or 1)
* to be sure they are seen, even for overlapping items * 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<WS_DRAW_ITEM_BASE*> second_items; std::vector<WS_DRAW_ITEM_BASE*> second_items;

View File

@ -436,8 +436,8 @@ wxString LIB_PART::SubReference( int aUnit, bool aAddSeparator )
} }
void LIB_PART::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, int aMulti, void LIB_PART::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
int aConvert, const PART_DRAW_OPTIONS& aOpts ) int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts )
{ {
/* draw background for filled items using background option /* draw background for filled items using background option
* Solid lines will be drawn after the background * Solid lines will be drawn after the background

View File

@ -300,8 +300,8 @@ public:
* @param aConvert - Component conversion (DeMorgan) if available. * @param aConvert - Component conversion (DeMorgan) if available.
* @param aOpts - Drawing options * @param aOpts - Drawing options
*/ */
void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, int aMulti, int aConvert, void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
const PART_DRAW_OPTIONS& aOpts ); int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts );
/** /**
* Plot lib part to plotter. * Plot lib part to plotter.

View File

@ -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 ) const TRANSFORM& aTransform )
{ {
bool forceNoFill = static_cast<bool>( aData ); bool forceNoFill = static_cast<bool>( aData );

View File

@ -50,7 +50,7 @@ class LIB_ARC : public LIB_ITEM
int m_Width; /* Line width */ int m_Width; /* Line width */
int m_editState; 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; const TRANSFORM& aTransform ) override;
public: public:

View File

@ -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 ) const TRANSFORM& aTransform )
{ {
bool forceNoFill = static_cast<bool>( aData ); bool forceNoFill = static_cast<bool>( aData );

View File

@ -103,8 +103,8 @@ private:
int compare( const LIB_ITEM& aOther, int compare( const LIB_ITEM& aOther,
LIB_ITEM::COMPARE_FLAGS aCompareFlags = LIB_ITEM::COMPARE_FLAGS::NORMAL ) const override; 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,
const TRANSFORM& aTransform ) override; void* aData, const TRANSFORM& aTransform ) override;
}; };

View File

@ -194,8 +194,8 @@ int LIB_CIRCLE::GetPenWidth() const
} }
void LIB_CIRCLE::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData, void LIB_CIRCLE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
const TRANSFORM& aTransform ) void* aData, const TRANSFORM& aTransform )
{ {
bool forceNoFill = static_cast<bool>( aData ); bool forceNoFill = static_cast<bool>( aData );
int penWidth = GetPenWidth(); int penWidth = GetPenWidth();

View File

@ -105,7 +105,7 @@ private:
int compare( const LIB_ITEM& aOther, int compare( const LIB_ITEM& aOther,
LIB_ITEM::COMPARE_FLAGS aCompareFlags = LIB_ITEM::COMPARE_FLAGS::NORMAL ) const override; 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; const TRANSFORM& aTransform ) override;
}; };

View File

@ -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 ) const TRANSFORM& aTransform )
{ {
wxDC* DC = aSettings->GetPrintDC(); wxDC* DC = aSettings->GetPrintDC();

View File

@ -68,7 +68,7 @@ class LIB_FIELD : public LIB_ITEM, public EDA_TEXT
* the m_Text * the m_Text
* </p> * </p>
*/ */
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; const TRANSFORM& aTransform ) override;
/** /**

View File

@ -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, void LIB_ITEM::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
const TRANSFORM& aTransform ) void* aData, const TRANSFORM& aTransform )
{ {
print( aSettings, aOffset, aData, aTransform ); print( aSettings, aOffset, aData, aTransform );
} }

View File

@ -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 aData A pointer to any object specific data required to perform the draw.
* @param aTransform A reference to a #TRANSFORM object containing drawing transform. * @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; const TRANSFORM& aTransform ) = 0;
friend class LIB_PART; friend class LIB_PART;
@ -175,8 +175,8 @@ public:
* pass reference to the lib component for pins. * pass reference to the lib component for pins.
* @param aTransform Transform Matrix (rotation, mirror ..) * @param aTransform Transform Matrix (rotation, mirror ..)
*/ */
virtual void Print( RENDER_SETTINGS* aSettings, const wxPoint &aOffset, void* aData, virtual void Print( const RENDER_SETTINGS* aSettings, const wxPoint &aOffset,
const TRANSFORM& aTransform ); void* aData, const TRANSFORM& aTransform );
virtual int GetPenWidth() const = 0; virtual int GetPenWidth() const = 0;

View File

@ -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 // i.e. the clock symbols (falling clock is actually external but is of
// the same kind) // 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<KIGFX::SCH_RENDER_SETTINGS*>( aSettings ); const KIGFX::SCH_RENDER_SETTINGS* settings = static_cast<const KIGFX::SCH_RENDER_SETTINGS*>( aSettings );
if( settings && settings->m_PinSymbolSize ) if( settings && settings->m_PinSymbolSize )
return 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) /// Utility for getting the size of the 'external' pin decorators (as a radius)
// i.e. the negation circle, the polarity 'slopes' and the nonlogic // i.e. the negation circle, the polarity 'slopes' and the nonlogic
// marker // 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<KIGFX::SCH_RENDER_SETTINGS*>( aSettings ); const KIGFX::SCH_RENDER_SETTINGS* settings = static_cast<const KIGFX::SCH_RENDER_SETTINGS*>( aSettings );
if( settings && settings->m_PinSymbolSize ) if( settings && settings->m_PinSymbolSize )
return 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 ) const TRANSFORM& aTransform )
{ {
PART_DRAW_OPTIONS* opts = (PART_DRAW_OPTIONS*) aData; 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(); wxDC* DC = aSettings->GetPrintDC();
int MapX1, MapY1, x1, y1; 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 ) int aTextInside, bool aDrawPinNum, bool aDrawPinName )
{ {
if( !aDrawPinName && !aDrawPinNum ) 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 ) int aOrientation )
{ {
wxDC* DC = aSettings->GetPrintDC(); wxDC* DC = aSettings->GetPrintDC();

View File

@ -81,7 +81,7 @@ protected:
* Print the pin symbol without text. * Print the pin symbol without text.
* If \a aColor != 0, draw with \a aColor, else with the normal pin color. * 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. * 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. * If aTextInside then the text is been put inside,otherwise all is drawn outside.
* Pin Name: substring between '~' is negated * 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 ); int aTextInside, bool aDrawPinNum, bool aDrawPinName );
/** /**
* Draw the electrical type text of the pin (only for the footprint editor) * 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 ); int aOrientation );
public: public:
@ -189,7 +189,7 @@ public:
* electrical types * electrical types
* @param aTransform Transform Matrix (rotation, mirror ..) * @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; const TRANSFORM& aTransform ) override;
/** /**

View File

@ -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 ) const TRANSFORM& aTransform )
{ {
bool forceNoFill = static_cast<bool>( aData ); bool forceNoFill = static_cast<bool>( aData );

View File

@ -33,7 +33,7 @@ class LIB_POLYLINE : public LIB_ITEM
int m_Width; // Line width int m_Width; // Line width
std::vector<wxPoint> m_PolyPoints; // list of points (>= 2) std::vector<wxPoint> 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; const TRANSFORM& aTransform ) override;
public: public:

View File

@ -158,8 +158,8 @@ int LIB_RECTANGLE::GetPenWidth() const
} }
void LIB_RECTANGLE::print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData, void LIB_RECTANGLE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
const TRANSFORM& aTransform ) void* aData, const TRANSFORM& aTransform )
{ {
bool forceNoFill = static_cast<bool>( aData ); bool forceNoFill = static_cast<bool>( aData );
int penWidth = GetPenWidth(); int penWidth = GetPenWidth();

View File

@ -34,8 +34,8 @@ class LIB_RECTANGLE : public LIB_ITEM
wxPoint m_Pos; // Rectangle start point. wxPoint m_Pos; // Rectangle start point.
int m_Width; // Line width int m_Width; // Line width
void print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData, void print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
const TRANSFORM& aTransform ) override; void* aData, const TRANSFORM& aTransform ) override;
public: public:
LIB_RECTANGLE( LIB_PART * aParent ); LIB_RECTANGLE( LIB_PART * aParent );

View File

@ -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 ) const TRANSFORM& aTransform )
{ {
wxDC* DC = aSettings->GetPrintDC(); wxDC* DC = aSettings->GetPrintDC();

View File

@ -39,7 +39,7 @@
*/ */
class LIB_TEXT : public LIB_ITEM, public EDA_TEXT 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; const TRANSFORM& aTransform ) override;
public: public:

View File

@ -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; wxPoint pos = m_pos + aOffset;

View File

@ -97,7 +97,7 @@ public:
void SwapData( SCH_ITEM* aItem ) override; 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() /// @copydoc VIEW_ITEM::ViewGetLayers()
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override; virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ? COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
aSettings->GetLayerColor( m_layer ) : GetStrokeColor(); aSettings->GetLayerColor( m_layer ) : GetStrokeColor();
int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth(); int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth();

View File

@ -79,7 +79,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override; 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; const EDA_RECT GetBoundingBox() const override;

View File

@ -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; PART_DRAW_OPTIONS opts;
opts.transform = m_transform; opts.transform = m_transform;

View File

@ -495,7 +495,7 @@ public:
* @param aOffset is the drawing offset (usually wxPoint(0,0), * @param aOffset is the drawing offset (usually wxPoint(0,0),
* but can be different when moving an object) * 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; void SwapData( SCH_ITEM* aItem ) override;

View File

@ -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() ); wxString fileName = Prj().AbsolutePath( GetScreen()->GetFileName() );

View File

@ -865,7 +865,7 @@ public:
* *
* @param aDC = wxDC given by the calling print function * @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; } void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( IsForceVisible() ? LAYER_HIDDEN : m_layer ); COLOR4D color = aSettings->GetLayerColor( IsForceVisible() ? LAYER_HIDDEN : m_layer );

View File

@ -150,7 +150,7 @@ public:
int GetPenWidth() const override; 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 void Move( const wxPoint& aMoveVector ) override
{ {

View File

@ -308,7 +308,7 @@ public:
* *
* @param aOffset drawing offset (usually {0,0} but can be different when moving an object) * @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. * Move the item by \a aMoveVector to a new position.

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = GetJunctionColor(); COLOR4D color = GetJunctionColor();

View File

@ -62,7 +62,7 @@ public:
const EDA_RECT GetBoundingBox() const override; 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 void Move( const wxPoint& aMoveVector ) override
{ {

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = GetLineColor(); COLOR4D color = GetLineColor();

View File

@ -164,7 +164,7 @@ public:
*/ */
double GetLength() const; 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; int GetPenWidth() const override;

View File

@ -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 ); PrintMarker( aSettings, aOffset );
} }

View File

@ -58,7 +58,7 @@ public:
SCH_LAYER_ID GetColorLayer() const; 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 void Plot( PLOTTER* aPlotter ) override
{ {

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();
int half = GetSize() / 2; int half = GetSize() / 2;

View File

@ -69,7 +69,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override; 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; void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) override;

View File

@ -77,7 +77,7 @@ public:
wxString GetSelectMenuText( EDA_UNITS aUnits ) const override; wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aList ) 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 {} void Move( const wxPoint& aMoveVector ) override {}

View File

@ -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: // Ensure links are up to date, even if a library was reloaded for some reason:
std::vector<SCH_ITEM*> junctions; std::vector<SCH_ITEM*> junctions;

View File

@ -276,7 +276,7 @@ public:
* @note This function is useful only for schematic. The library editor and library viewer * @note This function is useful only for schematic. The library editor and library viewer
* do not use a draw list and therefore draws nothing. * 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. * Plot all the schematic objects to \a aPlotter.

View File

@ -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(); wxDC* DC = aSettings->GetPrintDC();
wxPoint pos = m_pos + aOffset; wxPoint pos = m_pos + aOffset;
int lineWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() ); int lineWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
auto* settings = dynamic_cast<KIGFX::SCH_RENDER_SETTINGS*>( aSettings ); const auto* settings = dynamic_cast<const KIGFX::SCH_RENDER_SETTINGS*>( aSettings );
bool override = settings && settings->m_OverrideItemColors; bool override = settings && settings->m_OverrideItemColors;
COLOR4D border = GetBorderColor(); COLOR4D border = GetBorderColor();
COLOR4D background = GetBackgroundColor(); COLOR4D background = GetBackgroundColor();
if( override || border == COLOR4D::UNSPECIFIED ) if( override || border == COLOR4D::UNSPECIFIED )
border = aSettings->GetLayerColor( LAYER_SHEET ); border = aSettings->GetLayerColor( LAYER_SHEET );

View File

@ -121,7 +121,7 @@ public:
*/ */
bool IsMovableFromAnchorPoint() override { return true; } 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. * 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 aPoints = a buffer to fill with polygon corners coordinates
* @param aPos = Position of the shape * @param aPos = Position of the shape
*/ */
void CreateGraphicShape( RENDER_SETTINGS* aSettings, void CreateGraphicShape( const RENDER_SETTINGS* aSettings,
std::vector <wxPoint>& aPoints, const wxPoint& aPos ) override; std::vector <wxPoint>& aPoints, const wxPoint& aPos ) override;
void SwapData( SCH_ITEM* aItem ) override; void SwapData( SCH_ITEM* aItem ) override;
@ -437,7 +437,7 @@ public:
int GetPenWidth() const override; 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. * Return a bounding box for the sheet body but not the fields.

View File

@ -73,7 +73,7 @@ public:
// pure virtuals: // pure virtuals:
void SetPosition( const wxPoint& ) override {} 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 Move( const wxPoint& aMoveVector ) override {}
void MirrorY( int aYaxis_position ) override {} void MirrorY( int aYaxis_position ) override {}
void MirrorX( int aXaxis_position ) override {} void MirrorX( int aXaxis_position ) override {}

View File

@ -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 // The icon selection is handle by the virtual method CreateGraphicShape called by ::Print
SCH_HIERLABEL::Print( aSettings, aOffset ); 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<wxPoint>& aPoints, const wxPoint& aPos ) std::vector<wxPoint>& aPoints, const wxPoint& aPos )
{ {
/* /*

View File

@ -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; 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; double ratio;
if( aSettings ) if( aSettings )
ratio = static_cast<SCH_RENDER_SETTINGS*>( aSettings )->m_TextOffsetRatio; ratio = static_cast<const SCH_RENDER_SETTINGS*>( aSettings )->m_TextOffsetRatio;
else if( Schematic() ) else if( Schematic() )
ratio = Schematic()->Settings().m_TextOffsetRatio; ratio = Schematic()->Settings().m_TextOffsetRatio;
else 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 ); COLOR4D color = aSettings->GetLayerColor( m_layer );
wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings ); wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings );
@ -910,7 +910,7 @@ void SCH_GLOBALLABEL::RunOnChildren( const std::function<void( SCH_ITEM* )>& aFu
} }
wxPoint SCH_GLOBALLABEL::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const wxPoint SCH_GLOBALLABEL::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const
{ {
wxPoint text_offset; wxPoint text_offset;
int dist = GetTextOffset( aSettings ); 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<wxPoint> s_poly; static std::vector<wxPoint> s_poly;
@ -1188,7 +1188,7 @@ void SCH_GLOBALLABEL::Plot( PLOTTER* aPlotter )
m_intersheetRefsField.Plot( aPlotter ); m_intersheetRefsField.Plot( aPlotter );
} }
void SCH_GLOBALLABEL::CreateGraphicShape( RENDER_SETTINGS* aRenderSettings, void SCH_GLOBALLABEL::CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings,
std::vector<wxPoint>& aPoints, const wxPoint& Pos ) std::vector<wxPoint>& aPoints, const wxPoint& Pos )
{ {
int margin = GetTextOffset( aRenderSettings ); 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!" ); 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<wxPoint>& aPoints, const wxPoint& Pos ) std::vector<wxPoint>& aPoints, const wxPoint& Pos )
{ {
int* Template = TemplateShape[static_cast<int>( m_shape )][static_cast<int>( m_spin_style )]; int* Template = TemplateShape[static_cast<int>( m_shape )][static_cast<int>( 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; wxPoint text_offset;
int dist = GetTextOffset( aSettings ); int dist = GetTextOffset( aSettings );

View File

@ -242,9 +242,9 @@ public:
* This offset depends on the orientation, the type of text, and the area required to * 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. * 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. * 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 * @param Pos Position of the shape, for texts and labels: do nothing
* Mainly for derived classes (SCH_SHEET_PIN and Hierarchical labels) * 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 <wxPoint>& aPoints, const wxPoint& Pos ) std::vector <wxPoint>& aPoints, const wxPoint& Pos )
{ {
aPoints.clear(); aPoints.clear();
@ -265,7 +265,7 @@ public:
bool operator<( const SCH_ITEM& aItem ) const override; 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; int GetPenWidth() const override;
@ -408,11 +408,11 @@ public:
void SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle ) override; 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; const EDA_RECT GetBoundingBox() const override;
void CreateGraphicShape( RENDER_SETTINGS* aRenderSettings, void CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings,
std::vector<wxPoint>& aPoints, const wxPoint& aPos ) override; std::vector<wxPoint>& aPoints, const wxPoint& aPos ) override;
void UpdateIntersheetRefProps(); void UpdateIntersheetRefProps();
@ -432,7 +432,7 @@ public:
BITMAP_DEF GetMenuImage() const override; 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; void Plot( PLOTTER* aPlotter ) override;
@ -470,7 +470,7 @@ public:
~SCH_HIERLABEL() { } ~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 ) static inline bool ClassOf( const EDA_ITEM* aItem )
{ {
@ -484,9 +484,9 @@ public:
void SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle ) override; 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<wxPoint>& aPoints, void CreateGraphicShape( const RENDER_SETTINGS* aSettings, std::vector<wxPoint>& aPoints,
const wxPoint& Pos ) override; const wxPoint& Pos ) override;
const EDA_RECT GetBoundingBox() const override; const EDA_RECT GetBoundingBox() const override;

View File

@ -284,7 +284,7 @@ public:
/** /**
* Print a page. * 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. * Create the SVG print file for the current edited symbol.

View File

@ -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 ) if( !m_my_part )
return; return;

View File

@ -297,7 +297,7 @@ public:
* @param aFilename The filename to display in basic inscriptions. * @param aFilename The filename to display in basic inscriptions.
* @param aSheetLayer The layer displayed from PcbNew. * @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 ); const wxString& aFilename, const wxString& aSheetLayer = wxEmptyString );
void DisplayToolMsg( const wxString& msg ) override; void DisplayToolMsg( const wxString& msg ) override;
@ -385,7 +385,7 @@ public:
* *
* @param aDC wxDC given by the calling print function * @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. * Use to start up the GAL drawing canvas.

View File

@ -272,8 +272,8 @@ public:
* @param aColor text color. * @param aColor text color.
* @param aDisplay_mode #FILLED or #SKETCH. * @param aDisplay_mode #FILLED or #SKETCH.
*/ */
void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor, void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
OUTLINE_MODE aDisplay_mode = FILLED ); COLOR4D aColor, OUTLINE_MODE aDisplay_mode = FILLED );
/** /**
* Convert the text shape to a list of segment. * Convert the text shape to a list of segment.
@ -383,7 +383,7 @@ private:
* @param aText the single line of text to draw. * @param aText the single line of text to draw.
* @param aPos the position of this line ). * @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 ); OUTLINE_MODE aFillMode, const wxString& aText, const wxPoint& aPos );
wxString m_text; wxString m_text;

View File

@ -76,7 +76,7 @@ public:
/** /**
* Print the shape is the polygon defined in m_Corners (array of wxPoints). * 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. * @return the position of this marker in internal units.

View File

@ -76,13 +76,13 @@ public:
} }
// The function to print a WS_DRAW_ITEM // 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 ) ); PrintWsItem( aSettings, wxPoint( 0, 0 ) );
} }
// More advanced version of DrawWsItem. This is what must be defined in the derived type. // 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 // Derived types must define GetBoundingBox() as a minimum, and can then override the
// two HitTest() functions if they need something more specific. // two HitTest() functions if they need something more specific.
@ -141,7 +141,7 @@ public:
const EDA_RECT GetBoundingBox() const override; const EDA_RECT GetBoundingBox() const override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) 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; 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 wxPoint& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const EDA_RECT& aRect, bool aContained, 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; wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
@ -224,7 +224,7 @@ public:
wxPoint GetPosition() const override { return GetStart(); } wxPoint GetPosition() const override { return GetStart(); }
void SetPosition( const wxPoint& aPos ) override { SetStart( aPos ); } 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; const EDA_RECT GetBoundingBox() const override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) 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 ); } wxPoint GetPosition() const override { return wxPoint( 0, 0 ); }
void SetPosition( const wxPoint& aPos ) override { /* do nothing */ } 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; const EDA_RECT GetBoundingBox() const override;
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override { return false; } 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" ); } 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; void SetTextAngle( double aAngle ) override;
@ -350,7 +350,7 @@ public:
wxPoint GetPosition() const override { return m_pos; } wxPoint GetPosition() const override { return m_pos; }
void SetPosition( const wxPoint& aPos ) override { m_pos = aPos; } 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 wxPoint& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const EDA_RECT& aRect, bool aContained, 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 * Draws the item list created by BuildWorkSheetGraphicList
*/ */
void Print( RENDER_SETTINGS* aSettings ); void Print( const RENDER_SETTINGS* aSettings );
/** /**
* Drawing or plot the page layout. * Drawing or plot the page layout.

View File

@ -150,7 +150,7 @@ private:
* - the LTmargin The left top margin of the page layout. * - the LTmargin The left top margin of the page layout.
* - the RBmargin The right bottom 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 wxString& aFullSheetName, const wxString& aFileName,
const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber, const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber,
double aScalar, const PROJECT* aProject, double aScalar, const PROJECT* aProject,

View File

@ -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 ); GetScreen()->SetVirtualPageNumber( GetPageNumberOption() ? 1 : 2 );
WS_DATA_MODEL& model = WS_DATA_MODEL::GetTheInstance(); WS_DATA_MODEL& model = WS_DATA_MODEL::GetTheInstance();

View File

@ -217,7 +217,7 @@ public:
* used to print a page * used to print a page
* @param aDC = wxDC given by the calling print function * @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 OnFileHistory( wxCommandEvent& event );
void OnClearFileHistory( wxCommandEvent& aEvent ); void OnClearFileHistory( wxCommandEvent& aEvent );