KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_printout.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2023 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2023, 2024 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include "sch_printout.h"
22#include <tool/tool_manager.h>
24#include <sch_edit_frame.h>
25#include <math/vector2wx.h>
26#include <pgm_base.h>
29#include <sch_painter.h>
30
31#include <view/view.h>
32#include <gal/gal_print.h>
34#include <gal/painter.h>
35#include <zoom_defines.h>
37#include <string_utils.h>
38#include <wx/dcprint.h>
39#include <wx/log.h>
40#include <wx/dcmemory.h>
41#include <wx/log.h>
42
43
44SCH_PRINTOUT::SCH_PRINTOUT( SCH_EDIT_FRAME* aParent, const wxString& aTitle, bool aUseCairo ) :
45 wxPrintout( aTitle )
46{
47 wxASSERT( aParent != nullptr );
48 m_parent = aParent;
49 m_useCairo = aUseCairo;
50 m_view = nullptr;
51}
52
53
54void SCH_PRINTOUT::GetPageInfo( int* minPage, int* maxPage, int* selPageFrom, int* selPageTo )
55{
56 *minPage = *selPageFrom = 1;
57 *maxPage = *selPageTo = m_parent->Schematic().Root().CountSheets();
58}
59
60
61bool SCH_PRINTOUT::HasPage( int pageNum )
62{
63 return m_parent->Schematic().Root().CountSheets() >= pageNum;
64}
65
66
67bool SCH_PRINTOUT::OnBeginDocument( int startPage, int endPage )
68{
69 if( !wxPrintout::OnBeginDocument( startPage, endPage ) )
70 return false;
71
72 return true;
73}
74
75
77{
79 sheetList.SortByPageNumbers( false );
80
81 wxCHECK_MSG( page >= 1 && page <= (int)sheetList.size(), false,
82 wxT( "Cannot print invalid page number." ) );
83
84 wxCHECK_MSG( sheetList[ page - 1].LastScreen() != nullptr, false,
85 wxT( "Cannot print page with NULL screen." ) );
86
87 wxString msg;
88 msg.Printf( _( "Print page %d" ), page );
89 m_parent->SetMsgPanel( msg, wxEmptyString );
90
91 SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
92
93 // Switch to the new current sheet
94 m_parent->SetCurrentSheet( sheetList[ page - 1 ] );
99 // Ensure the displayed page number is updated:
100 KIGFX::SCH_VIEW* sch_view = m_parent->GetCanvas()->GetView();
101 sch_view->GetDrawingSheet()->SetPageNumber( TO_UTF8( screen->GetPageNumber() ) );
102
103 // Print page using the current wxPrinterDC
104 PrintPage( screen, GetDC(), true );
105
106 // Restore the initial current sheet
107 m_parent->SetCurrentSheet( oldsheetpath );
110 screen = m_parent->GetCurrentSheet().LastScreen();
111 sch_view->GetDrawingSheet()->SetPageNumber( TO_UTF8( screen->GetPageNumber() ) );
112
113 return true;
114}
115
116
118{
119 return KiROUND( aMils * schIUScale.IU_PER_MILS );
120}
121
122
123/*
124 * This is the real print function: print the active screen
125 */
126bool SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen, wxDC* aDC, bool aForPrinting )
127{
128 // Note: some data (like paper size) is available only when printing
129
130 if( !m_useCairo )
131 {
132 // Version using print to a wxDC
133 // Warning:
134 // When printing many pages, changes in the current wxDC will affect all next printings
135 // because all prints are using the same wxPrinterDC after creation
136 // So be careful and reinit parameters, especially when using offsets.
137
138 VECTOR2I tmp_startvisu;
139 wxSize pageSizeIU; // Page size in internal units
140 VECTOR2I old_org;
141 wxRect fitRect;
142 wxDC* dc = aDC;
143
144 wxBusyCursor dummy;
145
146 // Save current offsets and clip box.
147 tmp_startvisu = aScreen->m_StartVisu;
148 old_org = aScreen->m_DrawOrg;
149
153
154 // Change scale factor and offset to print the whole page.
155 bool printDrawingSheet = cfg->m_Printing.title_block;
156
157 pageSizeIU = ToWxSize( aScreen->GetPageSettings().GetSizeIU( schIUScale.IU_PER_MILS ) );
158 FitThisSizeToPaper( pageSizeIU );
159
160 if( aForPrinting )
161 fitRect = GetLogicalPaperRect();
162 else
163 {
164 fitRect = wxRect( 0, 0, 6000, 4000 );
165
166 if( wxMemoryDC* memdc = dynamic_cast<wxMemoryDC*>( dc ) )
167 {
168 wxBitmap& bm = memdc->GetSelectedBitmap();
169 fitRect = wxRect( 0, 0, bm.GetWidth(), bm.GetHeight() );
170
171 // If the dc is a memory dc (should be the case when not printing on a printer,
172 // i.e. when printing on the clipboard), calculate a suitable dc user scale
173 double dc_scale;
174 double ppi = 300; // Use 300 pixels per inch to create bitmap images on start
175 double inch2Iu = 1000.0 * schIUScale.IU_PER_MILS;
176 dc_scale = ppi / inch2Iu;
177 dc->SetUserScale( dc_scale, dc_scale );
178 }
179 }
180
181 // When is the actual paper size does not match the schematic page size, the drawing will
182 // not be centered on X or Y axis. Give a draw offset to center the schematic page on the
183 // paper draw area.
184 int xoffset = ( fitRect.width - pageSizeIU.x ) / 2;
185 int yoffset = ( fitRect.height - pageSizeIU.y ) / 2;
186
187 // Using a wxAffineMatrix2D has a big advantage: it handles different pages orientations
188 //(PORTRAIT/LANDSCAPE), but the affine matrix is not always supported
189 if( dc->CanUseTransformMatrix() && aForPrinting )
190 {
191 wxAffineMatrix2D matrix; // starts from a unity matrix (the current wxDC default)
192
193 // Check for portrait/landscape mismatch:
194 if( ( fitRect.width > fitRect.height ) != ( pageSizeIU.x > pageSizeIU.y ) )
195 {
196 // Rotate the coordinates, and keep the draw coordinates inside the page
197 matrix.Rotate( M_PI_2 );
198 matrix.Translate( 0, -pageSizeIU.y );
199
200 // Recalculate the offsets and page sizes according to the page rotation
201 std::swap( pageSizeIU.x, pageSizeIU.y );
202 FitThisSizeToPaper( pageSizeIU );
203 fitRect = GetLogicalPaperRect();
204
205 xoffset = ( fitRect.width - pageSizeIU.x ) / 2;
206 yoffset = ( fitRect.height - pageSizeIU.y ) / 2;
207
208 // All the coordinates will be rotated 90 deg when printing,
209 // so the X,Y offset vector must be rotated -90 deg before printing
210 std::swap( xoffset, yoffset );
211 std::swap( fitRect.width, fitRect.height );
212 yoffset = -yoffset;
213 }
214
215 matrix.Translate( xoffset, yoffset );
216 dc->SetTransformMatrix( matrix );
217
218 fitRect.x -= xoffset;
219 fitRect.y -= yoffset;
220 }
221 else if( aForPrinting )
222 {
223 SetLogicalOrigin( 0, 0 ); // Reset all offset settings made previously.
224 // When printing previous pages (all prints are using the same wxDC)
225 OffsetLogicalOrigin( xoffset, yoffset );
226 }
227
228 dc->SetLogicalFunction( wxCOPY );
229 GRResetPenAndBrush( dc );
230
231 COLOR4D savedBgColor = m_parent->GetDrawBgColor();
233
234 if( cfg->m_Printing.background )
235 {
236 if( cfg->m_Printing.use_theme && theme )
237 bgColor = theme->GetColor( LAYER_SCHEMATIC_BACKGROUND );
238 }
239 else
240 {
241 bgColor = COLOR4D::WHITE;
242 }
243
244 m_parent->SetDrawBgColor( bgColor );
245
246 GRSFilledRect( dc, fitRect.GetX(), fitRect.GetY(), fitRect.GetRight(), fitRect.GetBottom(), 0,
247 bgColor, bgColor );
248
249 if( cfg->m_Printing.monochrome )
250 GRForceBlackPen( true );
251
252 SCH_RENDER_SETTINGS renderSettings( *m_parent->GetRenderSettings() );
253 renderSettings.SetPrintDC( dc );
254
255 if( cfg->m_Printing.use_theme && theme )
256 renderSettings.LoadColors( theme );
257
258 renderSettings.SetBackgroundColor( bgColor );
259
260 // The drawing-sheet-item print code is shared between PCBNew and Eeschema, so it's easier
261 // if they just use the PCB layer.
262 renderSettings.SetLayerColor( LAYER_DRAWINGSHEET,
264
265 renderSettings.SetDefaultFont( cfg->m_Appearance.default_font );
266
267 if( printDrawingSheet )
268 {
269 m_parent->PrintDrawingSheet( &renderSettings, aScreen, aScreen->Schematic()->GetProperties(),
270 schIUScale.IU_PER_MILS, aScreen->GetFileName(), wxEmptyString );
271 }
272
273 renderSettings.SetIsPrinting( true );
274
275 aScreen->Print( &renderSettings );
276
277 m_parent->SetDrawBgColor( savedBgColor );
278
279 GRForceBlackPen( false );
280
281 aScreen->m_StartVisu = tmp_startvisu;
282 aScreen->m_DrawOrg = old_org;
283 }
284 else
285 {
286 wxDC* dc = aDC;
290 std::unique_ptr<KIGFX::GAL_PRINT> galPrint = KIGFX::GAL_PRINT::Create( options, dc );
291 KIGFX::GAL* gal = galPrint->GetGAL();
292 KIGFX::PRINT_CONTEXT* printCtx = galPrint->GetPrintCtx();
293 std::unique_ptr<KIGFX::SCH_PAINTER> painter = std::make_unique<KIGFX::SCH_PAINTER>( gal );
294 std::unique_ptr<KIGFX::VIEW> view( m_view->DataReference() );
295
296 painter->SetSchematic( &m_parent->Schematic() );
297
302
303 // Target paper size
304 wxRect pageSizePix;
305 wxSize dcPPI = dc->GetPPI();
306
307 if( aForPrinting )
308 pageSizePix = GetLogicalPageRect();
309 else
310 {
311 dc->SetUserScale( 1, 1 );
312
313 if( wxMemoryDC* memdc = dynamic_cast<wxMemoryDC*>( dc ) )
314 {
315 wxBitmap& bm = memdc->GetSelectedBitmap();
316 pageSizePix = wxRect( 0, 0, bm.GetWidth(), bm.GetHeight() );
317 }
318 else
319 {
320 return false;
321 }
322 }
323
324 const VECTOR2D pageSizeIn( (double) pageSizePix.width / dcPPI.x,
325 (double) pageSizePix.height / dcPPI.y );
326 const VECTOR2D pageSizeIU( milsToIU( pageSizeIn.x * 1000 ), milsToIU( pageSizeIn.y * 1000 ) );
327
328 galPrint->SetSheetSize( pageSizeIn );
329
330 view->SetGAL( gal );
331 view->SetPainter( painter.get() );
332 view->SetScaleLimits( ZOOM_MAX_LIMIT_EESCHEMA, ZOOM_MIN_LIMIT_EESCHEMA );
333 view->SetScale( 1.0 );
335
336 // Init the SCH_RENDER_SETTINGS used by the painter used to print schematic
337 SCH_RENDER_SETTINGS* dstSettings = painter->GetSettings();
338
339 dstSettings->m_ShowPinsElectricalType = false;
340
341 // Set the color scheme
342 dstSettings->LoadColors( m_parent->GetColorSettings( false ) );
343
344 if( cfg->m_Printing.use_theme && theme )
345 dstSettings->LoadColors( theme );
346
347 bool printDrawingSheet = cfg->m_Printing.title_block;
348
350
351 if( cfg->m_Printing.background )
352 {
353 if( cfg->m_Printing.use_theme && theme )
354 bgColor = theme->GetColor( LAYER_SCHEMATIC_BACKGROUND );
355 }
356 else
357 {
358 bgColor = COLOR4D::WHITE;
359 }
360
361 dstSettings->SetBackgroundColor( bgColor );
362
363 // The drawing-sheet-item print code is shared between PCBNew and Eeschema, so it's easier
364 // if they just use the PCB layer.
365 dstSettings->SetLayerColor( LAYER_DRAWINGSHEET,
367
368 dstSettings->SetDefaultFont( cfg->m_Appearance.default_font );
369
370 if( cfg->m_Printing.monochrome )
371 {
372 for( int i = 0; i < LAYER_ID_COUNT; ++i )
373 dstSettings->SetLayerColor( i, COLOR4D::BLACK );
374
375 // In B&W mode, draw the background only in white, because any other color
376 // will be replaced by a black background
377 dstSettings->SetBackgroundColor( COLOR4D::WHITE );
378 dstSettings->m_OverrideItemColors = true;
379
380 // Disable print some backgrounds
381 dstSettings->SetPrintBlackAndWhite( true );
382 }
383 else // color enabled
384 {
385 for( int i = 0; i < LAYER_ID_COUNT; ++i )
386 {
387 // Cairo does not support translucent colors on PostScript surfaces
388 // see 'Features support by the PostScript surface' on
389 // https://www.cairographics.org/documentation/using_the_postscript_surface/
390 dstSettings->SetLayerColor( i, dstSettings->GetLayerColor( i ).WithAlpha( 1.0 ) );
391 }
392 }
393
394 dstSettings->SetIsPrinting( true );
395
396 VECTOR2I sheetSizeIU = aScreen->GetPageSettings().GetSizeIU( schIUScale.IU_PER_MILS );
397 BOX2I drawingAreaBBox = BOX2I( VECTOR2I( 0, 0 ), VECTOR2I( sheetSizeIU ) );
398
399 // Enable all layers and use KIGFX::TARGET_NONCACHED to force update drawings
400 // for printing with current GAL instance
401 for( int i = 0; i < KIGFX::VIEW::VIEW_MAX_LAYERS; ++i )
402 {
403 view->SetLayerVisible( i, true );
404 view->SetLayerTarget( i, KIGFX::TARGET_NONCACHED );
405 }
406
407 view->SetLayerVisible( LAYER_DRAWINGSHEET, printDrawingSheet );
408
409 // Don't draw the selection if it's not from the current screen
410 for( EDA_ITEM* item : selTool->GetSelection() )
411 {
412 if( SCH_ITEM* schItem = dynamic_cast<SCH_ITEM*>( item ) )
413 {
414 if( !m_parent->GetScreen()->CheckIfOnDrawList( schItem ) )
415 view->SetLayerVisible( LAYER_SELECT_OVERLAY, false );
416
417 break;
418 }
419 }
420
421 // When is the actual paper size does not match the schematic page size,
422 // we need to adjust the print scale to fit the selected paper size (pageSizeIU)
423 double scaleX = (double) pageSizeIU.x / drawingAreaBBox.GetWidth();
424 double scaleY = (double) pageSizeIU.y / drawingAreaBBox.GetHeight();
425
426 double print_scale = std::min( scaleX, scaleY );
427
428 galPrint->SetNativePaperSize( pageSizeIn, printCtx->HasNativeLandscapeRotation() );
429 gal->SetLookAtPoint( drawingAreaBBox.Centre() );
430 gal->SetZoomFactor( print_scale );
431 gal->SetClearColor( dstSettings->GetBackgroundColor() );
432 gal->ResizeScreen( pageSizePix.GetWidth(),pageSizePix.GetHeight() );
433 gal->ClearScreen();
434
435 // Needed to use the same order for printing as for screen redraw
436 view->UseDrawPriority( true );
437
438 {
440 view->Redraw();
441 }
442 }
443
444 return true;
445}
constexpr EDA_IU_SCALE schIUScale
Definition: base_units.h:110
BOX2< VECTOR2I > BOX2I
Definition: box2.h:922
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition: box2.h:990
VECTOR2I m_DrawOrg
offsets for drawing the circuit on the screen
Definition: base_screen.h:88
VECTOR2I m_StartVisu
Coordinates in drawing units of the current view position (upper left corner of device)
Definition: base_screen.h:93
const wxString & GetPageNumber() const
Definition: base_screen.cpp:70
constexpr size_type GetWidth() const
Definition: box2.h:214
constexpr Vec Centre() const
Definition: box2.h:97
constexpr size_type GetHeight() const
Definition: box2.h:215
Color settings are a bit different than most of the settings objects in that there can be more than o...
COLOR4D GetColor(int aLayer) const
void SetPageNumber(const std::string &aPageNumber)
Changes the page number displayed in the title block.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void SetDrawBgColor(const COLOR4D &aColor)
void PrintDrawingSheet(const RENDER_SETTINGS *aSettings, BASE_SCREEN *aScreen, const std::map< wxString, wxString > *aProperties, double aMils2Iu, const wxString &aFilename, const wxString &aSheetLayer=wxEmptyString)
Prints the drawing-sheet (frame and title block).
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:89
EE_SELECTION & GetSelection()
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
Definition: color4d.h:311
CAIRO_ANTIALIASING_MODE cairo_antialiasing_mode
The grid style to draw the grid in.
static std::unique_ptr< GAL_PRINT > Create(GAL_DISPLAY_OPTIONS &aOptions, wxDC *aDC)
Abstract interface for drawing on a 2D-surface.
virtual void ResizeScreen(int aWidth, int aHeight)
Resize the canvas.
void SetZoomFactor(double aZoomFactor)
void SetLookAtPoint(const VECTOR2D &aPoint)
Get/set the Point in world space to look at.
virtual void ClearScreen()
Clear the screen.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
void SetClearColor(const COLOR4D &aColor)
virtual bool HasNativeLandscapeRotation() const =0
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
void SetDefaultFont(const wxString &aFont)
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void SetPrintBlackAndWhite(bool aPrintBlackAndWhite)
void SetPrintDC(wxDC *aDC)
void SetIsPrinting(bool isPrinting)
DS_PROXY_VIEW_ITEM * GetDrawingSheet() const
Definition: sch_view.h:103
static constexpr int VIEW_MAX_LAYERS
Rendering order modifier for layers that are marked as top layers.
Definition: view.h:742
std::unique_ptr< VIEW > DataReference() const
Return a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs.
Definition: view.cpp:1586
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
Definition: page_info.h:171
virtual SETTINGS_MANAGER & GetSettingsManager() const
Definition: pgm_base.h:142
SCH_SHEET_LIST Hierarchy() const override
Return the full schematic flattened hierarchical sheet list.
Definition: schematic.cpp:214
const std::map< wxString, wxString > * GetProperties()
Definition: schematic.h:95
SCH_SHEET & Root() const
Definition: schematic.h:125
SCH_RENDER_SETTINGS * GetRenderSettings()
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
EESCHEMA_SETTINGS * eeconfig() const
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
COLOR4D GetDrawBgColor() const override
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
Schematic editor (Eeschema) main window.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:166
bool HasPage(int page) override
bool OnPrintPage(int page) override
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) override
const KIGFX::SCH_VIEW * m_view
Definition: sch_printout.h:63
SCH_PRINTOUT(SCH_EDIT_FRAME *aParent, const wxString &aTitle, bool aUseCairo)
SCH_EDIT_FRAME * m_parent
Source VIEW object (note that actual printing only refers to this object)
Definition: sch_printout.h:61
bool PrintPage(SCH_SCREEN *aScreen, wxDC *aDC, bool aForPrinting)
Print the current SCH_SCREEN using a given wxDC.
int milsToIU(int aMils)
bool OnBeginDocument(int startPage, int endPage) override
void SetBackgroundColor(const COLOR4D &aColor) override
Set the background color.
const KIGFX::COLOR4D & GetBackgroundColor() const override
Return current background color settings.
void LoadColors(const COLOR_SETTINGS *aSettings) override
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:130
const wxString & GetFileName() const
Definition: sch_screen.h:143
void Print(const SCH_RENDER_SETTINGS *aSettings)
Print all the items in the screen to aDC.
Definition: sch_screen.cpp:854
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:100
bool CheckIfOnDrawList(const SCH_ITEM *aItem) const
Definition: sch_screen.cpp:386
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void SortByPageNumbers(bool aUpdateVirtualPageNums=true)
Sort the list of sheets by page number.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
SCH_SCREEN * LastScreen()
int CountSheets() const
Count the number of sheets found in "this" sheet including all of the subsheets.
Definition: sch_sheet.cpp:838
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:55
#define _(s)
void GRForceBlackPen(bool flagforce)
Definition: gr_basic.cpp:159
void GRResetPenAndBrush(wxDC *DC)
Definition: gr_basic.cpp:73
void GRSFilledRect(wxDC *aDC, int x1, int y1, int x2, int y2, int aWidth, const COLOR4D &aColor, const COLOR4D &aBgColor)
Definition: gr_basic.cpp:422
#define LAYER_ID_COUNT
Must update this if you add any enums after GerbView!
Definition: layer_ids.h:481
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
Definition: layer_ids.h:218
@ LAYER_SELECT_OVERLAY
currently selected items overlay
Definition: layer_ids.h:220
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition: layer_ids.h:398
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:391
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
Definition: definitions.h:38
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: pgm_base.cpp:1060
see class PGM_BASE
constexpr double SCH_WORLD_UNIT(1e-7/0.0254)
std::vector< FAB_LAYER_COLOR > dummy
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: string_utils.h:398
bool monochrome
Whether or not to print in monochrome.
Definition: app_settings.h:141
bool background
Whether or not to print background color.
Definition: app_settings.h:140
wxString color_theme
Color theme to use for printing.
Definition: app_settings.h:144
bool title_block
Whether or not to print title block.
Definition: app_settings.h:145
bool use_theme
If false, display color theme will be used.
Definition: app_settings.h:143
const double IU_PER_MILS
Definition: base_units.h:77
#define M_PI_2
Definition: transline.cpp:40
VECTOR2< int32_t > VECTOR2I
Definition: vector2d.h:691
wxSize ToWxSize(const VECTOR2I &aSize)
Definition: vector2wx.h:55
#define ZOOM_MIN_LIMIT_EESCHEMA
Definition: zoom_defines.h:51
#define ZOOM_MAX_LIMIT_EESCHEMA
Definition: zoom_defines.h:50