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
c6f68578
Commit
c6f68578
authored
Feb 11, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some warnings in compilation. A small bug fixed when drawing grids on screen.
parent
37d2057b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
31 deletions
+33
-31
drawpanel.cpp
common/drawpanel.cpp
+18
-17
zoom.cpp
common/zoom.cpp
+5
-4
controle.cpp
gerbview/controle.cpp
+4
-4
moduleframe.cpp
pcbnew/moduleframe.cpp
+4
-4
tool_modedit.cpp
pcbnew/tool_modedit.cpp
+1
-1
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+1
-1
No files found.
common/drawpanel.cpp
View file @
c6f68578
...
...
@@ -685,7 +685,7 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
int
Color
=
BLUE
;
BASE_SCREEN
*
screen
=
GetScreen
();
int
ii
,
jj
,
xg
,
yg
,
color
;
wxRealPoint
pas_grille_affiche
e
;
wxRealPoint
screen_grid_siz
e
;
bool
drawgrid
=
FALSE
;
wxSize
size
;
wxPoint
org
;
...
...
@@ -699,25 +699,26 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
*/
drawgrid
=
m_Parent
->
m_Draw_Grid
;
pas_grille_affichee
=
screen
->
GetGrid
();
double
dgrid
=
screen
->
Scale
(
pas_grille_affichee
.
x
);
if
(
dgrid
<
5
)
screen_grid_size
=
screen
->
GetGrid
();
wxRealPoint
dgrid
=
screen_grid_size
;
screen
->
Scale
(
dgrid
);
// dgrid = grid size in pixels
// if the grid size is sall ( < 5 pixels) do not display all points
if
(
dgrid
.
x
<
5
)
{
pas_grille_affiche
e
.
x
*=
2
;
dgrid
*=
2
;
screen_grid_siz
e
.
x
*=
2
;
dgrid
.
x
*=
2
;
}
if
(
dgrid
<
5
)
drawgrid
=
FALSE
;
// The gris is
small
if
(
dgrid
.
x
<
5
)
drawgrid
=
FALSE
;
// The gris is
too small: do not show it
dgrid
=
screen
->
Scale
(
pas_grille_affichee
.
y
);
if
(
ii
<
dgrid
)
if
(
dgrid
.
y
<
5
)
{
pas_grille_affiche
e
.
y
*=
2
;
dgrid
*=
2
;
screen_grid_siz
e
.
y
*=
2
;
dgrid
.
y
*=
2
;
}
if
(
dgrid
<
5
)
drawgrid
=
FALSE
;
// The gris is small
if
(
dgrid
.
y
<
5
)
drawgrid
=
FALSE
;
// The gris is
too
small
GetViewStart
(
&
org
.
x
,
&
org
.
y
);
GetScrollPixelsPerUnit
(
&
ii
,
&
jj
);
...
...
@@ -738,12 +739,12 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
GRSetColorPen
(
DC
,
color
);
for
(
ii
=
0
;
;
ii
++
)
{
xg
=
ii
*
pas_grille_affichee
.
x
;
xg
=
(
int
)
round
(
ii
*
screen_grid_size
.
x
)
;
int
xpos
=
org
.
x
+
xg
;
for
(
jj
=
0
;
;
jj
++
)
{
yg
=
jj
*
pas_grille_affichee
.
y
;
yg
=
(
int
)
round
(
jj
*
screen_grid_size
.
y
)
;
GRPutPixel
(
&
m_ClipBox
,
DC
,
xpos
,
org
.
y
+
yg
,
color
);
if
(
yg
>
size
.
y
)
break
;
...
...
common/zoom.cpp
View file @
c6f68578
...
...
@@ -51,10 +51,11 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord )
if
(
!
GetBaseScreen
()
->
m_UserGridIsON
)
{
coord
->
x
=
(
(
int
)
round
(
coord
->
x
/
grid_size
.
x
)
)
*
grid_size
.
x
;
coord
->
y
=
(
(
int
)
round
(
coord
->
y
/
grid_size
.
y
)
)
*
grid_size
.
y
;
int
tmp
=
(
int
)
round
(
coord
->
x
/
grid_size
.
x
);
coord
->
x
=
(
int
)
round
(
tmp
*
grid_size
.
x
);
tmp
=
(
int
)
round
(
coord
->
y
/
grid_size
.
y
);
coord
->
y
=
(
int
)
round
(
tmp
*
grid_size
.
y
);
}
}
...
...
gerbview/controle.cpp
View file @
c6f68578
...
...
@@ -74,25 +74,25 @@ void WinEDA_GerberFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
{
case
WXK_NUMPAD8
:
/* Deplacement curseur vers le haut */
case
WXK_UP
:
Mouse
.
y
-=
delta
.
y
;
Mouse
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD2
:
/* Deplacement curseur vers le bas */
case
WXK_DOWN
:
Mouse
.
y
+=
delta
.
y
;
Mouse
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD4
:
/* Deplacement curseur vers la gauche */
case
WXK_LEFT
:
Mouse
.
x
-=
delta
.
x
;
Mouse
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD6
:
/* Deplacement curseur vers la droite */
case
WXK_RIGHT
:
Mouse
.
x
+=
delta
.
x
;
Mouse
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
...
...
pcbnew/moduleframe.cpp
View file @
c6f68578
...
...
@@ -432,25 +432,25 @@ void WinEDA_ModuleEditFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
{
case
WXK_NUMPAD8
:
/* Deplacement curseur vers le haut */
case
WXK_UP
:
Mouse
.
y
-=
delta
.
y
;
Mouse
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD2
:
/* Deplacement curseur vers le bas */
case
WXK_DOWN
:
Mouse
.
y
+=
delta
.
y
;
Mouse
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD4
:
/* Deplacement curseur vers la gauche */
case
WXK_LEFT
:
Mouse
.
x
-=
delta
.
x
;
Mouse
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD6
:
/* Deplacement curseur vers la droite */
case
WXK_RIGHT
:
Mouse
.
x
+=
delta
.
x
;
Mouse
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
...
...
pcbnew/tool_modedit.cpp
View file @
c6f68578
...
...
@@ -310,7 +310,7 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
for
(
i
=
0
;
i
<
GetScreen
()
->
m_GridList
.
GetCount
();
i
++
)
{
double
value
=
To_User_Unit
(
g_UnitMetric
,
GetScreen
()
->
m_GridList
[
i
].
m_Size
.
x
,
(
int
)
GetScreen
()
->
m_GridList
[
i
].
m_Size
.
x
,
PCB_INTERNAL_UNIT
);
if
(
GetScreen
()
->
m_GridList
[
i
].
m_Id
!=
ID_POPUP_GRID_USER
)
{
...
...
pcbnew/tool_pcb.cpp
View file @
c6f68578
...
...
@@ -621,7 +621,7 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
{
GRID_TYPE
grid
=
GetScreen
()
->
m_GridList
[
i
];
double
value
=
To_User_Unit
(
g_UnitMetric
,
grid
.
m_Size
.
x
,
(
int
)
grid
.
m_Size
.
x
,
PCB_INTERNAL_UNIT
);
if
(
grid
.
m_Id
!=
ID_POPUP_GRID_USER
)
{
...
...
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