167 changed files with 896 additions and 3180 deletions
-
563d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp
-
6common/CMakeLists.txt
-
6common/dialogs/dialog_page_settings.cpp
-
60common/eda_text.cpp
-
67common/gr_text.cpp
-
54common/legacy_gal/eda_draw_frame.cpp
-
10common/legacy_gal/other.cpp
-
60common/legacy_wx/eda_draw_frame.cpp
-
112common/legacy_wx/eda_draw_panel.cpp
-
35common/legacy_wx/other.cpp
-
20common/marker_base.cpp
-
2common/page_layout/ws_data_item.cpp
-
2common/page_layout/ws_data_model.cpp
-
40common/page_layout/ws_draw_item.cpp
-
2common/plotters/common_plot_functions.cpp
-
2common/plotters/plotter.cpp
-
12cvpcb/display_footprints_frame.cpp
-
16eeschema/class_libentry.cpp
-
28eeschema/class_libentry.h
-
2eeschema/dialogs/dialog_edit_label.cpp
-
2eeschema/dialogs/dialog_lib_edit_pin.cpp
-
31eeschema/dialogs/dialog_print_using_printer.cpp
-
3eeschema/edit_label.cpp
-
1eeschema/getpart.cpp
-
15eeschema/lib_arc.cpp
-
7eeschema/lib_arc.h
-
12eeschema/lib_bezier.cpp
-
4eeschema/lib_bezier.h
-
12eeschema/lib_circle.cpp
-
4eeschema/lib_circle.h
-
5eeschema/lib_draw_item.cpp
-
13eeschema/lib_draw_item.h
-
12eeschema/lib_field.cpp
-
6eeschema/lib_field.h
-
161eeschema/lib_pin.cpp
-
19eeschema/lib_pin.h
-
11eeschema/lib_polyline.cpp
-
4eeschema/lib_polyline.h
-
11eeschema/lib_rectangle.cpp
-
4eeschema/lib_rectangle.h
-
19eeschema/lib_text.cpp
-
7eeschema/lib_text.h
-
1eeschema/libedit/lib_edit_frame.cpp
-
11eeschema/libedit/lib_edit_frame.h
-
22eeschema/libedit/libedit.cpp
-
2eeschema/libedit/libedit_plot_component.cpp
-
1eeschema/project_rescue.cpp
-
2eeschema/sch_base_frame.cpp
-
2eeschema/sch_bitmap.cpp
-
2eeschema/sch_bitmap.h
-
20eeschema/sch_bus_entry.cpp
-
2eeschema/sch_bus_entry.h
-
15eeschema/sch_component.cpp
-
5eeschema/sch_component.h
-
18eeschema/sch_draw_panel.cpp
-
3eeschema/sch_draw_panel.h
-
2eeschema/sch_eagle_plugin.cpp
-
4eeschema/sch_edit_frame.cpp
-
21eeschema/sch_field.cpp
-
2eeschema/sch_field.h
-
9eeschema/sch_item.h
-
4eeschema/sch_junction.cpp
-
2eeschema/sch_junction.h
-
2eeschema/sch_legacy_plugin.cpp
-
4eeschema/sch_line.cpp
-
2eeschema/sch_line.h
-
4eeschema/sch_marker.cpp
-
2eeschema/sch_marker.h
-
12eeschema/sch_no_connect.cpp
-
2eeschema/sch_no_connect.h
-
2eeschema/sch_painter.cpp
-
2eeschema/sch_pin.h
-
31eeschema/sch_screen.cpp
-
5eeschema/sch_screen.h
-
19eeschema/sch_sheet.cpp
-
4eeschema/sch_sheet.h
-
9eeschema/sch_sheet_pin.cpp
-
60eeschema/sch_text.cpp
-
6eeschema/sch_text.h
-
4eeschema/sheet.cpp
-
1gerbview/events_called_functions.cpp
-
313gerbview/gbr_layout.cpp
-
55gerbview/gbr_layout.h
-
67gerbview/gerber_draw_item.cpp
-
32gerbview/gerber_draw_item.h
-
8include/class_board_item.h
-
14include/draw_frame.h
-
1include/eda_base_frame.h
-
25include/eda_text.h
-
1include/gr_basic.h
-
48include/gr_text.h
-
203include/kicad_device_context.h
-
94include/legacy_gal/class_drawpanel.h
-
111include/legacy_wx/class_drawpanel.h
-
6include/marker_base.h
-
7include/origin_viewitem.h
-
2include/plotter.h
-
30include/ws_draw_item.h
-
24include/ws_painter.h
-
14pagelayout_editor/dialogs/dialogs_for_printing.cpp
@ -1,10 +0,0 @@ |
|||
#include "fctsys.h"
|
|||
#include "gr_basic.h"
|
|||
#include "class_drawpanel.h"
|
|||
#include "marker_base.h"
|
|||
|
|||
|
|||
|
|||
void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset ) |
|||
{ |
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
#include "fctsys.h"
|
|||
#include "gr_basic.h"
|
|||
#include "base_screen.h"
|
|||
#include "common.h"
|
|||
#include "macros.h"
|
|||
#include "class_drawpanel.h"
|
|||
#include "marker_base.h"
|
|||
#include "dialog_display_info_HTML_base.h"
|
|||
|
|||
|
|||
void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset ) |
|||
{ |
|||
// Build the marker shape polygon in internal units:
|
|||
const int ccount = GetShapePolygonCornerCount(); |
|||
std::vector<wxPoint> shape; |
|||
shape.reserve( ccount ); |
|||
|
|||
for( int ii = 0; ii < ccount; ii++ ) |
|||
{ |
|||
shape.push_back( wxPoint( GetShapePolygonCorner( ii ).x * MarkerScale(), |
|||
GetShapePolygonCorner( ii ).y * MarkerScale() ) ); |
|||
} |
|||
|
|||
for( int ii = 0; ii < ccount; ii++ ) |
|||
{ |
|||
shape[ii] += m_Pos + aOffset; |
|||
} |
|||
|
|||
GRClosedPoly( aPanel->GetClipBox(), aDC, ccount, &shape[0], |
|||
true, // = Filled
|
|||
0, // outline width
|
|||
m_Color, // outline color
|
|||
m_Color // fill collor
|
|||
); |
|||
} |
|||
@ -1,203 +0,0 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2009 jean-pierre.charras@gipsa-lab.inpg.fr |
|||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> |
|||
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
/** |
|||
* a helper to handle the real device context used in KiCad |
|||
* @file kicad_device_context.h |
|||
*/ |
|||
|
|||
#ifndef __KICAD_DEVICE_CONTEXT_H__ |
|||
#define __KICAD_DEVICE_CONTEXT_H__ |
|||
|
|||
#include <wx/dcbuffer.h> |
|||
|
|||
#if defined(KICAD_USE_BUFFERED_PAINTDC) |
|||
#undef KICAD_USE_BUFFERED_PAINTDC |
|||
#endif |
|||
|
|||
#if defined(KICAD_USE_BUFFERED_DC) |
|||
#undef KICAD_USE_BUFFERED_DC |
|||
#endif |
|||
|
|||
// wxWidgets defines the platforms where device context buffering is well behaved. These |
|||
// definitions take advantage of their experience in this area. See <wx/dcbuffer.h> for |
|||
// more information. |
|||
#if wxALWAYS_NATIVE_DOUBLE_BUFFER |
|||
#define KICAD_USE_BUFFERED_PAINTDC 1 |
|||
#define KICAD_USE_BUFFERED_DC_HELPER 0 |
|||
#define KICAD_USE_BUFFERED_DC 0 |
|||
#else |
|||
#define KICAD_USE_BUFFERED_PAINTDC 1 |
|||
#define KICAD_USE_BUFFERED_DC_HELPER 1 |
|||
#define KICAD_USE_BUFFERED_DC 1 |
|||
#endif |
|||
|
|||
|
|||
/** |
|||
* Class BUFFERED_DC_HELPER |
|||
* fixes a bug on Windows when using buffered device context. |
|||
* |
|||
* <p> |
|||
* When using buffered device context drawing in Windows, the user scaling must be set to 1 |
|||
* and the logical offset must be set to zero before the bitmap blit operation occurs in |
|||
* the destructor of wxBufferdDC but after the normal drawing takes place. |
|||
* </p> |
|||
*/ |
|||
class BUFFERED_DC_HELPER |
|||
{ |
|||
public: |
|||
BUFFERED_DC_HELPER( wxBufferedDC* aDC ) |
|||
: m_dc( aDC ) {} |
|||
|
|||
virtual ~BUFFERED_DC_HELPER() |
|||
{ |
|||
if( m_dc ) |
|||
{ |
|||
m_dc->SetLogicalOrigin( 0, 0 ); |
|||
m_dc->SetUserScale( 1.0, 1.0 ); |
|||
} |
|||
} |
|||
|
|||
private: |
|||
wxBufferedDC* m_dc; |
|||
}; |
|||
|
|||
|
|||
/** |
|||
* Class EDA_BLIT_NORMALIZER |
|||
* is a helper class for clearing a device context scale and offset parameters before |
|||
* performing a Blit operation. |
|||
* <p> |
|||
* This class keeps a temporary copy of the scale and offset parameters of a device |
|||
* context and then restores them when it goes out of scope. |
|||
* </p> |
|||
*/ |
|||
class EDA_BLIT_NORMALIZER |
|||
{ |
|||
public: |
|||
EDA_BLIT_NORMALIZER( wxDC* aDC ) |
|||
: m_dc( aDC ) |
|||
{ |
|||
if( aDC ) |
|||
{ |
|||
aDC->GetUserScale( &m_userScaleX, &m_userScaleY ); |
|||
aDC->GetLogicalOrigin( &m_logicalOriginX, &m_logicalOriginY ); |
|||
aDC->GetDeviceOrigin( &m_deviceOriginX, &m_deviceOriginY ); |
|||
aDC->SetUserScale( 1.0, 1.0 ); |
|||
aDC->SetLogicalOrigin( 0, 0 ); |
|||
aDC->SetDeviceOrigin( 0, 0 ); |
|||
} |
|||
} |
|||
|
|||
~EDA_BLIT_NORMALIZER() |
|||
{ |
|||
if( m_dc ) |
|||
{ |
|||
m_dc->SetUserScale( m_userScaleX, m_userScaleY ); |
|||
m_dc->SetLogicalOrigin( m_logicalOriginX, m_logicalOriginY ); |
|||
m_dc->SetDeviceOrigin( m_deviceOriginX, m_deviceOriginY ); |
|||
} |
|||
} |
|||
|
|||
private: |
|||
wxDC* m_dc; |
|||
double m_userScaleX; |
|||
double m_userScaleY; |
|||
int m_logicalOriginX; |
|||
int m_logicalOriginY; |
|||
int m_deviceOriginX; |
|||
int m_deviceOriginY; |
|||
|
|||
DECLARE_NO_COPY_CLASS( EDA_BLIT_NORMALIZER ) |
|||
}; |
|||
|
|||
|
|||
#if USE_WX_GRAPHICS_CONTEXT |
|||
#include <wx/dcgraph.h> |
|||
#endif |
|||
|
|||
// Macro used to declare a device context in KiCad: |
|||
#if USE_WX_GRAPHICS_CONTEXT |
|||
//#pragma message( "INSTALL_DC is wxClientDC with wxGCDC" ) |
|||
#define INSTALL_DC( name, parent ) \ |
|||
wxClientDC _cDC( parent ); \ |
|||
wxGCDC name( _cDC ); \ |
|||
parent->DoPrepareDC( name ); \ |
|||
name.GetGraphicsContext()->Translate( 0.5, 0.5 ); |
|||
#else |
|||
#if KICAD_USE_BUFFERED_DC && !KICAD_USE_BUFFERED_DC_HELPER |
|||
//#pragma message( "INSTALL_DC is wxClientDC with wxBufferedDC" ) |
|||
#define INSTALL_DC( name, parent ) \ |
|||
wxClientDC _cDC( parent ); \ |
|||
wxBufferedDC name(&_cDC, _cDC.GetSize() ); \ |
|||
parent->DoPrepareDC( name ); |
|||
#elif KICAD_USE_BUFFERED_DC && KICAD_USE_BUFFERED_DC_HELPER |
|||
//#pragma message( "INSTALL_DC is wxBufferedDC with BUFFERED_DC_HELPER" ) |
|||
#define INSTALL_DC( name, parent ) \ |
|||
wxClientDC _cDC( parent ); \ |
|||
wxBufferedDC name(&_cDC, _cDC.GetSize() ); \ |
|||
parent->DoPrepareDC( name ); \ |
|||
BUFFERED_DC_HELPER helper( &name ); |
|||
#else |
|||
//#pragma message( "INSTALL_DC is wxClientDC" ) |
|||
#define INSTALL_DC( name, parent ) \ |
|||
wxClientDC name( parent ); \ |
|||
parent->DoPrepareDC( name ); |
|||
#endif |
|||
#endif |
|||
|
|||
#if USE_WX_GRAPHICS_CONTEXT |
|||
//#pragma message( "INSTALL_PAINTDC is wxPaintDC with wxGCDC" ) |
|||
#define INSTALL_PAINTDC( name, parent) \ |
|||
wxPaintDC _pDC( parent ); \ |
|||
wxGCDC name( _pDC ); \ |
|||
parent->DoPrepareDC( name ); \ |
|||
name.GetGraphicsContext()->Translate( 0.5, 0.5 ); |
|||
#elif KICAD_USE_BUFFERED_PAINTDC && !KICAD_USE_BUFFERED_DC_HELPER |
|||
//#pragma message( "INSTALL_PAINTDC is wxAutoBufferedPaintDC" ) |
|||
#define INSTALL_PAINTDC( name, parent ) \ |
|||
wxAutoBufferedPaintDC name( parent ); \ |
|||
parent->DoPrepareDC( name ); |
|||
#elif KICAD_USE_BUFFERED_PAINTDC && KICAD_USE_BUFFERED_DC_HELPER |
|||
//#pragma message( "INSTALL_PAINTDC is wxBufferedPaintDC with BUFFERED_DC_HELPER" ) |
|||
#define INSTALL_PAINTDC( name, parent ) \ |
|||
wxBufferedPaintDC name( parent ); \ |
|||
parent->DoPrepareDC( name ); \ |
|||
BUFFERED_DC_HELPER help( &name ); |
|||
#else |
|||
//#pragma message( "INSTALL_PAINTDC is wxPaintDC" ) |
|||
#define INSTALL_PAINTDC(name,parent) \ |
|||
wxPaintDC name( parent ); \ |
|||
parent->DoPrepareDC( name ); |
|||
#endif |
|||
|
|||
|
|||
// This macro should be used when drawing objects directly without drawing the background. |
|||
#define INSTALL_UNBUFFERED_DC( name, parent ) \ |
|||
wxClientDC name( parent ); \ |
|||
parent->DoPrepareDC( name ); |
|||
|
|||
|
|||
#endif // __KICAD_DEVICE_CONTEXT_H__ |
|||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue