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
b74b2eff
Commit
b74b2eff
authored
Mar 25, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More printing fixes.
parent
85bc2ae0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
gr_basic.cpp
common/gr_basic.cpp
+12
-13
dialog_print_using_printer.cpp
eeschema/dialogs/dialog_print_using_printer.cpp
+1
-1
No files found.
common/gr_basic.cpp
View file @
b74b2eff
...
@@ -220,7 +220,8 @@ void GRSetColorPen( wxDC* DC, EDA_COLOR_T Color, int width, wxPenStyle style )
...
@@ -220,7 +220,8 @@ void GRSetColorPen( wxDC* DC, EDA_COLOR_T Color, int width, wxPenStyle style )
if
(
s_DC_lastcolor
!=
Color
if
(
s_DC_lastcolor
!=
Color
||
s_DC_lastwidth
!=
width
||
s_DC_lastwidth
!=
width
||
s_DC_lastpenstyle
!=
style
||
s_DC_lastpenstyle
!=
style
||
s_DC_lastDC
!=
DC
)
||
s_DC_lastDC
!=
DC
||
s_ForceBlackPen
)
{
{
wxPen
pen
;
wxPen
pen
;
...
@@ -501,8 +502,8 @@ void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
...
@@ -501,8 +502,8 @@ void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
return
;
return
;
}
}
GRSetBrush
(
DC
,
Color
,
NOT_FILLED
);
GRSetColorPen
(
DC
,
Color
,
aPenSize
);
GRSetColorPen
(
DC
,
Color
,
aPenSize
);
GRSetBrush
(
DC
,
Color
,
false
);
int
radius
=
(
width
+
1
)
>>
1
;
int
radius
=
(
width
+
1
)
>>
1
;
int
dx
=
x2
-
x1
;
int
dx
=
x2
-
x1
;
...
@@ -646,12 +647,10 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
...
@@ -646,12 +647,10 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
if
(
!
IsGRSPolyDrawable
(
ClipBox
,
n
,
Points
)
)
if
(
!
IsGRSPolyDrawable
(
ClipBox
,
n
,
Points
)
)
return
;
return
;
GRSetColorPen
(
DC
,
Color
,
width
);
if
(
Fill
&&
(
n
>
2
)
)
if
(
Fill
&&
(
n
>
2
)
)
{
{
GRSetBrush
(
DC
,
BgColor
,
FILLED
);
GRSetBrush
(
DC
,
BgColor
,
FILLED
);
GRSetColorPen
(
DC
,
Color
,
width
);
/* clip before send the filled polygon to wxDC, because under linux
/* clip before send the filled polygon to wxDC, because under linux
* (GTK?) polygons having large coordinates are incorrectly drawn
* (GTK?) polygons having large coordinates are incorrectly drawn
...
@@ -682,13 +681,12 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC,
...
@@ -682,13 +681,12 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC,
if
(
!
IsGRSPolyDrawable
(
aClipBox
,
aPointCount
,
aPoints
)
)
if
(
!
IsGRSPolyDrawable
(
aClipBox
,
aPointCount
,
aPoints
)
)
return
;
return
;
GRSetColorPen
(
aDC
,
aColor
,
aWidth
);
if
(
aFill
&&
(
aPointCount
>
2
)
)
if
(
aFill
&&
(
aPointCount
>
2
)
)
{
{
GRLastMoveToX
=
aPoints
[
aPointCount
-
1
].
x
;
GRLastMoveToX
=
aPoints
[
aPointCount
-
1
].
x
;
GRLastMoveToY
=
aPoints
[
aPointCount
-
1
].
y
;
GRLastMoveToY
=
aPoints
[
aPointCount
-
1
].
y
;
GRSetBrush
(
aDC
,
aBgColor
,
FILLED
);
GRSetBrush
(
aDC
,
aBgColor
,
FILLED
);
GRSetColorPen
(
aDC
,
aColor
,
aWidth
);
ClipAndDrawPoly
(
aClipBox
,
aDC
,
aPoints
,
aPointCount
);
ClipAndDrawPoly
(
aClipBox
,
aDC
,
aPoints
,
aPointCount
);
}
}
else
else
...
@@ -761,8 +759,8 @@ void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int r, int width, ED
...
@@ -761,8 +759,8 @@ void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int r, int width, ED
return
;
return
;
}
}
GRSetBrush
(
DC
,
Color
,
NOT_FILLED
);
GRSetColorPen
(
DC
,
Color
,
width
);
GRSetColorPen
(
DC
,
Color
,
width
);
GRSetBrush
(
DC
,
Color
,
false
);
DC
->
DrawEllipse
(
xc
-
r
,
yc
-
r
,
r
+
r
,
r
+
r
);
DC
->
DrawEllipse
(
xc
-
r
,
yc
-
r
,
r
+
r
,
r
+
r
);
}
}
...
@@ -804,8 +802,8 @@ void GRFilledCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r,
...
@@ -804,8 +802,8 @@ void GRFilledCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r,
return
;
return
;
}
}
GRSetColorPen
(
DC
,
Color
,
width
);
GRSetBrush
(
DC
,
BgColor
,
FILLED
);
GRSetBrush
(
DC
,
BgColor
,
FILLED
);
GRSetColorPen
(
DC
,
Color
,
width
);
DC
->
DrawEllipse
(
x
-
r
,
y
-
r
,
r
+
r
,
r
+
r
);
DC
->
DrawEllipse
(
x
-
r
,
y
-
r
,
r
+
r
,
r
+
r
);
}
}
...
@@ -851,8 +849,8 @@ void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
...
@@ -851,8 +849,8 @@ void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
return
;
return
;
}
}
GRSetColorPen
(
DC
,
Color
,
width
);
GRSetBrush
(
DC
,
Color
);
GRSetBrush
(
DC
,
Color
);
GRSetColorPen
(
DC
,
Color
,
width
);
DC
->
DrawArc
(
x1
,
y1
,
x2
,
y2
,
xc
,
yc
);
DC
->
DrawArc
(
x1
,
y1
,
x2
,
y2
,
xc
,
yc
);
}
}
...
@@ -963,8 +961,8 @@ void GRArc( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, double StAngle,
...
@@ -963,8 +961,8 @@ void GRArc( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, double StAngle,
y2
=
0
;
y2
=
0
;
RotatePoint
(
&
x2
,
&
y2
,
StAngle
);
RotatePoint
(
&
x2
,
&
y2
,
StAngle
);
GRSetBrush
(
DC
,
Color
,
NOT_FILLED
);
GRSetColorPen
(
DC
,
Color
);
GRSetColorPen
(
DC
,
Color
);
GRSetBrush
(
DC
,
Color
,
false
);
DC
->
DrawArc
(
xc
+
x1
,
yc
-
y1
,
xc
+
x2
,
yc
-
y2
,
xc
,
yc
);
DC
->
DrawArc
(
xc
+
x1
,
yc
-
y1
,
xc
+
x2
,
yc
-
y2
,
xc
,
yc
);
}
}
...
@@ -1014,8 +1012,8 @@ void GRArc( EDA_RECT* ClipBox,
...
@@ -1014,8 +1012,8 @@ void GRArc( EDA_RECT* ClipBox,
y2
=
0
;
y2
=
0
;
RotatePoint
(
&
x2
,
&
y2
,
StAngle
);
RotatePoint
(
&
x2
,
&
y2
,
StAngle
);
GRSetColorPen
(
DC
,
Color
,
width
);
GRSetBrush
(
DC
,
Color
);
GRSetBrush
(
DC
,
Color
);
GRSetColorPen
(
DC
,
Color
,
width
);
DC
->
DrawArc
(
x
+
x1
,
y
-
y1
,
x
+
x2
,
y
-
y2
,
x
,
y
);
DC
->
DrawArc
(
x
+
x1
,
y
-
y1
,
x
+
x2
,
y
-
y2
,
x
,
y
);
}
}
...
@@ -1107,6 +1105,7 @@ void GRSFilledRect( EDA_RECT* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y
...
@@ -1107,6 +1105,7 @@ void GRSFilledRect( EDA_RECT* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y
points
[
2
]
=
wxPoint
(
x2
,
y2
);
points
[
2
]
=
wxPoint
(
x2
,
y2
);
points
[
3
]
=
wxPoint
(
x2
,
y1
);
points
[
3
]
=
wxPoint
(
x2
,
y1
);
points
[
4
]
=
points
[
0
];
points
[
4
]
=
points
[
0
];
GRSetBrush
(
aDC
,
aBgColor
,
FILLED
);
GRSetBrush
(
aDC
,
aBgColor
,
FILLED
);
GRSetColorPen
(
aDC
,
aBgColor
,
aWidth
);
GRSetColorPen
(
aDC
,
aBgColor
,
aWidth
);
...
...
eeschema/dialogs/dialog_print_using_printer.cpp
View file @
b74b2eff
...
@@ -452,7 +452,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
...
@@ -452,7 +452,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
EDA_COLOR_T
bg_color
=
GetSchFrameParent
()
->
GetDrawBgColor
();
EDA_COLOR_T
bg_color
=
GetSchFrameParent
()
->
GetDrawBgColor
();
aScreen
->
Draw
(
panel
,
dc
,
GR_DEFAULT_DRAWMODE
);
aScreen
->
Draw
(
panel
,
dc
,
(
GR_DRAWMODE
)
0
);
if
(
printReference
)
if
(
printReference
)
parent
->
DrawWorkSheet
(
dc
,
aScreen
,
GetDefaultLineThickness
(),
parent
->
DrawWorkSheet
(
dc
,
aScreen
,
GetDefaultLineThickness
(),
...
...
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