Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
a0c413a6
Commit
a0c413a6
authored
Nov 02, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solved a minor bug (pcbnew): arcs incorrectly printed in mirror mode
parent
c88f9b1c
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
18 deletions
+39
-18
copy_to_clipboard.cpp
common/copy_to_clipboard.cpp
+1
-1
eeredraw.cpp
eeschema/eeredraw.cpp
+4
-3
tracepcb.cpp
gerbview/tracepcb.cpp
+7
-3
drawpanel_wxstruct.h
include/drawpanel_wxstruct.h
+3
-1
class_drawsegment.cpp
pcbnew/class_drawsegment.cpp
+11
-2
lay2plot.cpp
pcbnew/lay2plot.cpp
+7
-3
zones_convert_brd_items_to_polygons.cpp
pcbnew/zones_convert_brd_items_to_polygons.cpp
+2
-2
drawpanel.cpp
share/drawpanel.cpp
+1
-0
svg_print.cpp
share/svg_print.cpp
+1
-1
wxprint.cpp
share/wxprint.cpp
+2
-2
No files found.
common/copy_to_clipboard.cpp
View file @
a0c413a6
...
...
@@ -121,7 +121,7 @@ bool DrawPage( WinEDA_DrawPanel* panel )
{
dc
.
SetClippingRegion
(
DrawArea
);
}
panel
->
PrintPage
(
&
dc
,
Print_Sheet_Ref
,
-
1
);
panel
->
PrintPage
(
&
dc
,
Print_Sheet_Ref
,
-
1
,
false
);
g_IsPrinting
=
FALSE
;
panel
->
m_ClipBox
=
tmp
;
wxMetafile
*
mf
=
dc
.
Close
();
...
...
eeschema/eeredraw.cpp
View file @
a0c413a6
...
...
@@ -134,15 +134,16 @@ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
}
/*******************************************************************************/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
)
/*******************************************************************************/
/*******************************************************************************
***********************
/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
,
bool
aPrintMirrorMode
)
/*******************************************************************************
***********************
/
/** PrintPage
* used to print a page.
* Print the page pointed by ActiveScreen, set by the calling print function
* @param DC = wxDC given by the calling print function
* @param Print_Sheet_Ref = true to print page references
* @param PrintMask = not used here
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
*/
{
wxBeginBusyCursor
();
...
...
gerbview/tracepcb.cpp
View file @
a0c413a6
...
...
@@ -22,9 +22,9 @@
/* Variables Locales */
/**********************************************************************************/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
printmasklayer
)
/**********************************************************************************/
/**********************************************************************************
**************************
/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
printmasklayer
,
bool
aPrintMirrorMode
)
/**********************************************************************************
***************************
/
/* routine de trace du pcb, avec selection des couches */
{
DISPLAY_OPTIONS
save_opt
;
...
...
@@ -47,11 +47,15 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
DisplayPolygonsModeImg
=
g_DisplayPolygonsModeSketch
;
g_DisplayPolygonsModeSketch
=
0
;
m_PrintIsMirrored
=
aPrintMirrorMode
;
(
(
WinEDA_GerberFrame
*
)
m_Parent
)
->
Trace_Gerber
(
DC
,
GR_COPY
,
printmasklayer
);
if
(
Print_Sheet_Ref
)
m_Parent
->
TraceWorkSheet
(
DC
,
GetScreen
(),
0
);
m_PrintIsMirrored
=
false
;
DisplayOpt
=
save_opt
;
g_DisplayPolygonsModeSketch
=
DisplayPolygonsModeImg
;
}
...
...
include/drawpanel_wxstruct.h
View file @
a0c413a6
...
...
@@ -43,6 +43,8 @@ public:
bool
m_Block_Enable
;
// TRUE to accept Block Commands
int
m_CanStartBlock
;
// >= 0 (or >= n) if a block can start
bool
m_PrintIsMirrored
;
// True when drawing in mirror mode. Used in draw arc function,
// because arcs are oriented, and in mirror mode, orientations are reversed
// usefull to avoid false start block in certain cases (like switch from a sheet to an other scheet
int
m_PanelDefaultCursor
;
// Current mouse cursor default shape id for this window
int
m_PanelCursor
;
// Current mouse cursor shape id for this window
...
...
@@ -71,7 +73,7 @@ public:
void
OnSize
(
wxSizeEvent
&
event
);
void
SetBoundaryBox
();
void
ReDraw
(
wxDC
*
DC
,
bool
erasebg
=
TRUE
);
void
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
);
void
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
,
bool
aPrintMirrorMode
);
void
DrawBackGround
(
wxDC
*
DC
);
void
m_Draw_Auxiliary_Axis
(
wxDC
*
DC
,
int
drawmode
);
void
OnEraseBackground
(
wxEraseEvent
&
event
);
...
...
pcbnew/class_drawsegment.cpp
View file @
a0c413a6
...
...
@@ -244,8 +244,17 @@ void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
StAngle
=
(
int
)
ArcTangente
(
dy
-
uy0
,
dx
-
ux0
);
EndAngle
=
StAngle
+
m_Angle
;
if
(
!
panel
->
m_PrintIsMirrored
)
{
if
(
StAngle
>
EndAngle
)
EXCHG
(
StAngle
,
EndAngle
);
}
else
//Mirrored mode: arc orientation is reversed
{
if
(
StAngle
<
EndAngle
)
EXCHG
(
StAngle
,
EndAngle
);
}
if
(
mode
==
FILAIRE
)
GRArc
(
&
panel
->
m_ClipBox
,
DC
,
ux0
,
uy0
,
StAngle
,
EndAngle
,
rayon
,
color
);
...
...
pcbnew/lay2plot.cpp
View file @
a0c413a6
...
...
@@ -19,9 +19,9 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
int
draw_mode
,
int
masklayer
);
/**********************************************************************************/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
printmasklayer
)
/**********************************************************************************/
/**********************************************************************************
**************************
/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
printmasklayer
,
bool
aPrintMirrorMode
)
/**********************************************************************************
**************************
/
/* Used to print the board.
* Draw the board, but only layers allowed by printmasklayer
...
...
@@ -51,6 +51,8 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
DisplayOpt
.
DisplayDrawItems
=
FILLED
;
DisplayOpt
.
DisplayZones
=
TRUE
;
m_PrintIsMirrored
=
aPrintMirrorMode
;
/* Draw the pcb graphic items (texts, ...) */
for
(
BOARD_ITEM
*
item
=
Pcb
->
m_Drawings
;
item
;
item
=
item
->
Next
()
)
{
...
...
@@ -138,6 +140,8 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
if
(
Print_Sheet_Ref
)
m_Parent
->
TraceWorkSheet
(
DC
,
ActiveScreen
,
0
);
m_PrintIsMirrored
=
false
;
DisplayOpt
=
save_opt
;
frame
->
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
;
frame
->
m_DisplayPadFill
=
DisplayOpt
.
DisplayPadFill
;
...
...
pcbnew/zones_convert_brd_items_to_polygons.cpp
View file @
a0c413a6
...
...
@@ -36,9 +36,9 @@ void AddTextBoxWithClearancePolygon( Bool_Engine* aBooleng,
static
int
s_CircleToSegmentsCount
=
16
;
/* default value. the real value will be changed to 32
* if g_Zone_Arc_Approximation == 1
*/
double
s_Correction
;
/* mult coeff used to enlarge rou
ded and oval pads
double
s_Correction
;
/* mult coeff used to enlarge rou
nded and oval pads (and vias)
* because the segment approximation for arcs and circles
* create a smal
er gap than a trur
circle
* create a smal
ler gap than a true
circle
*/
/** function AddClearanceAreasPolygonsToPolysList
* Add non copper areas polygons (pads and tracks with clearence)
...
...
share/drawpanel.cpp
View file @
a0c413a6
...
...
@@ -87,6 +87,7 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id,
m_Block_Enable
=
FALSE
;
m_PanelDefaultCursor
=
m_PanelCursor
=
wxCURSOR_ARROW
;
m_CursorLevel
=
0
;
m_PrintIsMirrored
=
false
;
}
...
...
share/svg_print.cpp
View file @
a0c413a6
...
...
@@ -475,7 +475,7 @@ bool WinEDA_PrintSVGFrame::DrawPage( const wxString& FullFileName, BASE_SCREEN*
g_IsPrinting
=
TRUE
;
SetLocaleTo_C_standard
(
);
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
panel
->
PrintPage
(
&
dc
,
m_Print_Sheet_Ref
,
m_PrintMaskLayer
);
panel
->
PrintPage
(
&
dc
,
m_Print_Sheet_Ref
,
m_PrintMaskLayer
,
false
);
SetLocaleTo_Default
(
);
// revert to the current locale
g_IsPrinting
=
FALSE
;
panel
->
m_ClipBox
=
tmp
;
...
...
share/wxprint.cpp
View file @
a0c413a6
...
...
@@ -830,10 +830,10 @@ void EDA_Printout::DrawPage()
s_PrintMaskLayer
|=
EDGE_LAYER
;
#endif
panel
->
PrintPage
(
dc
,
0
,
s_PrintMaskLayer
);
panel
->
PrintPage
(
dc
,
0
,
s_PrintMaskLayer
,
s_PrintMirror
);
#else
panel
->
PrintPage
(
dc
,
m_Print_Sheet_Ref
,
s_PrintMaskLayer
);
panel
->
PrintPage
(
dc
,
m_Print_Sheet_Ref
,
s_PrintMaskLayer
,
s_PrintMirror
);
#endif
g_IsPrinting
=
FALSE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment