KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_PRINTOUT Class Reference

Custom print out for printing schematics. More...

#include <sch_printout.h>

Inheritance diagram for SCH_PRINTOUT:

Public Member Functions

 SCH_PRINTOUT (SCH_EDIT_FRAME *aParent, const wxString &aTitle)
 
bool OnPrintPage (int page) override
 
bool HasPage (int page) override
 
bool OnBeginDocument (int startPage, int endPage) override
 
void GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) override
 
bool PrintPage (SCH_SCREEN *aScreen, wxDC *aDC, bool aForPrinting)
 Print the current SCH_SCREEN using a given wxDC.
 

Private Member Functions

int milsToIU (int aMils)
 

Private Attributes

SCH_EDIT_FRAMEm_parent
 Source VIEW object (note that actual printing only refers to this object)
 
const KIGFX::SCH_VIEWm_view
 

Detailed Description

Custom print out for printing schematics.

Definition at line 38 of file sch_printout.h.

Constructor & Destructor Documentation

◆ SCH_PRINTOUT()

SCH_PRINTOUT::SCH_PRINTOUT ( SCH_EDIT_FRAME * aParent,
const wxString & aTitle )

Definition at line 44 of file sch_printout.cpp.

References m_parent, and m_view.

Member Function Documentation

◆ GetPageInfo()

void SCH_PRINTOUT::GetPageInfo ( int * minPage,
int * maxPage,
int * selPageFrom,
int * selPageTo )
override

Definition at line 53 of file sch_printout.cpp.

References m_parent.

◆ HasPage()

bool SCH_PRINTOUT::HasPage ( int page)
override

Definition at line 60 of file sch_printout.cpp.

References m_parent.

◆ milsToIU()

int SCH_PRINTOUT::milsToIU ( int aMils)
private

Definition at line 118 of file sch_printout.cpp.

References KiROUND(), and schIUScale.

Referenced by PrintPage().

◆ OnBeginDocument()

bool SCH_PRINTOUT::OnBeginDocument ( int startPage,
int endPage )
override

Definition at line 66 of file sch_printout.cpp.

◆ OnPrintPage()

◆ PrintPage()

bool SCH_PRINTOUT::PrintPage ( SCH_SCREEN * aScreen,
wxDC * aDC,
bool aForPrinting )

Print the current SCH_SCREEN using a given wxDC.

Parameters
aScreenis the screen corresponding to the sheet to print
aDCis the drawing context to use. It can be only a wxDC returned by wxPrintout::GetDC() (a wxPrinterDC, a wxPostScriptDC or a wxMemoryDC ) a wxMemoryDC (to print to the clipboard)
aForPrinting= true to draw to a printer, false to a wxMeoryDC used to draw to the Clipboard
Returns
true if OK

Definition at line 127 of file sch_printout.cpp.

References KIGFX::AA_HIGHQUALITY, KIGFX::GAL_DISPLAY_OPTIONS::antialiasing_mode, APP_SETTINGS_BASE::PRINTING::background, COLOR4D::BLACK, BOX2< Vec >::Centre(), KIGFX::GAL::ClearScreen(), APP_SETTINGS_BASE::PRINTING::color_theme, KIGFX::GAL_PRINT::Create(), EESCHEMA_SETTINGS::APPEARANCE::default_font, DEFAULT_THEME, SCH_RENDER_SETTINGS::GetBackgroundColor(), COLOR_SETTINGS::GetColor(), GetColorSettings(), BOX2< Vec >::GetHeight(), KIGFX::RENDER_SETTINGS::GetLayerColor(), SCH_SCREEN::GetPageSettings(), KIGFX::GAL::GetScreenPixelSize(), SCH_SELECTION_TOOL::GetSelection(), PAGE_INFO::GetSizeIU(), BOX2< Vec >::GetWidth(), KIGFX::PRINT_CONTEXT::HasNativeLandscapeRotation(), LAYER_DRAWINGSHEET, LAYER_ID_COUNT, LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_DRAWINGSHEET, LAYER_SELECT_OVERLAY, SCH_RENDER_SETTINGS::LoadColors(), EESCHEMA_SETTINGS::m_Appearance, SCH_RENDER_SETTINGS::m_OverrideItemColors, m_parent, APP_SETTINGS_BASE::m_Printing, SCH_RENDER_SETTINGS::m_ShowPinsElectricalType, m_view, milsToIU(), APP_SETTINGS_BASE::PRINTING::monochrome, KIGFX::GAL::ResizeScreen(), SCH_WORLD_UNIT(), schIUScale, SCH_RENDER_SETTINGS::SetBackgroundColor(), KIGFX::GAL::SetClearColor(), KIGFX::RENDER_SETTINGS::SetDefaultFont(), KIGFX::RENDER_SETTINGS::SetIsPrinting(), KIGFX::RENDER_SETTINGS::SetLayerColor(), KIGFX::GAL::SetLookAtPoint(), KIGFX::RENDER_SETTINGS::SetPrintBlackAndWhite(), KIGFX::GAL::SetWorldUnitLength(), KIGFX::GAL::SetZoomFactor(), KIGFX::TARGET_NONCACHED, APP_SETTINGS_BASE::PRINTING::title_block, APP_SETTINGS_BASE::PRINTING::use_theme, KIGFX::VIEW::VIEW_MAX_LAYERS, COLOR4D::WHITE, KIGFX::COLOR4D::WithAlpha(), VECTOR2< T >::x, VECTOR2< T >::y, ZOOM_MAX_LIMIT_EESCHEMA, and ZOOM_MIN_LIMIT_EESCHEMA.

Referenced by SCH_EDIT_FRAME::DrawCurrentSheetToClipboard(), and OnPrintPage().

Member Data Documentation

◆ m_parent

SCH_EDIT_FRAME* SCH_PRINTOUT::m_parent
private

Source VIEW object (note that actual printing only refers to this object)

Definition at line 61 of file sch_printout.h.

Referenced by GetPageInfo(), HasPage(), OnPrintPage(), PrintPage(), and SCH_PRINTOUT().

◆ m_view

const KIGFX::SCH_VIEW* SCH_PRINTOUT::m_view
private

Definition at line 63 of file sch_printout.h.

Referenced by PrintPage(), and SCH_PRINTOUT().


The documentation for this class was generated from the following files: