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
82cc9233
Commit
82cc9233
authored
May 23, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Worksheet code: more cleanup, and fix compil issue with wxWidgets 2.8
parent
a9a00902
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
11 deletions
+39
-11
common_plot_functions.cpp
common/common_plot_functions.cpp
+26
-1
title_block_shapes.h
common/title_block_shapes.h
+2
-2
title_block_shapes_gost.h
common/title_block_shapes_gost.h
+0
-2
worksheet.cpp
common/worksheet.cpp
+2
-1
worksheet_shape_builder.h
common/worksheet_shape_builder.h
+8
-5
worksheet.h
include/worksheet.h
+1
-0
No files found.
common/common_plot_functions.cpp
View file @
82cc9233
...
@@ -3,6 +3,30 @@
...
@@ -3,6 +3,30 @@
* @brief Kicad: Common plotting functions
* @brief Kicad: Common plotting functions
*/
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2013 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
*/
#include <fctsys.h>
#include <fctsys.h>
#include <base_struct.h>
#include <base_struct.h>
#include <plot_common.h>
#include <plot_common.h>
...
@@ -113,7 +137,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
...
@@ -113,7 +137,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
case
WS_DRAW_ITEM_BASE
:
:
wsg_poly
:
case
WS_DRAW_ITEM_BASE
:
:
wsg_poly
:
{
{
WS_DRAW_ITEM_POLYGON
*
poly
=
(
WS_DRAW_ITEM_POLYGON
*
)
item
;
WS_DRAW_ITEM_POLYGON
*
poly
=
(
WS_DRAW_ITEM_POLYGON
*
)
item
;
plotter
->
PlotPoly
(
poly
->
m_Corners
,
NO_FILL
);
plotter
->
PlotPoly
(
poly
->
m_Corners
,
poly
->
IsFilled
()
?
FILLED_SHAPE
:
NO_FILL
);
}
}
break
;
break
;
}
}
...
...
common/title_block_shapes.h
View file @
82cc9233
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#define GRID_REF_W 70 // height of the band reference grid
#define GRID_REF_W 70 // height of the band reference grid
#define TEXTSIZE 60 // worksheet text size
#define TEXTSIZE 60 // worksheet text size
#define FRMREF_TXTSIZE 50 // worksheet frame reference text size
#define FRMREF_TXTSIZE 50 // worksheet frame reference text size
#define PAS_REF 2000 // reference markings on worksheet frame
#define VARIABLE_BLOCK_START_POSITION (TEXTSIZE * 10)
#define VARIABLE_BLOCK_START_POSITION (TEXTSIZE * 10)
// The coordinates below are relative to the bottom right corner of page and
// The coordinates below are relative to the bottom right corner of page and
...
@@ -323,7 +322,8 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
...
@@ -323,7 +322,8 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
// lower right corner
// lower right corner
wxPoint
currpos
;
wxPoint
currpos
;
currpos
=
m_pageSize
-
m_RBmargin
;
currpos
.
x
=
m_pageSize
.
x
-
m_RBmargin
.
x
;
currpos
.
y
=
m_pageSize
.
y
-
m_RBmargin
.
y
;
// Draw the border.
// Draw the border.
int
ii
,
jj
,
ipas
,
gxpas
,
gypas
;
int
ii
,
jj
,
ipas
,
gxpas
,
gypas
;
...
...
common/title_block_shapes_gost.h
View file @
82cc9233
...
@@ -36,8 +36,6 @@
...
@@ -36,8 +36,6 @@
*/
*/
#define TEXTSIZE 100 // worksheet text size
#define TEXTSIZE 100 // worksheet text size
#define PAS_REF 2000 // reference markings on worksheet frame
// used in worksheet.cpp
// Work sheet structure type definitions.
// Work sheet structure type definitions.
enum
TypeKi_WorkSheetData
{
enum
TypeKi_WorkSheetData
{
...
...
common/worksheet.cpp
View file @
82cc9233
...
@@ -123,7 +123,8 @@ void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
...
@@ -123,7 +123,8 @@ void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
WS_DRAW_ITEM_POLYGON
*
poly
=
(
WS_DRAW_ITEM_POLYGON
*
)
item
;
WS_DRAW_ITEM_POLYGON
*
poly
=
(
WS_DRAW_ITEM_POLYGON
*
)
item
;
GRPoly
(
aCanvas
?
aCanvas
->
GetClipBox
()
:
NULL
,
aDC
,
GRPoly
(
aCanvas
?
aCanvas
->
GetClipBox
()
:
NULL
,
aDC
,
poly
->
m_Corners
.
size
(),
&
poly
->
m_Corners
[
0
],
poly
->
m_Corners
.
size
(),
&
poly
->
m_Corners
[
0
],
true
,
poly
->
GetPenWidth
(),
poly
->
IsFilled
()
?
FILLED_SHAPE
:
NO_FILL
,
poly
->
GetPenWidth
(),
poly
->
GetColor
(),
poly
->
GetColor
()
);
poly
->
GetColor
(),
poly
->
GetColor
()
);
}
}
break
;
break
;
...
...
common/worksheet_shape_builder.h
View file @
82cc9233
...
@@ -66,18 +66,21 @@ public:
...
@@ -66,18 +66,21 @@ public:
class
WS_DRAW_ITEM_POLYGON
:
public
WS_DRAW_ITEM_BASE
class
WS_DRAW_ITEM_POLYGON
:
public
WS_DRAW_ITEM_BASE
{
{
int
m_penWidth
;
int
m_penWidth
;
bool
m_fill
;
public
:
public
:
std
::
vector
<
wxPoint
>
m_Corners
;
std
::
vector
<
wxPoint
>
m_Corners
;
public
:
public
:
WS_DRAW_ITEM_POLYGON
(
wxPoint
aStart
,
wxPoint
aEnd
,
WS_DRAW_ITEM_POLYGON
(
bool
aFill
,
int
aPenWidth
,
EDA_COLOR_T
aColor
)
:
int
aPenWidth
,
EDA_COLOR_T
aColor
)
:
WS_DRAW_ITEM_BASE
(
wsg_poly
,
aColor
)
WS_DRAW_ITEM_BASE
(
wsg_poly
,
aColor
)
{
{
m_penWidth
=
aPenWidth
;
m_penWidth
=
aPenWidth
;
m_fill
=
aFill
;
}
}
// Accessors:
// Accessors:
int
GetPenWidth
()
{
return
m_penWidth
;
}
int
GetPenWidth
()
{
return
m_penWidth
;
}
bool
IsFilled
()
{
return
m_fill
;
}
};
};
// This class draws a not filled rectangle with thick segment
// This class draws a not filled rectangle with thick segment
...
@@ -171,7 +174,7 @@ public:
...
@@ -171,7 +174,7 @@ public:
}
}
/* Function SetMargins
/* Function SetMargins
*
Set the T
he left top margin and the right bottom margin
*
Set t
he left top margin and the right bottom margin
* of the page layout
* of the page layout
* @param aLTmargin The left top margin of the page layout.
* @param aLTmargin The left top margin of the page layout.
* @param aRBmargin The right bottom margin of the page layout.
* @param aRBmargin The right bottom margin of the page layout.
...
@@ -219,8 +222,8 @@ public:
...
@@ -219,8 +222,8 @@ public:
* @param aTitleBlock The sheet title block, for basic inscriptions.
* @param aTitleBlock The sheet title block, for basic inscriptions.
* @param aSheetCount The number of sheets (for basic inscriptions).
* @param aSheetCount The number of sheets (for basic inscriptions).
* @param aSheetNumber The sheet number (for basic inscriptions).
* @param aSheetNumber The sheet number (for basic inscriptions).
* @param aLineColor The color for drawing.
* @param aLineColor The color for drawing
and fixed text
.
* @param aTextColor The color for inscriptions.
* @param aTextColor The color for
user
inscriptions.
*/
*/
void
BuildWorkSheetGraphicList
(
const
wxString
&
aPaperFormat
,
void
BuildWorkSheetGraphicList
(
const
wxString
&
aPaperFormat
,
const
wxString
&
aFileName
,
const
wxString
&
aFileName
,
...
...
include/worksheet.h
View file @
82cc9233
...
@@ -12,6 +12,7 @@ class EDA_DRAW_PANEL;
...
@@ -12,6 +12,7 @@ class EDA_DRAW_PANEL;
class
TITLE_BLOCK
;
class
TITLE_BLOCK
;
class
PAGE_INFO
;
class
PAGE_INFO
;
#define PAS_REF 2000 // Pitch (in mils) of reference locations in worksheet
struct
Ki_WorkSheetData
struct
Ki_WorkSheetData
{
{
...
...
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